validate:launcher: Various fixes to make the Test class directly usable

And the launcher installed with meson usable
This commit is contained in:
Thibault Saunier 2017-02-21 13:39:37 -03:00
parent a39ef816a6
commit f2b42cbaf8
3 changed files with 5 additions and 6 deletions

View file

@ -1,2 +1,2 @@
install_data(sources: ['__init__.py', 'gstvalidate.py'], install_data(sources: ['__init__.py', 'gstvalidate.py', 'gstcheck.py'],
install_dir: _launcherdir + '/apps') install_dir: _launcherdir + '/apps')

View file

@ -73,9 +73,9 @@ class Test(Loggable):
self.timeout = timeout * TIMEOUT_FACTOR * options.timeout_factor self.timeout = timeout * TIMEOUT_FACTOR * options.timeout_factor
if hard_timeout: if hard_timeout:
self.hard_timeout = hard_timeout * TIMEOUT_FACTOR self.hard_timeout = hard_timeout * TIMEOUT_FACTOR
self.hard_timeout *= options.timeout_factor
else: else:
self.hard_timeout = hard_timeout self.hard_timeout = hard_timeout
self.hard_timeout *= options.timeout_factor
self.classname = classname self.classname = classname
self.options = options self.options = options
self.application = application_name self.application = application_name
@ -329,7 +329,7 @@ class Test(Loggable):
return False return False
def get_subproc_env(self): def get_subproc_env(self):
return os.environ return os.environ.copy()
def kill_subprocess(self): def kill_subprocess(self):
if self.process is None: if self.process is None:
@ -1053,7 +1053,7 @@ class TestsManager(Loggable):
return False return False
def list_tests(self): def list_tests(self):
return sorted(list(self.tests)) return sorted(list(self.tests), key=lambda x: x.classname)
def add_expected_issues(self, expected_failures): def add_expected_issues(self, expected_failures):
expected_failures_re = {} expected_failures_re = {}

View file

@ -34,8 +34,7 @@ if cairo_dep.found()
endif endif
tmpconf = configuration_data() tmpconf = configuration_data()
tmpconf.set('LIBDIR', get_option('prefix') + '/' + get_option('datadir') + tmpconf.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
'/' + get_option('libdir'))
tmpconf.set('BUILDDIR', meson.current_build_dir()) tmpconf.set('BUILDDIR', meson.current_build_dir())
tmpconf.set('SRCDIR', meson.current_source_dir()) tmpconf.set('SRCDIR', meson.current_source_dir())