diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-29 13:48:14 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-29 17:26:47 +0000 |
| commit | 4b9ef43274d2af757c162a4536530281bdaba493 (patch) | |
| tree | 041cf5a7d4624658259101dab095716615e68ef6 | |
| parent | 1fd2d4acfcbdbcb8776606c62f62b73a472ce67b (diff) | |
| download | poky-4b9ef43274d2af757c162a4536530281bdaba493.tar.gz | |
oeqa/core/runner: Don't add empty log entries
There is no point in adding empty log entries to the json result files, only
add them if there is log data.
(From OE-Core rev: da6aef0b6bd4655805f7f743858d4e04341f75ed)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/core/runner.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index d6d5afe0c7..67756c3867 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py | |||
| @@ -139,7 +139,10 @@ class OETestResult(_TestResult): | |||
| 139 | t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)" | 139 | t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)" |
| 140 | 140 | ||
| 141 | self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t)) | 141 | self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t)) |
| 142 | result[case.id()] = {'status': status, 'log': log} | 142 | if log: |
| 143 | result[case.id()] = {'status': status, 'log': log} | ||
| 144 | else: | ||
| 145 | result[case.id()] = {'status': status} | ||
| 143 | 146 | ||
| 144 | if json_file_dir: | 147 | if json_file_dir: |
| 145 | tresultjsonhelper = OETestResultJSONHelper() | 148 | tresultjsonhelper = OETestResultJSONHelper() |
