aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeewai Fu <seewaifu@google.com>2022-05-24 04:53:50 +0000
committerAaron Massey <aaronmassey@google.com>2022-05-24 14:40:41 +0000
commite161c96d8cbb31d33ca07ba398e9db14c2d0fd7a (patch)
treedd00a840df3b2d5a17406d2913c0d12a40254131
parent85e38d90dbda15eec94710e05e44cbeb779b5782 (diff)
downloadautotest-e161c96d8cbb31d33ca07ba398e9db14c2d0fd7a.tar.gz
Revert "[tast] report skipped tast tests in tast wrapper"
This reverts commit e04f03f9aefb3458dac5ad2e4fc4733e68289721. Reason for revert: b/233557136 Need more discussion to discuss the impact of reporting skipped tast tests. Original change's description: > [tast] report skipped tast tests in tast wrapper > > skipped test results were not being reported when run with tast wrapper, > update so that results along with reason are reported and test that is > skipped by tast will have TEST_NA with the reason reported by tast > > BUG=b:231928841 > TEST=test_that $DUT > --args=tast_list=video.PlaybackPerf.av1_1080p_60fps_sw_gav1 > tast.generic-list # run with non arm DUT > > Change-Id: I8091fa09a505b2b38ac770eb33c243b7b6f6c1a7 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3645647 > Tested-by: Brett Brotherton <bbrotherton@google.com> > Auto-Submit: Brett Brotherton <bbrotherton@google.com> > Commit-Queue: Brett Brotherton <bbrotherton@google.com> > Reviewed-by: Seewai Fu <seewaifu@google.com> Bug: b:231928841 Change-Id: I05466b09ea8a47070f3c5369b44116070930da1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3662606 Tested-by: Seewai Fu <seewaifu@google.com> Commit-Queue: Seewai Fu <seewaifu@google.com> Reviewed-by: Shuhei Takahashi <nya@chromium.org>
-rw-r--r--server/site_tests/tast/tast.py10
-rwxr-xr-xserver/site_tests/tast/tast_unittest.py18
2 files changed, 11 insertions, 17 deletions
diff --git a/server/site_tests/tast/tast.py b/server/site_tests/tast/tast.py
index e3bcd5b8d9..03ab080f07 100644
--- a/server/site_tests/tast/tast.py
+++ b/server/site_tests/tast/tast.py
@@ -171,14 +171,12 @@ class tast(test.test):
_JOB_STATUS_END_GOOD = 'END GOOD'
_JOB_STATUS_END_FAIL = 'END FAIL'
_JOB_STATUS_END_NOSTATUS = 'END NOSTATUS'
- _JOB_STATUS_END_SKIP = 'END TEST_NA'
# In-job TKO event status codes from base_client_job._run_test_base in
# client/bin/job.py and client/common_lib/error.py.
_JOB_STATUS_GOOD = 'GOOD'
_JOB_STATUS_FAIL = 'FAIL'
_JOB_STATUS_NOSTATUS = 'NOSTATUS'
- _JOB_STATUS_SKIP = 'TEST_NA'
# Status reason used when an individual Tast test doesn't finish running.
_TEST_DID_NOT_FINISH_MSG = 'Test did not finish'
@@ -1109,6 +1107,10 @@ class tast(test.test):
# (preceding the Unix epoch) if it didn't report completion.
test_finished = end_time > 0
+ # Avoid reporting tests that were skipped.
+ if test_skipped and not test_reported_errors:
+ return
+
# Look for magic error _TEST_DID_NOT_RUN_MSG and mark test as not run.
for err in test.get(_KEY_ERRORS) or []:
if err[_KEY_REASON] == self._TEST_DID_NOT_RUN_MSG:
@@ -1121,10 +1123,6 @@ class tast(test.test):
self._log_test_event(self._JOB_STATUS_NOSTATUS, name, end_time,
test[_KEY_MISSING_REASON])
end_status = self._JOB_STATUS_END_NOSTATUS
- elif test_skipped and not test_reported_errors:
- self._log_test_event(self._JOB_STATUS_SKIP, name, end_time,
- test.get(_KEY_SKIP_REASON))
- end_status = self._JOB_STATUS_END_SKIP
elif test_finished and not test_reported_errors:
self._log_test_event(self._JOB_STATUS_GOOD, name, end_time)
end_status = self._JOB_STATUS_END_GOOD
diff --git a/server/site_tests/tast/tast_unittest.py b/server/site_tests/tast/tast_unittest.py
index f4de7c6bfc..d7f3ec244d 100755
--- a/server/site_tests/tast/tast_unittest.py
+++ b/server/site_tests/tast/tast_unittest.py
@@ -373,11 +373,9 @@ class TastTest(unittest.TestCase):
status_string(self._job.status_entries))
def testSkippedTest(self):
- """Tests that skipped tests are reported correctly."""
- tests = [
- TestInfo('pkg.Normal', 0, 1),
- TestInfo('pkg.Skipped', 2, 3, skip_reason='missing deps')
- ]
+ """Tests that skipped tests aren't reported."""
+ tests = [TestInfo('pkg.Normal', 0, 1),
+ TestInfo('pkg.Skipped', 2, 2, skip_reason='missing deps')]
self._init_tast_commands(tests)
self._run_test()
self.assertEqual(status_string(get_status_entries_from_tests(tests)),
@@ -919,6 +917,10 @@ class TestInfo:
run error was encountered.
@return: List of Autotest base_job.status_log_entry objects.
"""
+ # Deliberately-skipped tests shouldn't have status entries unless errors
+ # were also reported.
+ if self._skip_reason and not self._errors:
+ return []
def make(status_code, dt, msg=''):
"""Makes a base_job.status_log_entry.
@@ -947,12 +949,6 @@ class TestInfo:
entries.append(make(tast.tast._JOB_STATUS_NOSTATUS, None, reason))
entries.append(make(tast.tast._JOB_STATUS_END_NOSTATUS, None))
- elif self._end_time and self._skip_reason and not self._errors:
- entries.append(
- make(tast.tast._JOB_STATUS_SKIP, self._end_time,
- self._skip_reason))
- entries.append(make(tast.tast._JOB_STATUS_END_SKIP,
- self._end_time))
elif self._end_time and not self._errors:
entries.append(make(tast.tast._JOB_STATUS_GOOD, self._end_time))
entries.append(make(tast.tast._JOB_STATUS_END_GOOD, self._end_time))