summaryrefslogtreecommitdiffstats
path: root/test/run-test
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-06-21 22:58:05 -0700
committerIan Rogers <irogers@google.com>2014-06-22 01:30:40 -0700
commit997f0f9e69ce7aee73cebd64be8dc40af9164257 (patch)
tree0d323cec5ae6359fb4dd775a5b539848c930507b /test/run-test
parent87523b6c4df4dd33d4c1e383403e14d6fe06362f (diff)
downloadart-997f0f9e69ce7aee73cebd64be8dc40af9164257.zip
art-997f0f9e69ce7aee73cebd64be8dc40af9164257.tar.gz
art-997f0f9e69ce7aee73cebd64be8dc40af9164257.tar.bz2
Limit the size of files created by run-test to 2MB.
In MemMap::MapAnonymous on the host, avoid creating ashmem regions that are backed by files, when the size of the file will be greater than the ulimit. Change-Id: I7cbf2ac59bf5869ed85850bea8d71898f3b7e1c7
Diffstat (limited to 'test/run-test')
-rwxr-xr-xtest/run-test13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/run-test b/test/run-test
index 34b06cc..d1c5bb2 100755
--- a/test/run-test
+++ b/test/run-test
@@ -298,6 +298,17 @@ chmod 755 "$run"
export TEST_NAME=`basename ${test_dir}`
+# To cause tests to fail fast, limit the file sizes created by dx, dex2oat and ART output to 2MB.
+file_size_limit=2048
+if echo "$test_dir" | grep 089; then
+ file_size_limit=5120
+elif echo "$test_dir" | grep 083; then
+ file_size_limit=5120
+fi
+if ! ulimit "$file_size_limit"; then
+ echo "ulimit file size setting failed"
+fi
+
good="no"
if [ "$dev_mode" = "yes" ]; then
"./${build}" 2>&1
@@ -376,7 +387,7 @@ fi
echo '#################### info'
cat "${td_info}" | sed 's/^/# /g'
echo '#################### diffs'
- diff --strip-trailing-cr -u "$expected" "$output"
+ diff --strip-trailing-cr -u "$expected" "$output" | tail -n 500
echo '####################'
echo ' '
fi