-
Notifications
You must be signed in to change notification settings - Fork 7
/
install_test.sh
executable file
·45 lines (35 loc) · 1.13 KB
/
install_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
set -ex
# Lint.
# $ shellcheck -s sh ./*.sh
# Test that we can install the latest version at the default location.
rm -f ~/.wasmer/bin/wasmer
unset WASMER_DIR
sh ./install.sh
~/.wasmer/bin/wasmer --version
# Test that we can install a specific version at a custom location.
rm -rf ~/wasmer-0.17.0
export WASMER_DIR="$HOME/wasmer-0.17.0"
./install.sh 0.17.0
~/wasmer-0.17.0/bin/wasmer --version | grep 0.17.0
# Test that upgrading versions work.
rm -f ~/.wasmer/bin/wasmer
unset WASMER_DIR
./install.sh 0.17.0
~/.wasmer/bin/wasmer --version | grep 0.17.0
unset WASMER_DIR
printf 'n\nn\n' | ./install.sh 0.16.0 || true
~/.wasmer/bin/wasmer --version | grep 0.17.0
unset WASMER_DIR
./install.sh 0.17.1
~/.wasmer/bin/wasmer --version | grep 0.17.1
# Re enable this test when we have multiple tagged versions to test against...
#unset WASMER_DIR
#./install.sh 1.0.0-alpha02.0
#~/.wasmer/bin/wasmer --version | grep 1.0.0-alpha02.0
unset WASMER_DIR
./install.sh 1.0.0-alpha3
~/.wasmer/bin/wasmer --version | grep 1.0.0-alpha3
unset WASMER_DIR
printf 'n\nn\n' | ./install.sh 0.17.0 || true
~/.wasmer/bin/wasmer --version | grep 1.0.0-alpha3