You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then if [ "${TEST_SUITE}" = 'installation_iojs' ]; then travis_retry make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL ; else make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL; fi; fi
24
+
- >
25
+
if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then
26
+
set -x
27
+
if [ "${TEST_SUITE}" = 'installation_iojs' ]; then
28
+
travis_retry make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL
29
+
ret_val=$?
30
+
else
31
+
make --debug=v TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL
32
+
ret_val=$?
33
+
fi
34
+
set +x
35
+
exit $ret_val
36
+
fi
25
37
before_cache:
26
38
- if [ -n "$WITHOUT_CURL" ]; then sudo apt-get install curl -y ; fi
Copy file name to clipboardExpand all lines: test/install_script/nvm_source
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,25 @@ cleanup () {
8
8
}
9
9
die () { echo"$@"; cleanup ;exit 1; }
10
10
11
+
unset NVM_SOURCE
12
+
11
13
NVM_ENV=testing \. ../../install.sh
12
14
13
15
# nvm_source with no parameter returns the git endpoint
14
-
echo$(nvm_source)| grep "https://github.com/nvm-sh/nvm.git$"> /dev/null || die "nvm_source without arguments should return the location of the git repo"
15
16
[ "$(nvm_source)"="https://github.com/nvm-sh/nvm.git" ] || die "nvm_source without arguments should return the location of the git repo"
16
-
NVM_GITHUB_REPO="other-user/other-nvm"echo$(nvm_source)| grep "https://github.com/other-user/other-nvm.git$"> /dev/null || die "nvm_source without arguments should return the location of the git repo"
17
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" nvm_source | grep "https://github.com/other-user/other-nvm.git$"> /dev/null || die "NVM_INSTALL_GITHUB_REPO=... nvm_source without arguments should return the location of the given git repo"
17
18
18
19
# nvm_source with git parameter returns the location of the nvm repo
19
-
echo$(nvm_source "git")| grep "https://github.com/nvm-sh/nvm.git$"> /dev/null || die "nvm_source without arguments should return the location of the git repo"
20
-
NVM_GITHUB_REPO="other-user/other-nvm"echo$(nvm_source "git")| grep "https://github.com/other-user/other-nvm.git$"> /dev/null || die "nvm_source without arguments should return the location of the git repo"
20
+
[ "$(nvm_source "git")"="https://github.com/nvm-sh/nvm.git" ] || die "nvm_source \"git\" should return the location of the git repo"
21
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" nvm_source "git"| grep "https://github.com/other-user/other-nvm.git$"> /dev/null || die "NVM_INSTALL_GITHUB_REPO=... nvm_source \"git\"should return the location of the given git repo"
21
22
22
23
# nvm_source with script parameter returns the location of nvm.sh
23
-
echo$(nvm_source "script")| grep "https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm.sh$"> /dev/null|| die "nvm_source \"script\" should return the location of nvm.sh"
24
-
NVM_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.2"echo$(nvm_source "script")| grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.2/nvm.sh$"> /dev/null || die "nvm_source \"script\" should return the location of nvm.sh"
24
+
[ "$(nvm_source "script")"="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm.sh" ]|| die "nvm_source \"script\" should return the location of nvm.sh"
25
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.0"nvm_source "script"| grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.0/nvm.sh$"> /dev/null || die "NVM_INSTALL_GITHUB_REPO=... NVM_INSTALL_VERSION=... nvm_source \"script\" should return the location of nvm.sh"
25
26
26
27
# nvm_source with script-nvm-exec parameter returns the location of nvm-exec
27
-
echo$(nvm_source "script-nvm-exec")| grep "https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm-exec$"> /dev/null|| die "nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
28
-
NVM_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.2"echo$(nvm_source "script-nvm-exec")| grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.2/nvm-exec$"> /dev/null || die "nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
28
+
[ "$(nvm_source "script-nvm-exec")"="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm-exec" ]|| die "nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
29
+
NVM_INSTALL_GITHUB_REPO="other-user/other-nvm" NVM_INSTALL_VERSION="v0.37.0"nvm_source "script-nvm-exec"| grep "https://raw.githubusercontent.com/other-user/other-nvm/v0.37.0/nvm-exec$"> /dev/null || die "NVM_INSTALL_GITHUB_REPO=... NVM_INSTALL_VERSION=... nvm_source \"script-nvm-exec\" should return the location of nvm.sh"
29
30
30
31
# nvm_source with any other parameter errors out and exits
31
32
nvm_source "anything"2> /dev/null && die "nvm_source with invalid parameter should exit"
@@ -44,3 +45,4 @@ out=$(nvm_source "anything")
44
45
[ "_$out"="_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""
0 commit comments