Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | |
michael@0 | 3 | MODE=compare |
michael@0 | 4 | if [[ "$1" == "--seq" ]]; then |
michael@0 | 5 | MODE=seq |
michael@0 | 6 | shift |
michael@0 | 7 | elif [[ "$1" == "--par" ]]; then |
michael@0 | 8 | MODE=par |
michael@0 | 9 | shift |
michael@0 | 10 | fi |
michael@0 | 11 | |
michael@0 | 12 | if [[ -z "$1" ]] || [[ "$1" == "--help" ]]; then |
michael@0 | 13 | echo "Usage: run.sh [--seq | --par] path-to-shell paths-to-test" |
michael@0 | 14 | echo "" |
michael@0 | 15 | echo "Runs the given benchmark(s) using the given shell and " |
michael@0 | 16 | echo "prints the results. If -seq or -par is supplied, " |
michael@0 | 17 | echo "only runs sequentially or in parallel. Otherwise, runs both" |
michael@0 | 18 | echo "and compares the performance." |
michael@0 | 19 | fi |
michael@0 | 20 | |
michael@0 | 21 | D="$(dirname $0)" |
michael@0 | 22 | S="$1" |
michael@0 | 23 | shift |
michael@0 | 24 | for T in "$@"; do |
michael@0 | 25 | echo "$S" --ion-parallel-compile=on -e "'"'var libdir="'$D'/"; var MODE="'$MODE'";'"'" "$T" |
michael@0 | 26 | "$S" --ion-parallel-compile=on -e 'var libdir="'$D'/"; var MODE="'$MODE'";' "$T" |
michael@0 | 27 | done |