diff options
Diffstat (limited to 'eclass/tests/gradle.sh')
-rwxr-xr-x | eclass/tests/gradle.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/eclass/tests/gradle.sh b/eclass/tests/gradle.sh index 61666c1b..8cadb521 100755 --- a/eclass/tests/gradle.sh +++ b/eclass/tests/gradle.sh @@ -27,8 +27,7 @@ test_set_EGRADLE() { chmod 755 "${pseudo_gradle_path}" done - local saved_PATH="${PATH}" - PATH="${tmpdir}" + EGRADLE_SEARCH_PATH="${tmpdir}" local test_desc=( test_set_EGRADLE @@ -43,9 +42,13 @@ test_set_EGRADLE() { local saved_EGRADLE="${EGRADLE}" unset EGRADLE - PATH="${saved_PATH}" rm -rf "${tmpdir}" + # The saved_EGRADLE variable will contain something like + # /tmp/tmp.vTN7A1l6C7/gradle-2.0, but we only want to compare the + # name of the binary. + saved_EGRADLE=$(basename ${saved_EGRADLE}) + [[ "${saved_EGRADLE}" == "${expected_EGRADLE}" ]] tend $? @@ -58,5 +61,4 @@ test_set_EGRADLE gradle-2.0 gradle-1.0 gradle-2.0 EGRADLE_MIN=2.0 test_set_EGRADLE gradle-2.2.3 gradle-1.0 gradle-2.0 gradle-2.2.3 EGRADLE_MAX_EXCLUSIVE=2.2 test_set_EGRADLE gradle-2.0 gradle-1.0 gradle-2.0 gradle-2.2.3 - texit |