aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorEvgeny Astigeevich <evgeny.astigeevich@linaro.org>2020-02-10 18:47:10 +0000
committerEvgeny Astigeevich <evgeny.astigeevich@linaro.org>2020-02-10 18:47:10 +0000
commit0a98e3361a29613db1971c98551fad5cfcd100e6 (patch)
treef268d385fa3c82612da16447c9056b574d12beb9 /build.sh
parentee28701ba925574dffcbf2b234246f5b0bcc1307 (diff)
downloadart-testing-0a98e3361a29613db1971c98551fad5cfcd100e6.tar.gz
Fix java.io.FileNotFoundException from jar
When a path to benchmarks/build.sh used to run it is not absolute, the jar tool used by the script fails with java.io.FileNotFoundException. The exception happens because a path passed to the jar tool is not valid. It is created relative to the current working directory. As the current working directory is changed when the jar tool is used, the path becomes invalid. The CL fixes the error by making paths passed to the jar tool absolute. Test: `pwd`/benchmarks/build.sh -t ./benchmarks/benchmarks/algorithm/DeltaBlue.java Test: ./benchmarks/build.sh -t ./benchmarks/benchmarks/algorithm/DeltaBlue.java Test: scripts/benchmarks/benchmarks_run_target.sh --mode 64 --cpu little --iterations 1 benchmarks/algorithm/Linpack Change-Id: I873a0228298de23845cc653e5ec35336e6a71daf
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 03c0565..2d06636 100755
--- a/build.sh
+++ b/build.sh
@@ -177,6 +177,7 @@ fi
for jar_file in "${DIR_BENCHMARKS}"/lib/*.jar
do
+ jar_file="$(realpath "${jar_file}")"
# Extract jar file and remove META-INF, which is not needed and can cause
# issues with target runs.
(cd $DIR_BUILD/classes && jar xfv "${jar_file}" && rm -rf META-INF)