diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-11-05 16:19:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 16:19:32 -0800 |
commit | d4e78f9fdff9ad14a0e8e3ad5d7d8379ee2124ef (patch) | |
tree | 03762304cb7341f312d56099b3ce38127d1d6bc5 /tools/staleness_test.py | |
parent | 9bb0814c48cb4d4df87ca64c9fabba5d15183cc1 (diff) | |
parent | 23fa64f10c27bdd4b8261c70a81a7721fd71f69f (diff) |
Merge pull request #132 from haberman/bazel
Added Bazel build, and auto-generate CMake build from it.
Diffstat (limited to 'tools/staleness_test.py')
-rw-r--r-- | tools/staleness_test.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/staleness_test.py b/tools/staleness_test.py new file mode 100644 index 0000000..045cd1a --- /dev/null +++ b/tools/staleness_test.py @@ -0,0 +1,30 @@ +"""The py_test() script for generated_file_staleness_test() rules. + +Note that this file is preprocessed! The INSERT_<...> text below is replaced +with the actual list of files before we actually run the script. +""" + +from __future__ import absolute_import + +from tools import staleness_test_lib +import unittest +import sys + +file_list = """ + INSERT_FILE_LIST_HERE +""".split() + +config = staleness_test_lib.Config(file_list) + + +class TestFilesMatch(unittest.TestCase): + + def testFilesMatch(self): + errors = staleness_test_lib.CheckFilesMatch(config) + self.assertFalse(errors, errors) + + +if len(sys.argv) > 1 and sys.argv[1] == "--fix": + staleness_test_lib.FixFiles(config) +else: + unittest.main() |