Skip to content
Permalink
Browse files
8238204: run_tests.sh fails on macOS when called from test_jpackage.sh
Reviewed-by: herrick, almatvee
  • Loading branch information
Alexey Semenyuk committed Jun 8, 2020
1 parent 28d2cdf commit f87ef60b09c46db35adeea467b8af87e0a47c053
Showing 2 changed files with 7 additions and 7 deletions.
@@ -248,18 +248,18 @@ installJtreg ()

preRun ()
{
local xargs_args=(-t --no-run-if-empty rm)
if [ -n "$dry_run" ]; then
xargs_args=(--no-run-if-empty echo rm)
fi

if [ ! -d "$output_dir" ]; then
exec_command mkdir -p "$output_dir"
fi
[ ! -d "$output_dir" ] || output_dir=$(cd "$output_dir" && pwd)

# Clean output directory
[ "$mode" != "create" ] || find $output_dir -maxdepth 1 -type f -name '*.exe' -or -name '*.msi' -or -name '*.rpm' -or -name '*.deb' | xargs "${xargs_args[@]}"
if [ "$mode" == "create" ]; then
for f in $(find $output_dir -maxdepth 1 -type f -name '*.exe' -or -name '*.msi' -or -name '*.rpm' -or -name '*.deb'); do
echo rm "$f"
[ -n "$dry_run" ] || rm "$f"
done
fi
}


@@ -75,4 +75,4 @@ exec_command ()

set_args "$@"
basedir="$(dirname $0)"
exec_command "$basedir/run_tests.sh" -m create "${args[@]}"
exec_command ${SHELL} "$basedir/run_tests.sh" -m create "${args[@]}"

0 comments on commit f87ef60

Please sign in to comment.