brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 6db8ab8 Raw
36 lines · plain
1# REQUIRES: arm-registered-target2# Mock 'compile_commands.json' to contain a driver name targeting armv7.3# Afterwards check that correct target is passed into clang.4 5# RUN: rm -rf %t.dir && mkdir -p %t.dir6 7# RUN: echo '[{"directory": "%/t.dir", "command": "%/t.dir/armv7-clang -x c++ the-file.cpp -v", "file": "the-file.cpp"}]' > %t.dir/compile_commands.json8 9# RUN: sed -e "s|INPUT_DIR|%/t.dir|g" %s > %t.test.110# On Windows, we need the URI in didOpen to look like "uri":"file:///C:/..."11# (with the extra slash in the front), so we add it here.12# RUN: sed -E -e 's|"file://([A-Z]):/|"file:///\1:/|g' %t.test.1 > %t.test13 14# RUN: clangd -lit-test < %t.test 2>&1 | FileCheck -strict-whitespace %t.test15{"jsonrpc":"2.0","id":0,"method":"initialize","params":{}}16---17{18  "jsonrpc":"2.0",19  "method":"textDocument/didOpen",20  "params": {21    "textDocument": {22      "uri": "file://INPUT_DIR/the-file.cpp",23      "languageId":"cpp",24      "version":1,25      "text":""26    }27  }28}29# Make sure we have target passed into cc1 driver, which is printed due to -v in30# the compile_commands.json31# CHECK: Target: armv732---33{"jsonrpc":"2.0","id":10000,"method":"shutdown"}34---35{"jsonrpc":"2.0","method":"exit"}36