From: Thibault Saunier Date: Wed, 23 Mar 2016 19:02:47 +0000 (+0100) Subject: validate: launcher: Make sure to properly setup all testsuites X-Git-Tag: 1.19.3~491^2~1042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83c652ba76cf4c8f49d95cb7912ac4b0995b2c88;p=platform%2Fupstream%2Fgstreamer.git validate: launcher: Make sure to properly setup all testsuites When a first testsuite will set paths, it does not mean that we should just register following testsuite test manager default tests. So we need to make a difference between the media paths the user passed with --media-path and the ones defined by the testsuite. --- diff --git a/validate/launcher/baseclasses.py b/validate/launcher/baseclasses.py index 75f9e8d..b94c20e 100644 --- a/validate/launcher/baseclasses.py +++ b/validate/launcher/baseclasses.py @@ -1182,7 +1182,7 @@ class _TestsLauncher(Loggable): tester.name not in wanted_test_manager: continue - if self.options.paths: + if self.options.user_paths: tester.register_defaults() loaded = True elif testsuite.setup_tests(tester, self.options): diff --git a/validate/launcher/main.py b/validate/launcher/main.py index 85344f0..d6f0088 100644 --- a/validate/launcher/main.py +++ b/validate/launcher/main.py @@ -202,6 +202,8 @@ class LauncherConfig(Loggable): self.num_jobs = 1 self.dest = None self._using_default_paths = False + # paths passed with --media-path, and not defined by a testsuite + self.user_paths = [] self.paths = [] self.testsuites_dir = DEFAULT_TESTSUITES_DIR @@ -275,6 +277,11 @@ class LauncherConfig(Loggable): if not isinstance(self.paths, list): self.paths = [self.paths] + if not isinstance(self.user_paths, list): + self.user_paths = [self.user_paths] + + self.paths = list(set(self.paths).union(set(self.user_paths))) + if self.generate_info_full is True: self.generate_info = True @@ -450,7 +457,7 @@ Note that all testsuite should be inside python modules, so the directory should help="Directory where to store logs, default is OUTPUT_DIR/logs.") dir_group.add_argument("-R", "--render-path", dest="dest", help="Set the path to which projects should be rendered, default is OUTPUT_DIR/rendered") - dir_group.add_argument("-p", "--medias-paths", dest="paths", action="append", + dir_group.add_argument("-p", "--medias-paths", dest="user_paths", action="append", help="Paths in which to look for media files") dir_group.add_argument("-a", "--clone-dir", dest="clone_dir", help="Paths where to clone the testuite to run "