Added --local option to test_all.sh.

This commit is contained in:
Alan Jeffrey 2016-08-19 14:00:58 -05:00
parent 2857dbabbe
commit f81e32e334

View file

@ -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