Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: buildbot/buildbot_pnacl.sh

Issue 9824001: Change built_elsewhere flag to work with pexe mode (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: add AS, line len Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 set -o xtrace 6 set -o xtrace
7 set -o nounset 7 set -o nounset
8 set -o errexit 8 set -o errexit
9 9
10 # If true, terminate script when first scons error is encountered. 10 # If true, terminate script when first scons error is encountered.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 # Tar up the executables which are shipped to the arm HW bots 78 # Tar up the executables which are shipped to the arm HW bots
79 archive-for-hw-bots() { 79 archive-for-hw-bots() {
80 local name=$1 80 local name=$1
81 local try=$2 81 local try=$2
82 82
83 echo "@@@BUILD_STEP tar_generated_binaries@@@" 83 echo "@@@BUILD_STEP tar_generated_binaries@@@"
84 # clean out a bunch of files that are not needed 84 # clean out a bunch of files that are not needed
85 find scons-out/ \ 85 find scons-out/ \
86 \( -name '*.[so]' -o -name '*.bc' -o -name '*.pexe' -o -name '*.ll' \) \ 86 \( -name '*.o' -o -name '*.bc' \) \
87 -print0 | xargs -0 rm -f 87 -print0 | xargs -0 rm -f
88 88
89 tar cvfz arm-tcb.tgz scons-out/ 89 # delete nexes from pexe mode directories to force translation
90 # TODO(dschuff) enable this once we can translate on the hw bots
91 #find scons-out/*pexe*/ -name '*.nexe' -print0 | xargs -0 rm -f
92 tar cvfz arm-scons.tgz scons-out/*arm*
90 93
91 echo "@@@BUILD_STEP archive_binaries@@@" 94 echo "@@@BUILD_STEP archive_binaries@@@"
92 if [[ ${try} == "try" ]] ; then 95 if [[ ${try} == "try" ]] ; then
93 ${UP_DOWN_LOAD} UploadArmBinariesForHWBotsTry ${name} arm-tcb.tgz 96 ${UP_DOWN_LOAD} UploadArmBinariesForHWBotsTry ${name} arm-scons.tgz
94 else 97 else
95 ${UP_DOWN_LOAD} UploadArmBinariesForHWBots ${name} arm-tcb.tgz 98 ${UP_DOWN_LOAD} UploadArmBinariesForHWBots ${name} arm-scons.tgz
96 fi 99 fi
97 } 100 }
98 101
99 # Untar archived executables for HW bots 102 # Untar archived executables for HW bots
100 unarchive-for-hw-bots() { 103 unarchive-for-hw-bots() {
101 local name=$1 104 local name=$1
102 local try=$2 105 local try=$2
103 106
104 echo "@@@BUILD_STEP fetch_binaries@@@" 107 echo "@@@BUILD_STEP fetch_binaries@@@"
105 if [[ ${try} == "try" ]] ; then 108 if [[ ${try} == "try" ]] ; then
106 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-tcb.tgz 109 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBotsTry ${name} arm-scons.tgz
107 else 110 else
108 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-tcb.tgz 111 ${UP_DOWN_LOAD} DownloadArmBinariesForHWBots ${name} arm-scons.tgz
109 fi 112 fi
110 113
111 echo "@@@BUILD_STEP untar_binaries@@@" 114 echo "@@@BUILD_STEP untar_binaries@@@"
112 rm -rf scons-out/ 115 rm -rf scons-out/
113 tar xvfz arm-tcb.tgz --no-same-owner 116 tar xvfz arm-scons.tgz --no-same-owner
114 } 117 }
115 118
116 # Build with gyp - this only exercises the trusted TC and hence this only 119 # Build with gyp - this only exercises the trusted TC and hence this only
117 # makes sense to run for ARM. 120 # makes sense to run for ARM.
118 gyp-arm-build() { 121 gyp-arm-build() {
119 gypmode=$1 122 gypmode=$1
120 TOOLCHAIN_DIR=native_client/toolchain/linux_arm-trusted 123 TOOLCHAIN_DIR=native_client/toolchain/linux_arm-trusted
121 EXTRA="-isystem ${TOOLCHAIN_DIR}/usr/include \ 124 EXTRA="-isystem ${TOOLCHAIN_DIR}/usr/include \
122 -Wl,-rpath-link=${TOOLCHAIN_DIR}/lib/arm-linux-gnueabi \ 125 -Wl,-rpath-link=${TOOLCHAIN_DIR}/lib/arm-linux-gnueabi \
123 -L${TOOLCHAIN_DIR}/lib \ 126 -L${TOOLCHAIN_DIR}/lib \
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 358
356 clobber 359 clobber
357 install-lkgr-toolchains 360 install-lkgr-toolchains
358 361
359 gyp-arm-build Release 362 gyp-arm-build Release
360 363
361 scons-tests "arm" "${mode} -j8 -k" "" 364 scons-tests "arm" "${mode} -j8 -k" ""
362 # Run all 3 test suites in a single scons invocation to minimize 365 # Run all 3 test suites in a single scons invocation to minimize
363 # processing time of *.scons files 366 # processing time of *.scons files
364 scons-tests "arm" "${mode} -k" "small_tests medium_tests large_tests" 367 scons-tests "arm" "${mode} -k" "small_tests medium_tests large_tests"
368
369 # Run tests in pexe mode
370 scons-tests-no-translator "arm" "${mode} -k pnacl_generate_pexe=1" \
371 "toolchain_tests"
372
365 # Full test suite of translator for ARM is too flaky on QEMU 373 # Full test suite of translator for ARM is too flaky on QEMU
366 # http://code.google.com/p/nativeclient/issues/detail?id=2581 374 # http://code.google.com/p/nativeclient/issues/detail?id=2581
367 # Running a subset here (and skipping in scons-test() itself). 375 # Running a subset here (and skipping in scons-test() itself).
368 scons-tests-translator "arm" "--mode=opt-host,nacl -j4 -k" "toolchain_tests" 376 scons-tests-translator "arm" "--mode=opt-host,nacl -j4 -k" "toolchain_tests"
369 browser-tests "arm" "${mode}" 377 browser-tests "arm" "${mode}"
370 ad-hoc-shared-lib-tests "arm" 378 ad-hoc-shared-lib-tests "arm"
371 } 379 }
372 380
373 mode-buildbot-arm-dbg() { 381 mode-buildbot-arm-dbg() {
374 mode-buildbot-arm "--mode=dbg-host,nacl" 382 mode-buildbot-arm "--mode=dbg-host,nacl"
375 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 383 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
376 } 384 }
377 385
378 mode-buildbot-arm-opt() { 386 mode-buildbot-arm-opt() {
379 mode-buildbot-arm "--mode=opt-host,nacl" 387 mode-buildbot-arm "--mode=opt-host,nacl"
380 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular 388 archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
381 } 389 }
382 390
383 mode-buildbot-arm-try() { 391 mode-buildbot-arm-try() {
384 mode-buildbot-arm "--mode=opt-host,nacl" 392 mode-buildbot-arm "--mode=opt-host,nacl"
385 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try 393 archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try
386 } 394 }
387 395
388 mode-buildbot-arm-hw() { 396 mode-buildbot-arm-hw() {
389 FAIL_FAST=false 397 FAIL_FAST=false
390 local flags="naclsdk_validate=0 built_elsewhere=1 $1" 398 local flags="naclsdk_validate=0 built_elsewhere=1 $1"
391 scons-tests-no-translator "arm" "${flags} -k" \ 399 scons-tests-no-translator "arm" "${flags} -k" \
392 "small_tests medium_tests large_tests" 400 "small_tests medium_tests large_tests"
401 scons-tests-no-translator "arm" "${flags} -k pnacl_generate_pexe=1" \
402 "toolchain_tests"
393 browser-tests "arm" "${flags}" 403 browser-tests "arm" "${flags}"
394 } 404 }
395 405
396 # NOTE: the hw bots are too slow to build stuff on so we just 406 # NOTE: the hw bots are too slow to build stuff on so we just
397 # use pre-built executables 407 # use pre-built executables
398 mode-buildbot-arm-hw-dbg() { 408 mode-buildbot-arm-hw-dbg() {
399 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular 409 unarchive-for-hw-bots $(NAME_ARM_DOWNLOAD) regular
400 mode-buildbot-arm-hw "--mode=dbg-host,nacl" 410 mode-buildbot-arm-hw "--mode=dbg-host,nacl"
401 } 411 }
402 412
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 exit 1 478 exit 1
469 fi 479 fi
470 480
471 "$@" 481 "$@"
472 482
473 if [[ ${RETCODE} != 0 ]]; then 483 if [[ ${RETCODE} != 0 ]]; then
474 echo "@@@BUILD_STEP summary@@@" 484 echo "@@@BUILD_STEP summary@@@"
475 echo There were failed stages. 485 echo There were failed stages.
476 exit ${RETCODE} 486 exit ${RETCODE}
477 fi 487 fi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698