Index: buildbot/buildbot_spec2k.sh |
=================================================================== |
--- buildbot/buildbot_spec2k.sh (revision 6231) |
+++ buildbot/buildbot_spec2k.sh (working copy) |
@@ -17,56 +17,25 @@ |
SPEC_HARNESS=${SPEC_HARNESS:-${HOME}/cpu2000-redhat64-ia32}/ |
UTMAN=tools/llvm/utman.sh |
-# Rough test running time classification for ARM which is our bottleneck |
-FAST_ARM="176.gcc 181.mcf 197.parser 254.gap" |
-MEDIUM_ARM="164.gzip 175.vpr 179.art 186.crafty 252.eon \ |
- 256.bzip2 255.vortex 300.twolf" |
-SLOW_ARM="177.mesa 183.equake 188.ammp 253.perlbmk" |
+TRYBOT_TESTS="176.gcc 179.art 181.mcf 197.parser 252.eon 254.gap" |
+TRYBOT_TRANSLATOR_TESTS="176.gcc" |
SPEC_BASE="tests/spec2k" |
-TestsToBuild() { |
- local setup=$1 |
- case ${setup} in |
- SetupPnaclArmOpt) |
- # we expect arm to diverge |
- echo ${FAST_ARM} 252.eon 179.art |
- ;; |
- SetupPnaclTranslator*) |
- echo 176.gcc |
- ;; |
- *) |
- echo ${FAST_ARM} 252.eon 179.art |
- ;; |
- esac |
-} |
+RETCODE=0 |
-TestsToRun() { |
- local setup=$1 |
- case ${setup} in |
- SetupPnaclArmOpt) |
- # we expect arm to diverge |
- echo ${FAST_ARM} 252.eon 179.art |
- ;; |
- SetupPnaclTranslator*) |
- echo 176.gcc |
- ;; |
- *) |
- echo ${FAST_ARM} 252.eon 179.art |
- ;; |
- esac |
-} |
- |
###################################################################### |
# SCRIPT ACTION |
###################################################################### |
clobber() { |
- echo "@@@BUILD_STEP clobber@@@" |
- rm -rf scons-out toolchain |
+ if [ "${CLOBBER}" == "yes" ] ; then |
+ echo "@@@BUILD_STEP clobber@@@" |
+ rm -rf scons-out toolchain |
- echo "@@@BUILD_STEP gclient_runhooks@@@" |
- gclient runhooks --force |
+ echo "@@@BUILD_STEP gclient_runhooks@@@" |
+ gclient runhooks --force |
+ fi |
} |
basic-setup-nacl() { |
@@ -108,33 +77,32 @@ |
} |
build-and-run-some() { |
- local harness=$1 |
- local setups=$2 |
+ local setups="$1" |
+ local tests="$2" |
pushd ${SPEC_BASE} |
for setup in ${setups}; do |
echo "@@@BUILD_STEP spec2k build [${setup}] [train-some]@@@" |
./run_all.sh CleanBenchmarks |
- ./run_all.sh PopulateFromSpecHarness ${harness} |
+ ./run_all.sh PopulateFromSpecHarness "${SPEC_HARNESS}" |
MAKEOPTS=-j8 \ |
- ./run_all.sh BuildBenchmarks 0 ${setup} $(TestsToBuild ${setup}) |
+ ./run_all.sh BuildBenchmarks 0 ${setup} ${tests} |
echo "@@@BUILD_STEP spec2k run [${setup}] [train-some]@@@" |
- ./run_all.sh RunBenchmarks ${setup} train $(TestsToRun ${setup}) || \ |
+ ./run_all.sh RunBenchmarks ${setup} train ${tests} || \ |
{ RETCODE=$? && echo "@@@STEP_FAILURE@@@"; } |
done |
popd |
} |
-build-and-run-all-timed() { |
- local harness=$1 |
- local setups=$2 |
+build-and-run-all() { |
+ local setups="$1" |
pushd ${SPEC_BASE} |
for setup in ${setups}; do |
echo "@@@BUILD_STEP spec2k build [${setup}] [train]@@@" |
./run_all.sh CleanBenchmarks |
- ./run_all.sh PopulateFromSpecHarness ${harness} |
+ ./run_all.sh PopulateFromSpecHarness "${SPEC_HARNESS}" |
MAKEOPTS=-j8 \ |
./run_all.sh BuildBenchmarks 1 ${setup} train |
@@ -151,90 +119,73 @@ |
###################################################################### |
# NOTE: trybots only runs a subset of the the spec2k tests |
# TODO: elminate this long running bot in favor per arch sharded bots |
-mode-spec-pnacl-trybot() { |
+pnacl-trybot() { |
clobber |
basic-setup-pnacl "arm x86-64 x86-32" |
- build-and-run-some ${SPEC_HARNESS} "SetupPnaclArmOpt \ |
- SetupPnaclX8632Opt \ |
- SetupPnaclX8664Opt \ |
- SetupPnaclTranslatorX8632Opt \ |
- SetupPnaclTranslatorX8664Opt" |
+ build-and-run-some SetupPnaclArmOpt "${TRYBOT_TESTS}" |
+ build-and-run-some SetupPnaclX8632Opt "${TRYBOT_TESTS}" |
+ build-and-run-some SetupPnaclX8664Opt "${TRYBOT_TESTS}" |
+ build-and-run-some SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" |
+ build-and-run-some SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" |
} |
-mode-spec-pnacl-trybot-arm() { |
+pnacl-trybot-arm() { |
clobber |
basic-setup-pnacl "arm" |
- build-and-run-some ${SPEC_HARNESS} "SetupPnaclArmOpt" |
+ build-and-run-some SetupPnaclArmOpt "${TRYBOT_TESTS}" |
} |
-mode-spec-pnacl-trybot-x8632() { |
+pnacl-trybot-x8632() { |
clobber |
basic-setup-pnacl "x86-32" |
- build-and-run-some ${SPEC_HARNESS} "SetupPnaclX8632Opt \ |
- SetupPnaclTranslatorX8632Opt" |
+ build-and-run-some SetupPnaclX8632Opt "${TRYBOT_TESTS}" |
+ build-and-run-some SetupPnaclTranslatorX8632Opt "${TRYBOT_TRANSLATOR_TESTS}" |
} |
-mode-spec-pnacl-trybot-x8664() { |
+pnacl-trybot-x8664() { |
clobber |
basic-setup-pnacl "x86-64" |
- build-and-run-some ${SPEC_HARNESS} "SetupPnaclX8664Opt \ |
- SetupPnaclTranslatorX8664Opt" |
+ build-and-run-some SetupPnaclX8664Opt "${TRYBOT_TESTS}" |
+ build-and-run-some SetupPnaclTranslatorX8664Opt "${TRYBOT_TRANSLATOR_TESTS}" |
} |
- |
-mode-spec-pnacl-arm() { |
+pnacl-arm() { |
clobber |
basic-setup-pnacl "arm" |
# arm takes a long time and we do not have sandboxed tests working |
- build-and-run-all-timed ${SPEC_HARNESS} "SetupPnaclArmOpt" |
+ build-and-run-all "SetupPnaclArmOpt" |
} |
-mode-spec-pnacl-x8664() { |
+pnacl-x8664() { |
clobber |
basic-setup-pnacl "x86-64" |
- build-and-run-all-timed ${SPEC_HARNESS} \ |
- "SetupPnaclX8664 \ |
- SetupPnaclX8664Opt \ |
- SetupPnaclTranslatorX8664 \ |
- SetupPnaclTranslatorX8664Opt" |
+ build-and-run-all "SetupPnaclX8664 \ |
+ SetupPnaclX8664Opt \ |
+ SetupPnaclTranslatorX8664 \ |
+ SetupPnaclTranslatorX8664Opt" |
} |
-mode-spec-pnacl-x8632() { |
+pnacl-x8632() { |
clobber |
basic-setup-pnacl "x86-32" |
- build-and-run-all-timed ${SPEC_HARNESS} \ |
- "SetupPnaclX8632 \ |
- SetupPnaclX8632Opt \ |
- SetupPnaclTranslatorX8632 \ |
- SetupPnaclTranslatorX8632Opt" |
+ build-and-run-all "SetupPnaclX8632 \ |
+ SetupPnaclX8632Opt \ |
+ SetupPnaclTranslatorX8632 \ |
+ SetupPnaclTranslatorX8632Opt" |
} |
-# scheduled to be obsolete |
-# TODO(robertm): delete this target |
-mode-spec-nacl() { |
+nacl-x8632() { |
clobber |
- basic-setup-nacl "x86-32 x86-64" |
- build-and-run-all-timed ${SPEC_HARNESS} \ |
- "SetupNaclX8664 \ |
- SetupNaclX8664Opt \ |
- SetupNaclX8632 \ |
- SetupNaclX8632Opt" |
-} |
- |
-mode-spec-nacl-x8632() { |
- clobber |
basic-setup-nacl "x86-32" |
- build-and-run-all-timed ${SPEC_HARNESS} \ |
- "SetupNaclX8632 \ |
- SetupNaclX8632Opt" |
+ build-and-run-all "SetupNaclX8632 \ |
+ SetupNaclX8632Opt" |
} |
-mode-spec-nacl-x8664() { |
+nacl-x8664() { |
clobber |
basic-setup-nacl "x86-64" |
- build-and-run-all-timed ${SPEC_HARNESS} \ |
- "SetupNaclX8664 \ |
- SetupNaclX8664Opt" |
+ build-and-run-all "SetupNaclX8664 \ |
+ SetupNaclX8664Opt" |
} |
@@ -258,5 +209,11 @@ |
exit 1 |
fi |
-eval "$@" |
+"$@" |
+if [[ ${RETCODE} != 0 ]]; then |
+ echo "@@@BUILD_STEP summary@@@" |
+ echo There were failed stages. |
+ exit ${RETCODE} |
+fi |
+ |