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
diff --git a/test/run-test b/test/run-test
index 496f7d1..b8e40d9 100755
--- a/test/run-test
+++ b/test/run-test
@@ -206,6 +206,14 @@
         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