summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorPaweł Hajdan, Jr <phajdan.jr@chromium.org>2014-11-05 16:35:51 +0100
committerPaweł Hajdan, Jr <phajdan.jr@chromium.org>2014-11-05 15:36:51 +0000
commitb0d9981737dbe92852366bf416f19dfcb978d6c6 (patch)
tree3da725d010a1fac7e79e9dc6bba40fdc099f1638 /tools/perf
parentd1e250bc34f3e17256bcbe9a5a394a641a9eb804 (diff)
downloadchromium_src-b0d9981737dbe92852366bf416f19dfcb978d6c6.zip
chromium_src-b0d9981737dbe92852366bf416f19dfcb978d6c6.tar.gz
chromium_src-b0d9981737dbe92852366bf416f19dfcb978d6c6.tar.bz2
Revert of Reland "Switch telemetry over to use typ to run the unit tests." (patchset #1 id:1 of https://codereview.chromium.org/707453002/)
Reason for revert: This seems to return with 0 exit code when tests are failing, see e.g. http://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/18/steps/telemetry_perf_unittests/logs/stdio . Previous build was correctly reporting the steps as failed (http://build.chromium.org/p/chromium.mac/buildstatus?builder=Mac10.9%20Tests%20%28dbg%29&number=17). Original issue's description: > Reland "Switch telemetry over to use typ to run the unit tests." > > Original review: https://codereview.chromium.org/659293003 > > Using typ allows us to run the tests in parallel and share > the logic for parsing the results and uploading them to the > flakiness dashboard with other python test steps. > > TBR=dtu@chromium.org, tonyg@chromium.org, nduca@chromium.org, dpranke@chromium.org > BUG=402172, 388256 > > Committed: https://chromium.googlesource.com/chromium/src/+/fc4a811ffe26653019e2213947146a721620e0fc TBR=dpranke@chromium.org,dtu@chromium.org,nduca@chromium.org,tonyg@chromium.org NOTREECHECKS=true NOTRY=true BUG=402172, 388256 Review URL: https://codereview.chromium.org/708483002 Cr-Commit-Position: refs/heads/master@{#302804}
Diffstat (limited to 'tools/perf')
-rwxr-xr-xtools/perf/run_tests23
1 files changed, 9 insertions, 14 deletions
diff --git a/tools/perf/run_tests b/tools/perf/run_tests
index 1ebfe32..6497020 100755
--- a/tools/perf/run_tests
+++ b/tools/perf/run_tests
@@ -9,22 +9,17 @@ This script DOES NOT run benchmarks. run_benchmark does that.
"""
import os
-import subprocess
import sys
+sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'telemetry'))
-if __name__ == '__main__':
- perf_dir = os.path.dirname(os.path.realpath(__file__))
- telemetry_dir = os.path.realpath(os.path.join(perf_dir, '..', 'telemetry'))
+from telemetry.unittest import gtest_progress_reporter
+from telemetry.unittest import run_tests
- env = os.environ.copy()
- if 'PYTHONPATH' in env:
- env['PYTHONPATH'] = env['PYTHONPATH'] + os.pathsep + telemetry_dir
- else:
- env['PYTHONPATH'] = telemetry_dir
- path_to_run_tests = os.path.join(telemetry_dir, 'telemetry', 'unittest',
- 'run_tests.py')
- argv = ['--top-level-dir', perf_dir] + sys.argv[1:]
- sys.exit(subprocess.call([sys.executable, path_to_run_tests] + argv,
- env=env))
+if __name__ == '__main__':
+ base_dir = os.path.dirname(os.path.realpath(__file__))
+ progress_reporters = [
+ gtest_progress_reporter.GTestProgressReporter(sys.stdout)]
+ run_tests.config = run_tests.Config(base_dir, [base_dir], progress_reporters)
+ sys.exit(run_tests.RunTestsCommand.main())