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

Unified Diff: buildbot/buildbot_pnacl.sh

Issue 427153003: [MIPS] Enhance MIPS testing on its buildbot (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | buildbot/buildbot_selector.py » ('j') | buildbot/buildbot_selector.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbot/buildbot_pnacl.sh
diff --git a/buildbot/buildbot_pnacl.sh b/buildbot/buildbot_pnacl.sh
index 4e9980a0c76d321c5abc58768a38cdcf86f50afd..3a8d72c7cb05ff4c6eff4478df1ccae445fdbd38 100755
--- a/buildbot/buildbot_pnacl.sh
+++ b/buildbot/buildbot_pnacl.sh
@@ -214,6 +214,52 @@ unarchive-for-hw-bots() {
tar xvfz arm-scons.tgz --no-same-owner
}
+# Build with gyp - this only exercises the trusted TC
+gyp-mips32-build() {
+ local gypmode="Release"
+ if [ "${BUILD_MODE_HOST}" = "DEBUG" ] ; then
+ gypmode="Debug"
+ fi
+ local toolchain_dir=native_client/toolchain/linux_x86/mips_trusted
+ local extra="-EL -isystem ${toolchain_dir}/usr/include \
+ -Wl,-rpath-link=${toolchain_dir}/lib/mipsel-linux-gnu \
+ -L${toolchain_dir}/lib \
+ -L${toolchain_dir}/lib/mipsel-linux-gnu \
+ -L${toolchain_dir}/usr/lib \
+ -L${toolchain_dir}/usr/lib/mipsel-linux-gnu"
+ # Setup environment for mips32.
+
+ # Chech is MIPS TC already built, if not, build it.
Mark Seaborn 2014/07/31 16:12:30 "Check"
petarj 2014/08/04 00:50:37 Done.
+ if [ ! -f ${toolchain_dir}/bin/mipsel-linux-gnu-gcc ]
+ then tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh nacl_sdk
+ fi
+
+ export AR=mipsel-linux-gnu-ar
+ export AS=mipsel-linux-gnu-as
+ export CC="mipsel-linux-gnu-gcc ${extra} "
+ export CXX="mipsel-linux-gnu-g++ ${extra} "
+ export LD="mipsel-linux-gnu-g++ ${extra} "
+ export RANLIB=mipsel-linux-gnu-ranlib
+ export SYSROOT
+ export GYP_DEFINES="target_arch=mipsel mips_arch_variant=mips32r2"
+ export GYP_GENERATORS=make
+ # Ubuntu does not have MIPS trusted toolchain, so specify location of
+ # the one that was built.
+ export PATH=$(pwd)/toolchain/linux_x86/mips_trusted/bin:$PATH
+
+ # NOTE: this step is also run implicitly as part of
+ # gclient runhooks --force
+ # it uses the exported env vars so we have to run it again
+ #
+ echo "@@@BUILD_STEP gyp_configure [${gypmode}]@@@"
+ cd ..
+ native_client/build/gyp_nacl native_client/build/all.gyp
+ cd native_client
+
+ echo "@@@BUILD_STEP gyp_compile [${gypmode}]@@@"
+ make -C .. -k -j8 V=1 BUILDTYPE=${gypmode}
+}
+
# Build with gyp - this only exercises the trusted TC and hence this only
# makes sense to run for ARM.
gyp-arm-build() {
@@ -303,10 +349,10 @@ driver-tests() {
${DRIVER_TESTS} --platform="${arch}" || handle-error
}
-
-# QEMU upload bot runs this function, and the hardware download bot runs
+# QEMU upload bot runs this function, and the ARM hardware download bot runs
# mode-buildbot-arm-hw
-mode-buildbot-arm() {
+mode-buildbot() {
+ local arch=$1
FAIL_FAST=false
# "force_emulator=" disables use of QEMU, which enables building
# tests which don't work under QEMU.
@@ -314,42 +360,48 @@ mode-buildbot-arm() {
clobber
- gyp-arm-build
+ if [[ ${arch} == "arm" ]] ; then
+ gyp-arm-build
+ elif [[ ${arch} == "mips" ]] ; then
+ gyp-mips32-build
+ fi
# Sanity check
- scons-stage-noirt "arm" "-j8" "run_hello_world_test"
+ scons-stage-noirt $arch "-j8" "run_hello_world_test"
# Don't run the rest of the tests on qemu, only build them.
# QEMU is too flaky for the main waterfall
# Normal pexe mode tests
- scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}"
+ scons-stage-noirt $arch "${qemuflags}" "${SCONS_EVERYTHING}"
# This extra step is required to translate the pexes (because translation
# happens as part of CommandSelLdrTestNacl and not part of the
# build-everything step)
- scons-stage-noirt "arm" "${qemuflags}" "${SCONS_S_M}"
+ scons-stage-noirt $arch "${qemuflags}" "${SCONS_S_M}"
# Large tests cannot be run in parallel
- scons-stage-noirt "arm" "${qemuflags} -j1" "large_tests"
+ scons-stage-noirt $arch "${qemuflags} -j1" "large_tests"
# also run some tests with the irt
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}"
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_S_M_IRT}"
# non-pexe-mode tests
- scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
+ scons-stage-noirt $arch "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
- build-sbtc-prerequisites "arm"
+ build-sbtc-prerequisites $arch
- scons-stage-irt "arm" \
+ scons-stage-irt $arch \
"${qemuflags} use_sandboxed_translator=1 translate_in_build_step=0" \
"toolchain_tests"
- scons-stage-irt "arm" \
+ scons-stage-irt $arch \
"${qemuflags} use_sandboxed_translator=1 translate_fast=1 \
translate_in_build_step=0" \
"toolchain_tests"
- # Test Non-SFI Mode.
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}"
+ # Test Non-SFI Mode (for ARM only).
+ if [[ ${arch} == "arm" ]] ; then
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI}"
+ fi
}
mode-buildbot-arm-hw() {
@@ -378,42 +430,51 @@ mode-buildbot-arm-hw() {
}
mode-trybot-qemu() {
Mark Seaborn 2014/07/31 16:12:30 Derek has a refactoring change out for review whic
+ local arch=$1
# Build and actually run the arm tests under qemu, except
# sandboxed translation. Hopefully that's a good tradeoff between
# flakiness and cycle time.
FAIL_FAST=false
local qemuflags="-j4 -k"
clobber
- gyp-arm-build
- scons-stage-noirt "arm" "${qemuflags}" "${SCONS_EVERYTHING}"
+ if [[ ${arch} == "arm" ]] ; then
+ gyp-arm-build
+ elif [[ ${arch} == "mips" ]] ; then
+ gyp-mips32-build
+ fi
+
+
+ scons-stage-noirt $arch "${qemuflags}" "${SCONS_EVERYTHING}"
# Large tests cannot be run in parallel
- scons-stage-noirt "arm" "${qemuflags} -j1" "${SCONS_S_M} large_tests"
+ scons-stage-noirt $arch "${qemuflags} -j1" "${SCONS_S_M} large_tests"
# also run some tests with the irt
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_S_M_IRT}"
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_S_M_IRT}"
# non-pexe tests
- scons-stage-noirt "arm" "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
+ scons-stage-noirt $arch "${qemuflags} pnacl_generate_pexe=0" "nonpexe_tests"
- # Test Non-SFI Mode.
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
- scons-stage-irt "arm" "${qemuflags}" "${SCONS_NONSFI}"
+ # Test Non-SFI Mode (for ARM only).
+ if [[ ${arch} == "arm" ]] ; then
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI_NEWLIB}"
+ scons-stage-irt $arch "${qemuflags}" "${SCONS_NONSFI}"
+ fi
}
mode-buildbot-arm-dbg() {
BUILD_MODE_HOST=DEDUG
- mode-buildbot-arm
+ mode-buildbot arm
archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
}
mode-buildbot-arm-opt() {
- mode-buildbot-arm
+ mode-buildbot arm
archive-for-hw-bots $(NAME_ARM_UPLOAD) regular
}
mode-buildbot-arm-try() {
- mode-buildbot-arm
+ mode-buildbot arm
archive-for-hw-bots $(NAME_ARM_TRY_UPLOAD) try
}
« no previous file with comments | « no previous file | buildbot/buildbot_selector.py » ('j') | buildbot/buildbot_selector.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698