diff options
-rw-r--r-- | meta/lib/oeqa/core/context.py | 10 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/context.py | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index b9a28ce319..4705d608ac 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py | |||
@@ -100,24 +100,26 @@ class OETestContextExecutor(object): | |||
100 | name = 'core' | 100 | name = 'core' |
101 | help = 'core test component example' | 101 | help = 'core test component example' |
102 | description = 'executes core test suite example' | 102 | description = 'executes core test suite example' |
103 | datetime = time.strftime("%Y%m%d%H%M%S") | ||
103 | 104 | ||
104 | default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)), | 105 | default_cases = [os.path.join(os.path.abspath(os.path.dirname(__file__)), |
105 | 'cases/example')] | 106 | 'cases/example')] |
106 | default_test_data = os.path.join(default_cases[0], 'data.json') | 107 | default_test_data = os.path.join(default_cases[0], 'data.json') |
107 | default_tests = None | 108 | default_tests = None |
109 | default_json_result_dir = None | ||
108 | 110 | ||
109 | def register_commands(self, logger, subparsers): | 111 | def register_commands(self, logger, subparsers): |
110 | self.parser = subparsers.add_parser(self.name, help=self.help, | 112 | self.parser = subparsers.add_parser(self.name, help=self.help, |
111 | description=self.description, group='components') | 113 | description=self.description, group='components') |
112 | 114 | ||
113 | self.default_output_log = '%s-results-%s.log' % (self.name, | 115 | self.default_output_log = '%s-results-%s.log' % (self.name, self.datetime) |
114 | time.strftime("%Y%m%d%H%M%S")) | ||
115 | self.parser.add_argument('--output-log', action='store', | 116 | self.parser.add_argument('--output-log', action='store', |
116 | default=self.default_output_log, | 117 | default=self.default_output_log, |
117 | help="results output log, default: %s" % self.default_output_log) | 118 | help="results output log, default: %s" % self.default_output_log) |
118 | 119 | ||
119 | self.parser.add_argument('--json-result-dir', action='store', | 120 | self.parser.add_argument('--json-result-dir', action='store', |
120 | help="json result output dir, create testresults.json here if set") | 121 | default=self.default_json_result_dir, |
122 | help="json result output dir, default: %s" % self.default_json_result_dir) | ||
121 | 123 | ||
122 | group = self.parser.add_mutually_exclusive_group() | 124 | group = self.parser.add_mutually_exclusive_group() |
123 | group.add_argument('--run-tests', action='store', nargs='+', | 125 | group.add_argument('--run-tests', action='store', nargs='+', |
@@ -195,7 +197,7 @@ class OETestContextExecutor(object): | |||
195 | 197 | ||
196 | def _get_result_id(self, configuration): | 198 | def _get_result_id(self, configuration): |
197 | return '%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], | 199 | return '%s_%s_%s_%s' % (configuration['TEST_TYPE'], configuration['IMAGE_BASENAME'], |
198 | configuration['MACHINE'], configuration['DATETIME']) | 200 | configuration['MACHINE'], self.datetime) |
199 | 201 | ||
200 | def _pre_run(self): | 202 | def _pre_run(self): |
201 | pass | 203 | pass |
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py index 101434a595..3826f27642 100644 --- a/meta/lib/oeqa/runtime/context.py +++ b/meta/lib/oeqa/runtime/context.py | |||
@@ -47,6 +47,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): | |||
47 | default_data = None | 47 | default_data = None |
48 | default_test_data = 'data/testdata.json' | 48 | default_test_data = 'data/testdata.json' |
49 | default_tests = '' | 49 | default_tests = '' |
50 | default_json_result_dir = '%s-results' % name | ||
50 | 51 | ||
51 | default_target_type = 'simpleremote' | 52 | default_target_type = 'simpleremote' |
52 | default_manifest = 'data/manifest' | 53 | default_manifest = 'data/manifest' |