From f81e32e3341c3c867a2392bd37a8cb51adaa618d Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Fri, 19 Aug 2016 14:00:58 -0500 Subject: [PATCH] Added --local option to test_all.sh. --- etc/ci/performance/test_all.sh | 37 +++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/etc/ci/performance/test_all.sh b/etc/ci/performance/test_all.sh index 850a4dd1505..b82e06d71f9 100755 --- a/etc/ci/performance/test_all.sh +++ b/etc/ci/performance/test_all.sh @@ -8,19 +8,29 @@ set -o errexit set -o nounset set -o pipefail -case "${1}" in +while (( "$#" )) +do +case "$1" in --servo) engine="--engine servo" ;; --gecko) engine="--engine gecko" ;; + --local) + local=1 + ;; *) - # This branch should never be reached with set -o nounset - echo "You didn't specify the engine to run." + echo "Unknown option $1." exit ;; esac +shift +done + +if [ -z "${engine:-}" ]; +then echo "You didn't specify the engine to run: either --servo or --gecko."; exit; +fi echo "Starting the local server" python3 -m http.server > /dev/null 2>&1 & @@ -33,15 +43,18 @@ MANIFEST="page_load_test/tp5n/20160509.manifest" # A manifest that excludes PERF_FILE="output/perf-$(date --iso-8601=seconds).json" echo "Running tests" -python3 runner.py "${engine}" --runs 3 "${MANIFEST}" "${PERF_FILE}" +python3 runner.py ${engine} --runs 3 "${MANIFEST}" "${PERF_FILE}" -echo "Submitting to Perfherder" -# Perfherder SSL check will fail if time is not accurate, -# sync time before you submit -# TODO: we are using Servo's revision hash for Gecko's result to make both -# results appear on the same date. Use the correct result when Perfherder -# allows us to change the date. -python3 submit_to_perfherder.py "${engine}" "${PERF_FILE}" servo/revision.json +if [ -z "${local:-}" ]; +then + echo "Submitting to Perfherder" + # Perfherder SSL check will fail if time is not accurate, + # sync time before you submit + # TODO: we are using Servo's revision hash for Gecko's result to make both + # results appear on the same date. Use the correct result when Perfherder + # allows us to change the date. + python3 submit_to_perfherder.py "${output:-}" "${engine}" "${PERF_FILE}" servo/revision.json +fi -# Kill the http server +echo "Stopping the local server" trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT