diff options
author | Evgeny Astigeevich <evgeny.astigeevich@linaro.org> | 2020-02-10 18:47:10 +0000 |
---|---|---|
committer | Evgeny Astigeevich <evgeny.astigeevich@linaro.org> | 2020-02-10 18:47:10 +0000 |
commit | 0a98e3361a29613db1971c98551fad5cfcd100e6 (patch) | |
tree | f268d385fa3c82612da16447c9056b574d12beb9 /build.sh | |
parent | ee28701ba925574dffcbf2b234246f5b0bcc1307 (diff) | |
download | art-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-x | build.sh | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) |