aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2019-06-06 16:37:13 -0300
committerHisham Muhammad <hisham@gobolinux.org>2019-06-06 16:45:04 -0300
commit01a3a26ca169de04673bc73c5205eb9d43d66805 (patch)
tree8fa136466a49625846ccc2f14e51b28b45f7b0d0
parentb522656085991297b3ccd0793b5d744653b24dfe (diff)
downloadluarocks-01a3a26ca169de04673bc73c5205eb9d43d66805.tar.gz
luarocks-01a3a26ca169de04673bc73c5205eb9d43d66805.tar.bz2
luarocks-01a3a26ca169de04673bc73c5205eb9d43d66805.zip
Add smoke test
-rw-r--r--.travis.yml19
-rwxr-xr-xsmoke_test.sh55
2 files changed, 74 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index aca8460a..72b74825 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,6 +12,11 @@ cache:
12 - testrun/testing_server-5.3 12 - testrun/testing_server-5.3
13 - testrun/testing_server-2.1 13 - testrun/testing_server-2.1
14 - testrun/binary-samples 14 - testrun/binary-samples
15
16smoke_script: &smoke_script
17 - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
18 - ./makedist $BRANCH
19 - ./smoke_test.sh luarocks-$BRANCH.tar.gz
15 20
16unit_script: &unit_script 21unit_script: &unit_script
17 - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" 22 - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis"
@@ -27,6 +32,20 @@ integration_script: &integration_script
27 32
28jobs: 33jobs:
29 include: 34 include:
35 # Smoke tests for release branches
36 - stage: smoke
37 if: branch =~ [0-9].*
38 script: *smoke_script
39 os: linux
40 env:
41 - LUA="lua=5.3"
42 - stage: smoke
43 if: branch =~ [0-9].*
44 script: *smoke_script
45 os: osx
46 language: generic
47 env:
48 - LUA="luajit=2.1"
30 # Unit tests for linux 49 # Unit tests for linux
31 - stage: Unit on Linux 50 - stage: Unit on Linux
32 script: *unit_script 51 script: *unit_script
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
3tarball="$1"
4
5rm -rf smoketestdir
6mkdir smoketestdir
7cp "$tarball" smoketestdir
8cd smoketestdir
9
10tar zxvpf "$(basename "$tarball")"
11cd "$(basename "$tarball" .tar.gz)"
12./configure --prefix=foobar
13make
14./luarocks --verbose
15./luarocks --verbose install inspect
16./luarocks --verbose show inspect
17./lua -e 'print(assert(require("inspect")(_G)))'
18make install
19cd foobar
20bin/luarocks --verbose
21bin/luarocks --verbose install inspect
22bin/luarocks --verbose show inspect
23(
24 eval $(bin/luarocks path)
25 lua -e 'print(assert(require("inspect")(_G)))'
26)
27cd ..
28rm -rf foobar
29
30if [ "$2" = "binary" ]
31then
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
44fi
45
46if [ "$3" = "windows" ]
47then
48 make windows-binary
49fi
50
51cd ..
52rm -rf smoketestdir
53echo
54echo "Full test ran and nothing caught fire!"
55echo