diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-06-22 18:09:21 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-28 00:59:06 -0700 |
commit | 52eb3b3b6404b2c2b99715124e5ea9af307db8bf (patch) | |
tree | 977ce82d79103b8df5cd112f15838a9dafe393cd /cts | |
parent | 5dd150f073223a2bfc664fd05cc33a14389f331c (diff) | |
download | chrome-ec-52eb3b3b6404b2c2b99715124e5ea9af307db8bf.tar.gz |
eCTS: Fix alignment of test resultsstabilize-9693.B
This patch fixes the alignment of test results. It also displays
'YES' or 'NO' instead of '1' or '0' for expected string columns:
TEST NAME TH_RC DUT_RC TH_STR DUT_STR RESULT
success_test SUCCESS SUCCESS YES YES PASS
fail_dut_test SUCCESS FAILURE YES YES PASS
fail_th_test FAILURE SUCCESS YES YES PASS
fail_both_test FAILURE FAILURE YES YES PASS
bad_sync_test BAD_SYNC SUCCESS YES YES PASS
bad_sync_both_test BAD_SYNC BAD_SYNC YES YES PASS
hang_test SUCCESS DID_NOT_END YES YES PASS
did_not_start_test DID_NOT_END DID_NOT_START YES YES PASS
BUG=chromium:664309
BRANCH=none
TEST=Run cts.py -m meta
Change-Id: I7d266b9a6458fcabafa4da484b54d9d1dffbad61
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/545257
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'cts')
-rwxr-xr-x | cts/cts.py | 5 | ||||
-rw-r--r-- | cts/meta/cts.testlist | 2 | ||||
-rw-r--r-- | cts/meta/dut.c | 2 | ||||
-rw-r--r-- | cts/meta/th.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/cts/cts.py b/cts/cts.py index 781abe4f07..7781a2d8fc 100755 --- a/cts/cts.py +++ b/cts/cts.py @@ -273,7 +273,7 @@ class Cts(object): fmt += '{:>' + str(len(' RESULT')) + '}\n' self.formatted_results = head.format( - 'test name', 'TH_RETURN_CODE', 'DUT_RETURN_CODE', + 'TEST NAME', 'TH_RC', 'DUT_RC', ' TH_STR', ' DUT_STR', ' RESULT') for i, d in enumerate(dut_results): th_cn = self.get_return_code_name(th_results[i]['rc'], True) @@ -286,7 +286,8 @@ class Cts(object): self.testlist[i]['dut_string']) self.formatted_results += fmt.format( d['name'], th_cn, dut_cn, - th_results[i]['string'], dut_results[i]['string'], + 'YES' if th_results[i]['string'] else 'NO', + 'YES' if dut_results[i]['string'] else 'NO', 'PASS' if th_res and dut_res else 'FAIL') def evaluate_result(self, result, expected_rc, expected_string): diff --git a/cts/meta/cts.testlist b/cts/meta/cts.testlist index 443f1b7376..28ac7e325f 100644 --- a/cts/meta/cts.testlist +++ b/cts/meta/cts.testlist @@ -26,7 +26,7 @@ CTS_TEST(fail_both_test, CTS_RC_FAILURE,, CTS_RC_FAILURE,) /* * Test bad sync for TH */ -CTS_TEST(bad_sync_and_success_test, CTS_RC_BAD_SYNC,,,) +CTS_TEST(bad_sync_test, CTS_RC_BAD_SYNC,,,) /* * Test should fail with bad sync. diff --git a/cts/meta/dut.c b/cts/meta/dut.c index c8264ab868..c321676aec 100644 --- a/cts/meta/dut.c +++ b/cts/meta/dut.c @@ -30,7 +30,7 @@ enum cts_rc fail_both_test(void) return CTS_RC_FAILURE; } -enum cts_rc bad_sync_and_success_test(void) +enum cts_rc bad_sync_test(void) { return CTS_RC_SUCCESS; } diff --git a/cts/meta/th.c b/cts/meta/th.c index 8564377b7f..57b2f492bd 100644 --- a/cts/meta/th.c +++ b/cts/meta/th.c @@ -30,7 +30,7 @@ enum cts_rc fail_both_test(void) return CTS_RC_FAILURE; } -enum cts_rc bad_sync_and_success_test(void) +enum cts_rc bad_sync_test(void) { return CTS_RC_BAD_SYNC; } |