summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-09-09 04:55:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-09 04:55:47 +0000
commit9102fff43f52be08032b07e1e922dcdd3660f6b3 (patch)
tree5d91444dd9d6ac94eb2bf072af442aaba25b1b73 /test
parent9204ed5102ea7cd57bd3ff7bb44f3ea26e28ae2a (diff)
parentc580e04a861699d8a359e4464905b81d9cf5b926 (diff)
downloadart-9102fff43f52be08032b07e1e922dcdd3660f6b3.zip
art-9102fff43f52be08032b07e1e922dcdd3660f6b3.tar.gz
art-9102fff43f52be08032b07e1e922dcdd3660f6b3.tar.bz2
Merge "Fix darwin run-test problems"
Diffstat (limited to 'test')
-rwxr-xr-xtest/etc/host-run-test-jar4
-rwxr-xr-xtest/run-test6
2 files changed, 6 insertions, 4 deletions
diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar
index 4485590..49aa912 100755
--- a/test/etc/host-run-test-jar
+++ b/test/etc/host-run-test-jar
@@ -182,7 +182,9 @@ if [ "$RELOCATE" = "y" ]; then
# since we are relocating. Get the total size of the /system/framework directory
# in 512 byte blocks and set it as the ulimit. This should be more than enough
# room.
- ulimit -S $(du -c -B512 ${ANDROID_ROOT}/framework | tail -1 | cut -f1) || exit 1
+ if [ ! `uname` = "Darwin" ]; then # TODO: Darwin doesn't support "du -B..."
+ ulimit -S $(du -c -B512 ${ANDROID_ROOT}/framework | tail -1 | cut -f1) || exit 1
+ fi
else
FLAGS="${FLAGS} -Xnorelocate"
COMPILER_FLAGS="${COMPILER_FLAGS} --runtime-arg -Xnorelocate --no-include-patch-information"
diff --git a/test/run-test b/test/run-test
index eed28a5..b140fbf 100755
--- a/test/run-test
+++ b/test/run-test
@@ -223,10 +223,10 @@ done
#
# Cannot use realpath, as it does not exist on Mac.
# Cannot us a simple "cd", as the path might not be created yet.
-# Use -m option of readlink: canonicalizes, but allows non-existing components.
+# Cannot use readlink -m, as it does not exist on Mac.
+# Fallback to nuclear option:
noncanonical_tmp_dir=$tmp_dir
-tmp_dir="`cd $oldwd ; readlink -m $tmp_dir`"
-
+tmp_dir="`cd $oldwd ; python -c "import os; print os.path.realpath('$tmp_dir')"`"
mkdir -p $tmp_dir
if [ "$basic_verify" = "true" ]; then