diff options
Diffstat (limited to 'smoke_test.sh')
-rwxr-xr-x | smoke_test.sh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/smoke_test.sh b/smoke_test.sh new file mode 100755 index 00000000..e57a8d02 --- /dev/null +++ b/smoke_test.sh | |||
@@ -0,0 +1,55 @@ | |||
1 | #!/bin/sh -e | ||
2 | |||
3 | tarball="$1" | ||
4 | |||
5 | rm -rf smoketestdir | ||
6 | mkdir smoketestdir | ||
7 | cp "$tarball" smoketestdir | ||
8 | cd smoketestdir | ||
9 | |||
10 | tar zxvpf "$(basename "$tarball")" | ||
11 | cd "$(basename "$tarball" .tar.gz)" | ||
12 | ./configure --prefix=foobar | ||
13 | make | ||
14 | ./luarocks --verbose | ||
15 | ./luarocks --verbose install inspect | ||
16 | ./luarocks --verbose show inspect | ||
17 | ./lua -e 'print(assert(require("inspect")(_G)))' | ||
18 | make install | ||
19 | cd foobar | ||
20 | bin/luarocks --verbose | ||
21 | bin/luarocks --verbose install inspect | ||
22 | bin/luarocks --verbose show inspect | ||
23 | ( | ||
24 | eval $(bin/luarocks path) | ||
25 | lua -e 'print(assert(require("inspect")(_G)))' | ||
26 | ) | ||
27 | cd .. | ||
28 | rm -rf foobar | ||
29 | |||
30 | if [ "$2" = "binary" ] | ||
31 | then | ||
32 | make binary | ||
33 | make install-binary | ||
34 | cd foobar | ||
35 | bin/luarocks | ||
36 | bin/luarocks install inspect | ||
37 | bin/luarocks show inspect | ||
38 | ( | ||
39 | eval $(bin/luarocks path) | ||
40 | lua -e 'print(assert(require("inspect")(_G)))' | ||
41 | ) | ||
42 | cd .. | ||
43 | rm -rf foobar | ||
44 | fi | ||
45 | |||
46 | if [ "$3" = "windows" ] | ||
47 | then | ||
48 | make windows-binary | ||
49 | fi | ||
50 | |||
51 | cd .. | ||
52 | rm -rf smoketestdir | ||
53 | echo | ||
54 | echo "Full test ran and nothing caught fire!" | ||
55 | echo | ||