[zorg] r307049 - [sanitizer] Run multiple test in parallel on single device
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 14:51:53 PDT 2017
Author: vitalybuka
Date: Mon Jul 3 14:51:53 2017
New Revision: 307049
URL: http://llvm.org/viewvc/llvm-project?rev=307049&view=rev
Log:
[sanitizer] Run multiple test in parallel on single device
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh?rev=307049&r1=307048&r2=307049&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh Mon Jul 3 14:51:53 2017
@@ -137,14 +137,15 @@ function test_android {
echo @@@BUILD_STEP run tests@@@
ANDROID_DEVICES=$(${ADB} devices | grep 'device$' | awk '{print $1}')
- rm -rf test_android_*.log
+ rm -rf test_android_log_*
rm -rf tested_arch_*
+ rm -rf shards_log_*
for SERIAL in $ANDROID_DEVICES; do
- (test_on_device "$SERIAL" $@ >$(mktemp test_android_XXXX.log) 2>&1) &
+ (test_on_device "$SERIAL" $@ >$(mktemp test_android_log_XXXX) 2>&1) &
done
wait
- cat test_android_*.log || true
+ cat test_android_log_* || true
for _arg in "$@"; do
local _arch=${_arg%:*}
@@ -200,11 +201,25 @@ function test_arch_on_device {
echo @@@BUILD_STEP run sanitizer_common tests [$DEVICE_DESCRIPTION]@@@
run_command_on_device $DEVICE_ROOT/SanitizerTest || echo @@@STEP_FAILURE@@@
+ NUM_SHARDS=4
+ local _log_prefix=$(mktemp shards_XXXX_)
echo @@@BUILD_STEP run asan tests [$DEVICE_DESCRIPTION]@@@
- NUM_SHARDS=7
for ((SHARD=0; SHARD < $NUM_SHARDS; SHARD++)); do
- local ENV="GTEST_TOTAL_SHARDS=$NUM_SHARDS GTEST_SHARD_INDEX=$SHARD LD_LIBRARY_PATH=$DEVICE_ROOT"
- run_command_on_device "ASAN_OPTIONS=start_deactivated=1 $ENV $DEVICE_ROOT/AsanTest" || echo @@@STEP_FAILURE@@@
- run_command_on_device "$ENV $DEVICE_ROOT/AsanNoinstTest" || echo @@@STEP_FAILURE@@@
+ local ENV="GTEST_TOTAL_SHARDS=$NUM_SHARDS GTEST_SHARD_INDEX=$SHARD"
+ ( (run_command_on_device "$ENV $DEVICE_ROOT/AsanNoinstTest" || echo @@@STEP_FAILURE@@@) \
+ >$_log_prefix_$SHARD 2>&1 ) &
done
+
+ wait
+ cat $_log_prefix_* || true
+
+ local _log_prefix=$(mktemp shards_XXXX_)
+ echo @@@BUILD_STEP run instrumented asan tests [$DEVICE_DESCRIPTION]@@@
+ for ((SHARD=0; SHARD < $NUM_SHARDS; SHARD++)); do
+ local ENV="GTEST_TOTAL_SHARDS=$NUM_SHARDS GTEST_SHARD_INDEX=$SHARD LD_LIBRARY_PATH=$DEVICE_ROOT ASAN_OPTIONS=start_deactivated=1"
+ ( (run_command_on_device "$ENV $DEVICE_ROOT/AsanTest" || echo @@@STEP_FAILURE@@@) \
+ >$_log_prefix_$SHARD 2>&1 ) &
+ done
+ wait
+ cat $_log_prefix_* || true
}
More information about the llvm-commits
mailing list