From 3a12cfeb539b64ae116eb6313adca802457ba6fb Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 13 Aug 2014 15:40:22 -0700 Subject: [PATCH] ART: Fix run-test in case of relative TMPDIR Relative paths should be resolved to absolute paths, as we are chdir-ing in the test. Bug: 16499668 (cherry picked from commit f8b9bbb9680fff693d1056d884c96eaf5360d0d6) Change-Id: Ic7db35e21f519ced77c4ac468d8e909bcb40b24d --- test/run-test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/run-test b/test/run-test index 496f7d1b5..b8e40d932 100755 --- a/test/run-test +++ b/test/run-test @@ -206,6 +206,14 @@ while true; do break fi done + +# tmp_dir may be relative, resolve. +# +# 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. +tmp_dir="`cd $oldwd ; readlink -m $tmp_dir`" + mkdir -p $tmp_dir if [ "$basic_verify" = "true" ]; then -- 2.11.0