diff options
author | Russell Gallop <russell.gallop@gmail.com> | 2015-06-03 15:09:13 +0000 |
---|---|---|
committer | Russell Gallop <russell.gallop@gmail.com> | 2015-06-03 15:09:13 +0000 |
commit | 14c4dab6036607c38f5f1dc522a5025618ef55db (patch) | |
tree | f9c10f24e8eebdf0d42b908e99245dc891ec78f7 /clang/utils/check_cfc/test_check_cfc.py | |
parent | 224b16228028554e3594c0b72b3dacf3893d22d6 (diff) | |
download | bcm5719-llvm-14c4dab6036607c38f5f1dc522a5025618ef55db.tar.gz bcm5719-llvm-14c4dab6036607c38f5f1dc522a5025618ef55db.zip |
[utils] Improvements to check_cfc.py to work better with some build systems.
Recognise options to output dependency files and don't perform checks.
Report input file name when reporting a check failure so it is more obvious in large build logs.
Differential Revision: http://reviews.llvm.org/D10183
llvm-svn: 238928
Diffstat (limited to 'clang/utils/check_cfc/test_check_cfc.py')
-rwxr-xr-x | clang/utils/check_cfc/test_check_cfc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/utils/check_cfc/test_check_cfc.py b/clang/utils/check_cfc/test_check_cfc.py index 0eee5b83842..e304ff59277 100755 --- a/clang/utils/check_cfc/test_check_cfc.py +++ b/clang/utils/check_cfc/test_check_cfc.py @@ -103,6 +103,16 @@ class TestCheckCFC(unittest.TestCase): check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--version'])) self.assertFalse( check_cfc.is_normal_compile(['clang', '-c', 'test.cpp', '--help'])) + # Outputting dependency files is not a normal compile + self.assertFalse( + check_cfc.is_normal_compile(['clang', '-c', '-M', 'test.cpp'])) + self.assertFalse( + check_cfc.is_normal_compile(['clang', '-c', '-MM', 'test.cpp'])) + # Creating a dependency file as a side effect still outputs an object file + self.assertTrue( + check_cfc.is_normal_compile(['clang', '-c', '-MD', 'test.cpp'])) + self.assertTrue( + check_cfc.is_normal_compile(['clang', '-c', '-MMD', 'test.cpp'])) def test_replace_output_file(self): self.assertEqual(check_cfc.replace_output_file( |