2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 19:30:04 +01:00

Force unit tests to depend on the executable creation time

This commit is contained in:
Thomas Nagy 2018-01-24 20:56:11 +01:00
parent acc10c17a8
commit deacb94c93
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
2 changed files with 7 additions and 2 deletions

View File

@ -58,8 +58,8 @@ def build(bld):
# to execute all tests: # to execute all tests:
# $ waf --alltests # $ waf --alltests
# to set this behaviour permanenly: # to set this behaviour permanenly:
bld.options.all_tests = True #bld.options.all_tests = True
#bld.options.clear_failed_tests = True bld.options.clear_failed_tests = True
# debugging zone: # debugging zone:
# $ waf --zones=ut # $ waf --zones=ut

View File

@ -231,6 +231,11 @@ class utest(Task.Task):
def get_cwd(self): def get_cwd(self):
return getattr(self.generator, 'ut_cwd', self.inputs[0].parent) return getattr(self.generator, 'ut_cwd', self.inputs[0].parent)
def sig_explicit_deps(self):
lst = [os.stat(node.abspath()).st_mtime for node in self.inputs]
self.m.update(str(lst))
return super(utest, self).sig_explicit_deps()
def summary(bld): def summary(bld):
""" """
Display an execution summary:: Display an execution summary::