2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
10 # Tell build.sh and test.sh that we're a bot.
11 export PNACL_BUILDBOT=true
12 # Make TC bots print all log output to console (this variable only affects
14 export PNACL_VERBOSE=true
16 # This affects trusted components of gyp and scons builds.
17 # The setting OPT reuslts in optimized/release trusted executables,
18 # the setting DEBUG results in unoptimized/debug trusted executables
20 # If true, terminate script when first scons error is encountered.
21 FAIL_FAST=${FAIL_FAST:-true}
22 # This remembers when any build steps failed, but we ended up continuing.
24 # For scons builds an empty target indicates all targets should be built.
25 # This does not run any tests, though.
26 # Large tests are not included in this group because they cannot be run
27 # in parallel (they can do things like bind to local TCP ports). Large
28 # tests are run separately in the functions below.
29 readonly SCONS_EVERYTHING=""
30 readonly SCONS_S_M="small_tests medium_tests"
31 readonly SCONS_S_M_IRT="small_tests_irt medium_tests_irt"
32 # subset of tests used on toolchain builders
33 readonly SCONS_TC_TESTS="small_tests medium_tests"
35 readonly SCONS_COMMON="./scons --verbose bitcode=1"
36 readonly UP_DOWN_LOAD="buildbot/file_up_down_load.sh"
37 # This script is used by toolchain bots (i.e. tc-xxx functions)
38 readonly PNACL_BUILD="pnacl/build.sh"
39 readonly LLVM_TEST="pnacl/scripts/llvm-test.py"
40 readonly DRIVER_TESTS="pnacl/driver/tests/driver_tests.py"
41 readonly ACCEPTABLE_TOOLCHAIN_SIZE_MB=55
44 echo "@@@BUILD_STEP goma_setup@@@"
45 if /b/build/goma/goma_ctl.sh ensure_start ; then
46 PATH=/b/build/goma:$PATH
47 export PNACL_CONCURRENCY_HOST=100
49 # For now, don't make the bot go red if goma fails to start, just fall back
50 echo "@@@STEP_WARNINGS@@@"
56 local clobber_translators=$2
58 echo @@@BUILD_STEP tc_clobber@@@
59 rm -rf toolchain/${label}
60 rm -rf toolchain/test-log
61 rm -rf pnacl*.tgz pnacl/pnacl*.tgz
62 if ${clobber_translators} ; then
63 rm -rf toolchain/pnacl_translator
68 echo @@@BUILD_STEP show_config@@@
69 ${PNACL_BUILD} show-config
72 tc-compile-toolchain() {
74 echo @@@BUILD_STEP compile_toolchain@@@
76 ${PNACL_BUILD} sync-sources
77 ${PNACL_BUILD} checkout-git-bundles-for-trybot
79 HOST_ARCH=x86_32 ${PNACL_BUILD} build-all
80 HOST_ARCH=x86_64 ${PNACL_BUILD} build-host
81 HOST_ARCH=x86_64 ${PNACL_BUILD} driver
83 ${PNACL_BUILD} build-all
85 ${PNACL_BUILD} tarball pnacl-toolchain.tgz
86 chmod a+r pnacl-toolchain.tgz
89 local byte_size=$(wc -c < pnacl-toolchain.tgz)
90 local max_size=$((1024 * 1024 * ${ACCEPTABLE_TOOLCHAIN_SIZE_MB}))
92 # Allow an extra 33% tarball size for fat toolchains
93 max_size=$((1024 * 1024 * ${ACCEPTABLE_TOOLCHAIN_SIZE_MB} * 4 / 3))
96 if [[ ${byte_size} -gt ${max_size} ]] ; then
97 echo "ERROR: toolchain tarball is too large: ${byte_size} > ${max_size}"
102 tc-untar-toolchain() {
104 echo @@@BUILD_STEP untar_toolchain@@@
105 # Untar to ensure we can and to place the toolchain where the main build
107 rm -rf toolchain/${label}
108 mkdir -p toolchain/${label}
109 pushd toolchain/${label}
110 tar xfz ../../pnacl-toolchain.tgz
114 tc-build-translator() {
115 echo @@@BUILD_STEP compile_translator@@@
116 ${PNACL_BUILD} translator-clean-all
117 ${PNACL_BUILD} translator-all
122 echo @@@BUILD_STEP archive_toolchain@@@
123 ${UP_DOWN_LOAD} UploadPnaclToolchains ${BUILDBOT_GOT_REVISION} \
124 ${label} pnacl-toolchain.tgz
127 tc-archive-translator-pexes() {
128 echo @@@BUILD_STEP archive_translator_pexe@@@
129 # NOTE: the build script needs an absolute pathname
130 local tarball="$(pwd)/pnacl-translator-pexe.tar.bz2"
131 ${PNACL_BUILD} translator-archive-pexes ${tarball}
132 ${UP_DOWN_LOAD} UploadArchivedPexesTranslator \
133 ${BUILDBOT_GOT_REVISION} ${tarball}
136 tc-prune-translator-pexes() {
137 echo @@@BUILD_STEP prune_translator_pexe@@@
138 ${PNACL_BUILD} translator-prune
141 tc-archive-translator() {
142 echo @@@BUILD_STEP archive_translator@@@
143 ${PNACL_BUILD} translator-tarball pnacl-translator.tgz
144 ${UP_DOWN_LOAD} UploadPnaclToolchains ${BUILDBOT_GOT_REVISION} \
145 pnacl_translator pnacl-translator.tgz
151 local build_translator=$3
153 # Tell build.sh and test.sh that we're a bot.
154 export PNACL_BUILDBOT=true
155 # Tells build.sh to prune the install directory (for release).
156 export PNACL_PRUNE=true
159 tc-clobber ${label} ${build_translator}
161 # Run checkdeps so that the PNaCl toolchain trybots catch mistakes
162 # that would cause the normal NaCl bots to fail.
163 echo "@@@BUILD_STEP checkdeps @@@"
164 python tools/checkdeps/checkdeps.py
167 # For now only linux64 (which also builds the translator) builds a fat
168 # toolchain, so just use build_translator to control fat toolchain build
169 tc-compile-toolchain ${build_translator}
170 tc-untar-toolchain ${label}
171 if ! ${is_try} ; then
175 # NOTE: only one bot needs to do this
176 if ${build_translator} ; then
178 if ! ${is_try} ; then
179 tc-archive-translator-pexes
180 tc-prune-translator-pexes
181 tc-archive-translator
188 # extract the relevant scons flags for reporting
192 use_sandboxed_translator=1)
198 pnacl_generate_pexe=0)
211 # called when a scons invocation fails
214 echo "@@@STEP_FAILURE@@@"
215 if ${FAIL_FAST} ; then
216 echo "FAIL_FAST enabled"
221 # Clear out object, and temporary directories.
223 echo "@@@BUILD_STEP clobber@@@"
224 rm -rf scons-out ../xcodebuild ../out
227 # Generate filenames for arm bot uploads and downloads
229 echo -n "${BUILDBOT_BUILDERNAME}/${BUILDBOT_GOT_REVISION}"
232 NAME_ARM_DOWNLOAD() {
233 echo -n "${BUILDBOT_TRIGGERED_BY_BUILDERNAME}/${BUILDBOT_GOT_REVISION}"
236 NAME_ARM_TRY_UPLOAD() {
237 echo -n "${BUILDBOT_BUILDERNAME}/"
238 echo -n "${BUILDBOT_SLAVENAME}/"
239 echo -n "${BUILDBOT_BUILDNUMBER}"
241 NAME_ARM_TRY_DOWNLOAD() {
242 echo -n "${BUILDBOT_TRIGGERED_BY_BUILDERNAME}/"
243 echo -n "${BUILDBOT_TRIGGERED_BY_SLAVENAME}/"
244 echo -n "${BUILDBOT_TRIGGERED_BY_BUILDNUMBER}"
250 \( -name '*.o' -o -name '*.bc' -o -name 'test_results' \) \
251 -print0 | xargs -0 rm -rf
254 # Tar up the executables which are shipped to the arm HW bots
255 archive-for-hw-bots() {
259 echo "@@@BUILD_STEP tar_generated_binaries@@@"
262 # delete nexes from pexe mode directories to force translation
263 # TODO(dschuff) enable this once we can translate on the hw bots
264 #find scons-out/*pexe*/ -name '*.nexe' -print0 | xargs -0 rm -f
265 tar cvfz arm-scons.tgz scons-out/*arm*
267 echo "@@@BUILD_STEP archive_binaries@@@"
268 if [[ ${try} == "try" ]] ; then
269 ${UP_DOWN_LOAD} UploadArmBinariesForHWBotsTry ${name} arm-scons.tgz
271 ${UP_DOWN_LOAD} UploadArmBinariesForHWBots ${name} arm-scons.tgz
275 # Untar archived executables for HW bots
276 unarchive-for-hw-bots() {
280 echo "@@@BUILD_STEP fetch_binaries@@@"
281 if [[ ${try} == "try" ]] ; then
282 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz
284 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz
287 echo "@@@BUILD_STEP untar_binaries@@@"
289 tar xvfz arm-scons.tgz --no-same-owner
292 # Build with gyp - this only exercises the trusted TC and hence this only
293 # makes sense to run for ARM.
295 local gypmode="Release"
296 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
299 local toolchain_dir=native_client/toolchain/linux_arm-trusted
300 local extra="-isystem ${toolchain_dir}/usr/include \
301 -Wl,-rpath-link=${toolchain_dir}/lib/arm-linux-gnueabi \
302 -L${toolchain_dir}/lib \
303 -L${toolchain_dir}/lib/arm-linux-gnueabi \
304 -L${toolchain_dir}/usr/lib \
305 -L${toolchain_dir}/usr/lib/arm-linux-gnueabi"
306 # Setup environment for arm.
308 export AR=arm-linux-gnueabi-ar
309 export AS=arm-linux-gnueabi-as
310 export CC="arm-linux-gnueabi-gcc-4.5 ${extra} "
311 export CXX="arm-linux-gnueabi-g++-4.5 ${extra} "
312 export LD="arm-linux-gnueabi-g++-4.5 ${extra} "
313 export RANLIB=arm-linux-gnueabi-ranlib
315 export GYP_DEFINES="target_arch=arm \
316 sysroot=${toolchain_dir} \
317 linux_use_tcmalloc=0 armv7=1 arm_thumb=1"
318 export GYP_GENERATORS=make
320 # NOTE: this step is also run implicitly as part of
321 # gclient runhooks --force
322 # it uses the exported env vars so we have to run it again
324 echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
326 native_client/build/gyp_nacl native_client/build/all.gyp
329 echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
330 make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
333 build-sbtc-prerequisites() {
335 # Sandboxed translators currently only require irt_core since they do not
337 ${SCONS_COMMON} platform=${platform} sel_ldr sel_universal irt_core
340 # Run a single invocation of scons as its own buildbot stage and handle errors
345 local info="$(relevant ${extra})"
346 # TODO(robertm): do we really need both nacl and nacl_irt_test
347 local mode="--mode=opt-host,nacl,nacl_irt_test"
348 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
349 mode="--mode=dbg-host,nacl,nacl_irt_test"
352 echo "@@@BUILD_STEP scons-irt [${platform}] [${test}] [${info}]@@@"
353 ${SCONS_COMMON} ${extra} ${mode} platform=${platform} ${test} || handle-error
356 # Run a single invocation of scons as its own buildbot stage and handle errors
357 scons-stage-noirt() {
361 local info="$(relevant ${extra})"
362 local mode="--mode=opt-host,nacl"
363 if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
364 mode="--mode=dbg-host,nacl"
367 echo "@@@BUILD_STEP scons [${platform}] [${test}] [${info}]@@@"
368 ${SCONS_COMMON} ${extra} ${mode} platform=${platform} ${test} || handle-error
372 echo "@@@BUILD_STEP llvm_regression@@@"
373 ${LLVM_TEST} --llvm-regression --check-excludes || handle-error
376 # This function is shared between x86-32 and x86-64. All building and testing
377 # is done on the same bot. Try runs are identical to buildbot runs
379 # Note: unlike its arm counterparts we do not run trusted tests on these bots.
380 # Trusted tests get plenty of coverage by other bots, e.g. nacl-gcc bots.
381 # We make the assumption here that there are no "exotic tests" which
382 # are trusted in nature but are somehow depedent on the untrusted TC.
383 mode-buildbot-x86() {
388 local flags_build="skip_trusted_tests=1 -k -j8 do_not_run_tests=1"
389 local flags_run="skip_trusted_tests=1 -k -j4"
390 # Normal pexe tests. Build all targets, then run (-j4 is a compromise to try
391 # to reduce cycle times without making output too difficult to follow)
392 # We also intentionally build more than we run for "coverage".
393 # specifying "" as the target which means "build everything"
395 scons-stage-noirt "${arch}" "${flags_build}" "${SCONS_EVERYTHING}"
396 scons-stage-noirt "${arch}" "${flags_run}" "${SCONS_S_M}"
397 # Large tests cannot be run in parallel
398 scons-stage-noirt "${arch}" "${flags_run} -j1" "large_tests"
400 # non-pexe tests (Do the build-everything step just to make sure it all still
401 # builds as non-pexe)
402 scons-stage-noirt "${arch}" "${flags_build} pnacl_generate_pexe=0" \
403 "${SCONS_EVERYTHING}"
404 scons-stage-noirt "${arch}" "${flags_run} pnacl_generate_pexe=0" \
407 # also run some tests with the irt
408 scons-stage-irt "${arch}" "${flags_run}" "${SCONS_S_M_IRT}"
410 # sandboxed translation
411 build-sbtc-prerequisites ${arch}
412 scons-stage-irt "${arch}" "${flags_build} use_sandboxed_translator=1" \
413 "${SCONS_EVERYTHING}"
414 scons-stage-irt "${arch}" "${flags_run} use_sandboxed_translator=1" \
416 scons-stage-irt "${arch}" \
417 "${flags_run} use_sandboxed_translator=1 translate_fast=1" \
420 # translator memory consumption regression test
421 scons-stage-irt "${arch}" "${flags_run} use_sandboxed_translator=1" \
425 # QEMU upload bot runs this function, and the hardware download bot runs
426 # mode-buildbot-arm-hw
427 mode-buildbot-arm() {
429 # "force_emulator=" disables use of QEMU, which enables building
430 # tests which don't work under QEMU.
431 local qemuflags="-j8 -k do_not_run_tests=1 force_emulator="
438 scons-stage-noirt "arm" "-j8" "run_hello_world_test"
440 # Don't run the rest of the tests on qemu, only build them.
441 # QEMU is too flaky for the main waterfall
443 # Normal pexe mode tests
444 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}"
445 # This extra step is required to translate the pexes (because translation
446 # happens as part of CommandSelLdrTestNacl and not part of the
447 # build-everything step)
448 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_S_M}"
449 # Large tests cannot be run in parallel
450 scons-stage-noirt "arm" "${qemuflags} -j1" "large_tests"
452 # also run some tests with the irt
453 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}"
455 # non-pexe-mode tests
456 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
458 build-sbtc-prerequisites "arm"
460 scons-stage-irt "arm" \
461 "${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \
463 scons-stage-irt "arm" \
464 "${qemuflags} use_sandboxed_translator=1 translate_fast=1 \
465 translate_in_build_step=0" \
469 mode-buildbot-arm-hw() {
471 local hwflags="-j2 -k naclsdk_validate=0 built_elsewhere=1"
473 scons-stage-noirt "arm" "${hwflags}" "${SCONS_S_M}"
474 # Large tests cannot be run in parallel
475 scons-stage-noirt "arm" "${hwflags} -j1" "large_tests"
477 # also run some tests with the irt
478 scons-stage-irt "arm" "${hwflags}" "${SCONS_S_M_IRT}"
480 scons-stage-noirt "arm" "${hwflags} pnacl_generate_pexe=0" "nonpexe_tests"
481 scons-stage-irt "arm" \
482 "${hwflags} use_sandboxed_translator=1 translate_in_build_step=0" \
484 scons-stage-irt "arm" \
485 "${hwflags} use_sandboxed_translator=1 translate_fast=1 \
486 translate_in_build_step=0" \
491 # Build and actually run the arm tests under qemu, except
492 # sandboxed translation. Hopefully that's a good tradeoff between
493 # flakiness and cycle time.
495 local qemuflags="-j4 -k"
499 scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}"
500 # Large tests cannot be run in parallel
501 scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests"
503 # also run some tests with the irt
504 scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}"
507 scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
510 mode-buildbot-arm-dbg() {
511 BUILD_MODE_HOST=DEDUG
513 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
516 mode-buildbot-arm-opt() {
518 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
521 mode-buildbot-arm-try() {
523 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try
526 # NOTE: the hw bots are too slow to build stuff on so we just
527 # use pre-built executables
528 mode-buildbot-arm-hw-dbg() {
529 BUILD_MODE_HOST=DEDUG
530 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular
534 mode-buildbot-arm-hw-opt() {
535 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular
539 mode-buildbot-arm-hw-try() {
540 unarchive-for-hw-bots $(NAME_ARM_TRY_DOWNLOAD) try
544 # These 2 functions are also suitable for local TC sanity testing.
548 local label="pnaclsdk_mode=custom:toolchain/${PNACL_TOOLCHAIN_LABEL}"
549 local scons_flags="-k skip_trusted_tests=1 -j8 ${label}"
554 for arch in x86-32 x86-64 arm; do
555 ${DRIVER_TESTS} --platform="$arch"
556 scons-stage-noirt "$arch" "${scons_flags}" "${SCONS_TC_TESTS}"
557 # Large tests cannot be run in parallel
558 scons-stage-noirt "$arch" "${scons_flags} -j1" "large_tests"
559 scons-stage-noirt "$arch" "${scons_flags} pnacl_generate_pexe=0" \
563 # Small set of sbtc tests w/ and without translate_fast=1.
564 scons-stage-irt "x86-32" "${scons_flags} use_sandboxed_translator=1" \
566 scons-stage-irt "x86-32" \
567 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
569 scons-stage-irt "x86-64" "${scons_flags} use_sandboxed_translator=1" \
571 scons-stage-irt "x86-64" \
572 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
574 # Smaller set of sbtc tests for ARM because qemu is flaky.
575 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \
576 "run_hello_world_test"
577 scons-stage-irt "arm" \
578 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
579 "run_hello_world_test"
581 # Run the GCC torture tests just for x86-32. Testing a single
582 # architecture gives good coverage without taking too long. We
583 # don't test x86-64 here because some of the torture tests fail on
584 # the x86-64 toolchain trybot (though not the buildbots, apparently
585 # due to a hardware difference:
586 # https://code.google.com/p/nativeclient/issues/detail?id=3697).
587 echo "@@@BUILD_STEP torture_tests x86-32 @@@"
588 tools/toolchain_tester/torture_test.py pnacl x86-32 --verbose \
589 --concurrency=8 || handle-error
594 local scons_flags="-j8 -k skip_trusted_tests=1"
597 ${DRIVER_TESTS} --platform="$arch"
599 scons-stage-noirt "${arch}" "${scons_flags}" "${SCONS_TC_TESTS}"
600 # Large tests cannot be run in parallel
601 scons-stage-noirt "${arch}" "-j1 -k skip_trusted_tests=1" "large_tests"
602 scons-stage-noirt "${arch}" "${scons_flags} pnacl_generate_pexe=0" \
606 mode-buildbot-tc-x8664-linux() {
610 export PNACL_TOOLCHAIN_LABEL=pnacl_linux_x86
611 tc-build-all ${PNACL_TOOLCHAIN_LABEL} ${is_try} true
612 tc-tests-all ${is_try}
615 mode-buildbot-tc-x8632-linux() {
619 export PNACL_TOOLCHAIN_LABEL=pnacl_linux_x86
620 # For now, just use this bot to test a pure 32 bit build but don't upload
621 tc-build-all ${PNACL_TOOLCHAIN_LABEL} true false
622 tc-tests-fast "x86-32"
624 echo "@@@BUILD_STEP test unsandboxed mode@@@"
625 # Test translation to an unsandboxed executable.
626 # TODO(mseaborn): Run more tests here when they pass.
627 ./scons bitcode=1 pnacl_unsandboxed=1 \
628 --mode=nacl_irt_test platform=x86-32 -j8 \
629 run_hello_world_test_irt \
630 run_irt_futex_test_irt \
631 run_thread_test_irt \
633 run_malloc_realloc_calloc_free_test_irt \
635 run_cond_timedwait_test_irt
638 mode-buildbot-tc-x8632-mac() {
641 export PNACL_TOOLCHAIN_LABEL=pnacl_mac_x86
642 # We can't test ARM because we do not have QEMU for Mac.
643 # We can't test X86-64 because NaCl X86-64 Mac support is not in good shape.
644 tc-build-all ${PNACL_TOOLCHAIN_LABEL} ${is_try} false
645 tc-tests-fast "x86-32"
648 mode-buildbot-tc-x8664-win() {
651 # NOTE: this is a 64bit bot but the TC generated is 32bit
652 export PNACL_TOOLCHAIN_LABEL=pnacl_win_x86
653 tc-build-all ${PNACL_TOOLCHAIN_LABEL} ${is_try} false
655 # We can't test ARM because we do not have QEMU for Win.
656 tc-tests-fast "x86-64"
666 # NOTE: clobber and toolchain setup to be done manually, since this is for
667 # testing a locally built toolchain.
668 # This runs tests concurrently, so may be more difficult to parse logs.
672 # turn verbose mode off
676 ${DRIVER_TESTS} --platform=x86-32
677 ${DRIVER_TESTS} --platform=x86-64
678 ${DRIVER_TESTS} --platform=arm
680 # At least clobber scons-out before building and running the tests though.
681 echo "@@@BUILD_STEP clobber@@@"
684 # First build everything.
685 echo "@@@BUILD_STEP scons build @@@"
686 local scons_flags="skip_trusted_tests=1 -j${concur}"
687 scons-stage-noirt "arm" "${scons_flags}" "${SCONS_EVERYTHING}"
688 scons-stage-noirt "x86-32" "${scons_flags}" "${SCONS_EVERYTHING}"
689 scons-stage-noirt "x86-64" "${scons_flags}" "${SCONS_EVERYTHING}"
690 # Then run the tests. smoke_tests can be run in parallel but not large_tests
691 echo "@@@BUILD_STEP scons smoke_tests @@@"
692 scons-stage-noirt "arm" "${scons_flags}" "smoke_tests"
693 scons-stage-noirt "arm" "${scons_flags} -j1" "large_tests"
694 scons-stage-noirt "x86-32" "${scons_flags}" "smoke_tests"
695 scons-stage-noirt "x86-32" "${scons_flags} -j1" "large_tests"
696 scons-stage-noirt "x86-64" "${scons_flags}" "smoke_tests"
697 scons-stage-noirt "x86-64" "${scons_flags} -j1" "large_tests"
698 # Do some sandboxed translator tests as well.
699 scons-stage-irt "x86-32" "${scons_flags} use_sandboxed_translator=1" \
701 scons-stage-irt "x86-32" \
702 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
704 scons-stage-irt "x86-64" "${scons_flags} use_sandboxed_translator=1" \
706 scons-stage-irt "x86-64" \
707 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
709 # Smaller set of sbtc tests for ARM because qemu is flaky.
710 scons-stage-irt "arm" "${scons_flags} use_sandboxed_translator=1" \
711 "run_hello_world_test"
712 scons-stage-irt "arm" \
713 "${scons_flags} use_sandboxed_translator=1 translate_fast=1" \
714 "run_hello_world_test"
718 echo "TODO(pdox): Add GlibC tests"
721 ######################################################################
722 # On Windows, this script is invoked from a batch file.
723 # The inherited PWD environmental variable is a Windows-style path.
724 # This can cause problems with pwd and bash. This line fixes it.
727 # Script assumed to be run in native_client/
728 if [[ $(pwd) != */native_client ]]; then
729 echo "ERROR: must be run in native_client!"
734 if [[ $# -eq 0 ]] ; then
735 echo "you must specify a mode on the commandline:"
739 if [ "$(type -t $1)" != "function" ]; then
741 echo "ERROR: unknown mode '$1'." >&2
747 if [[ ${RETCODE} != 0 ]]; then
748 echo "@@@BUILD_STEP summary@@@"
749 echo There were failed stages.