summaryrefslogtreecommitdiff
path: root/tools/staleness_test.py
blob: 045cd1a319d8ea9ec0f666a027994a8b453cc8f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback