diff options
author | dennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 23:23:38 +0000 |
---|---|---|
committer | dennisjeffrey@chromium.org <dennisjeffrey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 23:23:38 +0000 |
commit | cfc9467aa27aaf46c03696e05a82d4e8acac5b61 (patch) | |
tree | acf74cac8233b2d1356a4d07ed63f8500c69fee3 /chrome/test/chromeos/autotest/files/client/site_tests | |
parent | e4ef340c932ad0853aaeb3d7826ba72b5cf58da9 (diff) | |
download | chromium_src-cfc9467aa27aaf46c03696e05a82d4e8acac5b61.zip chromium_src-cfc9467aa27aaf46c03696e05a82d4e8acac5b61.tar.gz chromium_src-cfc9467aa27aaf46c03696e05a82d4e8acac5b61.tar.bz2 |
Delay failing pyauto-based autotest desktopui_PyAutoPerfTests until after perf keyvals are written.
Pyauto-based autotest desktopui_PyAutoPerfTests fails in the event that
at least one pyauto perf test fails. Previously, the autotest failed
before writing out any perf keyvals, preventing passing tests with valid
perf measurements from having their results graphed. This is now changed
so that valid perf measurements from passing tests are written as keyvals
before the autotest fails.
BUG=chromium-os:18185
TEST=None
Review URL: http://codereview.chromium.org/8113039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104022 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromeos/autotest/files/client/site_tests')
-rw-r--r-- | chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py index 1207722..14e5804 100644 --- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py +++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py @@ -112,10 +112,8 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase): stderr=subprocess.STDOUT, env=environment) output = proc.communicate()[0] print output # Ensure pyauto test output is stored in autotest logs. - if proc.returncode != 0: - raise error.TestFail( - 'Unexpected return code from pyauto_functional.py when running ' - 'with the CHROMEOS_PERF suite: %d' % proc.returncode) + + # Output perf keyvals for any perf results recorded during the tests. re_compiled = re.compile('%s(.+)%s' % (self._PERF_MARKER_PRE, self._PERF_MARKER_POST)) perf_lines = [line for line in output.split('\n') @@ -124,3 +122,11 @@ class desktopui_PyAutoPerfTests(chrome_test.ChromeTestBase): perf_dict = dict([eval(re_compiled.match(line).group(1)) for line in perf_lines]) self.write_perf_keyval(perf_dict) + + # Fail the autotest if any pyauto tests failed. This is done after + # writing perf keyvals so that any computed results from passing tests + # are still graphed. + if proc.returncode != 0: + raise error.TestFail( + 'Unexpected return code from pyauto_functional.py when running ' + 'with the CHROMEOS_PERF suite: %d' % proc.returncode) |