rh-openjdk / MSITests

MIT License
1 stars 2 forks source link

Removed confusing _INPUT suffix #27

Closed RadekCap closed 1 year ago

zzambers commented 1 year ago

Few things:

Also current code has some problems when INPUT_FOLDER or RESULTS_FOLDER_NAME are relative. But that is probably out of scope of this PR.

zzambers commented 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

zzambers commented 1 year ago

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

RadekCap commented 1 year ago

Fixed by #30