aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-03-28 08:44:34 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-04-16 01:46:31 +0000
commit2942467148749e84868a79dd47dc4d31d4c75789 (patch)
tree324642206365cf06c4e517610fe851b78d254d5e /run_unittests.py
parentc8b414f6b9b47f573c2b840df030f887c05308b8 (diff)
downloadmeson-2942467148749e84868a79dd47dc4d31d4c75789.zip
meson-2942467148749e84868a79dd47dc4d31d4c75789.tar.gz
meson-2942467148749e84868a79dd47dc4d31d4c75789.tar.bz2
add test case for generator dependencies
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 156e4b8..aa93ee3 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2144,6 +2144,20 @@ class AllPlatformTests(BasePlatformTests):
self.utime(os.path.join(testdir, f))
self.assertRebuiltTarget('prog')
+ def test_source_generator_program_cause_rebuild(self):
+ '''
+ Test that changes to generator programs in the source tree cause
+ a rebuild.
+ '''
+ testdir = os.path.join(self.common_test_dir, '95 gen extra')
+ self.init(testdir)
+ self.build()
+ # Immediately rebuilding should not do anything
+ self.assertBuildIsNoop()
+ # Changing mtime of generator should rebuild the executable
+ self.utime(os.path.join(testdir, 'srcgen.py'))
+ self.assertRebuiltTarget('basic')
+
def test_static_library_lto(self):
'''
Test that static libraries can be built with LTO and linked to