diff options
author | Reid Kleckner <rnk@google.com> | 2016-08-16 16:07:46 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-08-16 16:07:46 +0000 |
commit | 23c2eac34dc4560a976be703ec7a45198abce12c (patch) | |
tree | 87c081dc6a6c70db9f16a37a47e4a10922bcf8b6 | |
parent | 66e7717b4620e439f6fc0f1fe4a29edb0cde3512 (diff) | |
download | bcm5719-llvm-23c2eac34dc4560a976be703ec7a45198abce12c.tar.gz bcm5719-llvm-23c2eac34dc4560a976be703ec7a45198abce12c.zip |
Remove most instances of REQUIRES: shell from the tools/extra tests
None of these tests actually require bash, they just have quoting bugs
when paths contain backslashes and colons. Fix them with the "%/T" lit
substitution variants.
llvm-svn: 278815
10 files changed, 6 insertions, 16 deletions
diff --git a/clang-tools-extra/test/clang-tidy/clang-tidy-run-with-database.cpp b/clang-tools-extra/test/clang-tidy/clang-tidy-run-with-database.cpp index 7304f0645ed..05bc14c4fa0 100644 --- a/clang-tools-extra/test/clang-tidy/clang-tidy-run-with-database.cpp +++ b/clang-tools-extra/test/clang-tidy/clang-tidy-run-with-database.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: mkdir -p %T/compilation-database-test/include // RUN: mkdir -p %T/compilation-database-test/a // RUN: mkdir -p %T/compilation-database-test/b @@ -8,7 +7,7 @@ // RUN: echo 'int *BC = 0;' > %T/compilation-database-test/b/c.cpp // RUN: echo 'int *HP = 0;' > %T/compilation-database-test/include/header.h // RUN: echo '#include "header.h"' > %T/compilation-database-test/b/d.cpp -// RUN: sed 's|test_dir|%T/compilation-database-test|g' %S/Inputs/compilation-database/template.json > %T/compile_commands.json +// RUN: sed 's|test_dir|%/T/compilation-database-test|g' %S/Inputs/compilation-database/template.json > %T/compile_commands.json // RUN: clang-tidy --checks=-*,modernize-use-nullptr -p %T %T/compilation-database-test/b/not-exist -header-filter=.* // RUN: clang-tidy --checks=-*,modernize-use-nullptr -p %T %T/compilation-database-test/a/a.cpp %T/compilation-database-test/a/b.cpp %T/compilation-database-test/b/b.cpp %T/compilation-database-test/b/c.cpp %T/compilation-database-test/b/d.cpp -header-filter=.* -fix // RUN: FileCheck -input-file=%T/compilation-database-test/a/a.cpp %s -check-prefix=CHECK-FIX1 diff --git a/clang-tools-extra/test/clang-tidy/list-checks.cpp b/clang-tools-extra/test/clang-tidy/list-checks.cpp index 9d83775ee1f..674c118c179 100644 --- a/clang-tools-extra/test/clang-tidy/list-checks.cpp +++ b/clang-tools-extra/test/clang-tidy/list-checks.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: mkdir -p %T/clang-tidy/list-checks/ // RUN: echo '{Checks: "-*,google-*"}' > %T/clang-tidy/.clang-tidy // RUN: cd %T/clang-tidy/list-checks diff --git a/clang-tools-extra/test/include-fixer/commandline_options.cpp b/clang-tools-extra/test/include-fixer/commandline_options.cpp index 85c7e26bd7d..3cc77b49569 100644 --- a/clang-tools-extra/test/include-fixer/commandline_options.cpp +++ b/clang-tools-extra/test/include-fixer/commandline_options.cpp @@ -1,9 +1,8 @@ -// REQUIRES: shell // RUN: echo "foo f;" > %t.cpp // RUN: clang-include-fixer -db=fixed -input='foo= "foo.h","bar.h"' -output-headers %t.cpp -- | FileCheck %s -// RUN: cat %t.cpp | clang-include-fixer -stdin -insert-header='{FilePath: %t.cpp, QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "foo"}]}' %t.cpp | FileCheck %s -check-prefix=CHECK-CODE -// RUN: cat %t.cpp | not clang-include-fixer -stdin -insert-header='{FilePath: %t.cpp, QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "foo"},{Header: "\"foo2.h\"", QualifiedName: "foo"}]}' %t.cpp -// RUN: cat %t.cpp | clang-include-fixer -stdin -insert-header='{FilePath: %t.cpp, QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "a:foo"},{Header: "\"foo.h\"", QualifiedName: "b:foo"}]}' %t.cpp +// RUN: cat %t.cpp | clang-include-fixer -stdin -insert-header='{FilePath: "%/t.cpp", QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "foo"}]}' %t.cpp | FileCheck %s -check-prefix=CHECK-CODE +// RUN: cat %t.cpp | not clang-include-fixer -stdin -insert-header='{FilePath: "%/t.cpp", QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "foo"},{Header: "\"foo2.h\"", QualifiedName: "foo"}]}' %t.cpp +// RUN: cat %t.cpp | clang-include-fixer -stdin -insert-header='{FilePath: "%/t.cpp", QuerySymbolInfos: [{RawIdentifier: foo, Range: {Offset: 0, Length: 3}}], HeaderInfos: [{Header: "\"foo.h\"", QualifiedName: "a:foo"},{Header: "\"foo.h\"", QualifiedName: "b:foo"}]}' %t.cpp // // CHECK: "HeaderInfos": [ // CHECK-NEXT: {"Header": "\"foo.h\"", diff --git a/clang-tools-extra/test/include-fixer/exit_on_fatal.cpp b/clang-tools-extra/test/include-fixer/exit_on_fatal.cpp index 10a1af7bf1e..fc8c95a0371 100644 --- a/clang-tools-extra/test/include-fixer/exit_on_fatal.cpp +++ b/clang-tools-extra/test/include-fixer/exit_on_fatal.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: sed -e 's#//.*$##' %s > %t.cpp // RUN: not clang-include-fixer -db=fixed -input='foo= "foo.h"' %t.cpp -- // RUN: FileCheck %s -input-file=%t.cpp diff --git a/clang-tools-extra/test/include-fixer/fixeddb.cpp b/clang-tools-extra/test/include-fixer/fixeddb.cpp index 41a889e1d8c..90068dbfde1 100644 --- a/clang-tools-extra/test/include-fixer/fixeddb.cpp +++ b/clang-tools-extra/test/include-fixer/fixeddb.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: sed -e 's#//.*$##' %s > %t.cpp // RUN: clang-include-fixer -db=fixed -input='foo= "foo.h","bar.h"' %t.cpp -- // RUN: FileCheck %s -input-file=%t.cpp diff --git a/clang-tools-extra/test/include-fixer/include_path.cpp b/clang-tools-extra/test/include-fixer/include_path.cpp index 31ae52eb122..28b6ace5f59 100644 --- a/clang-tools-extra/test/include-fixer/include_path.cpp +++ b/clang-tools-extra/test/include-fixer/include_path.cpp @@ -1,9 +1,8 @@ -// REQUIRES: shell // RUN: mkdir -p %T/include-fixer/include // RUN: mkdir -p %T/include-fixer/symbols // RUN: mkdir -p %T/include-fixer/build // RUN: mkdir -p %T/include-fixer/src -// RUN: sed 's|test_dir|%T/include-fixer|g' %S/Inputs/database_template.json > %T/include-fixer/build/compile_commands.json +// RUN: sed 's|test_dir|%/T/include-fixer|g' %S/Inputs/database_template.json > %T/include-fixer/build/compile_commands.json // RUN: echo -e '#include "bar.h"\nb::a::bar f;' > %T/include-fixer/src/bar.cpp // RUN: echo 'namespace b { namespace a { class bar {}; } }' > %T/include-fixer/include/bar.h // RUN: cd %T/include-fixer/build @@ -15,6 +14,6 @@ // RUN: clang-include-fixer -db=yaml -input=%T/include-fixer/build/find_all_symbols.yaml -minimize-paths=true -p=. %T/include-fixer/src/bar.cpp // RUN: FileCheck -input-file=%T/include-fixer/src/bar.cpp %s -// CHECK-YAML: ../include/bar.h +// CHECK-YAML: ..{{[/\\]}}include{{[/\\]}}bar.h // CHECK: #include "bar.h" // CHECK: b::a::bar f; diff --git a/clang-tools-extra/test/include-fixer/merge.test b/clang-tools-extra/test/include-fixer/merge.test index a2344fafa2c..313a52f485f 100644 --- a/clang-tools-extra/test/include-fixer/merge.test +++ b/clang-tools-extra/test/include-fixer/merge.test @@ -1,4 +1,3 @@ -# REQUIRES: shell # RUN: find-all-symbols -merge-dir=%S/Inputs/merge %t.merged # RUN: sed '/^#/d' %s > %t.golden # RUN: diff -u %t.golden %t.merged diff --git a/clang-tools-extra/test/include-fixer/prefix_variable.cpp b/clang-tools-extra/test/include-fixer/prefix_variable.cpp index f2f565d4a81..b39cdb8d38d 100644 --- a/clang-tools-extra/test/include-fixer/prefix_variable.cpp +++ b/clang-tools-extra/test/include-fixer/prefix_variable.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: sed -e 's#//.*$##' %s > %t.cpp // RUN: clang-include-fixer -db=yaml -input=%p/Inputs/fake_yaml_db.yaml %t.cpp -- // RUN: FileCheck %s -input-file=%t.cpp diff --git a/clang-tools-extra/test/include-fixer/yamldb.cpp b/clang-tools-extra/test/include-fixer/yamldb.cpp index ae2bfb814d2..d17b41472b2 100644 --- a/clang-tools-extra/test/include-fixer/yamldb.cpp +++ b/clang-tools-extra/test/include-fixer/yamldb.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: sed -e 's#//.*$##' %s > %t.cpp // RUN: clang-include-fixer -db=yaml -input=%p/Inputs/fake_yaml_db.yaml %t.cpp -- // RUN: FileCheck %s -input-file=%t.cpp diff --git a/clang-tools-extra/test/include-fixer/yamldb_autodetect.cpp b/clang-tools-extra/test/include-fixer/yamldb_autodetect.cpp index 9206668aa7b..1997390d5a2 100644 --- a/clang-tools-extra/test/include-fixer/yamldb_autodetect.cpp +++ b/clang-tools-extra/test/include-fixer/yamldb_autodetect.cpp @@ -1,4 +1,3 @@ -// REQUIRES: shell // RUN: mkdir -p %T/foo/bar // RUN: cp %p/Inputs/fake_yaml_db.yaml %T/find_all_symbols_db.yaml // RUN: cd %T/foo |