1"""The py_test() script for generated_file_staleness_test() rules. 2 3Note that this file is preprocessed! The INSERT_<...> text below is replaced 4with the actual list of files before we actually run the script. 5""" 6 7from __future__ import absolute_import 8 9from cmake import staleness_test_lib 10import unittest 11import sys 12 13file_list = """ 14 INSERT_FILE_LIST_HERE 15""".split() 16 17config = staleness_test_lib.Config(file_list) 18 19 20class TestFilesMatch(unittest.TestCase): 21 22 def testFilesMatch(self): 23 errors = staleness_test_lib.CheckFilesMatch(config) 24 self.assertFalse(errors, errors) 25 26 27if len(sys.argv) > 1 and sys.argv[1] == "--fix": 28 staleness_test_lib.FixFiles(config) 29else: 30 unittest.main() 31