Closed RadekCap closed 1 year ago
Hmm, Looking more closely on INPUT_FOLDER
and RESULTS_FOLDER_NAME
they are both somewhat strangely interpreted [1][2]. I would modify behavior so that these are interpreted in a way paths are normally interpreted (which are either absolute or relative to current working dir), otherwise users will be confused. (However that can be done in different PR)
[1] https://github.com/rh-openjdk/WindowsTPS/blob/b971dc34842243f9526e2bdba90ae2f035bfee90/wrapper/run-tps-win-vagrant.sh#L37 [2] https://github.com/rh-openjdk/WindowsTPS/blob/b971dc34842243f9526e2bdba90ae2f035bfee90/wrapper/run-folder-as-tests.sh#L33
Ok, so problem seems to be, that testsuite does not like relative paths. However if test canonizes paths using:
export RESULTS_FOLDER="$( readlink -m "$RESULTS_FOLDER" )"
export INPUT_FOLDER="$( readlink -m "$INPUT_FOLDER" )"
Wrapper can simply do:
export RESULTS_FOLDER="${RESULTS_FOLDER:-results}"
export INPUT_FOLDER="${INPUT_FOLDER:-input}"
And default wrapper behavior does not change (when launched from repo root). See my experiment (without comments/README changes): https://github.com/zzambers/WindowsTPS/commit/wrapper-variables-fix
Fixed by #30
Few things:
INPUT_FOLDER
usesINPUT_PATH
variable (should be one or another). Also wayINPUT_PATH
is currently required to start with/
and then being interpreted as relative to SCRIPT_DIR is confusing. For now, would probably go with something like:export INPUT_FOLDER="${INPUT_FOLDER:-"$SCRIPT_DIR"/../input}"
export CURRENT_USER_NAME="${CURRENT_USER_NAME:-$USER}"
OTOOL_JDK_VERSION
andJDK_VERSION
export OTOOL_JDK_VERSION="${OTOOL_JDK_VERSION:-${JDK_VERSION:-11}}"
Also current code has some problems when
INPUT_FOLDER
orRESULTS_FOLDER_NAME
are relative. But that is probably out of scope of this PR.