mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
eCTS: Fix alignment of test results
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>
This commit is contained in:
committed by
chrome-bot
parent
5dd150f073
commit
52eb3b3b64
@@ -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):
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user