diff options
| -rw-r--r-- | .travis.yml | 22 | ||||
| -rwxr-xr-x | makedist | 4 | ||||
| -rwxr-xr-x | smoke_test.sh | 55 |
3 files changed, 76 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 64d3347a..5d24b4d2 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -11,7 +11,11 @@ cache: | |||
| 11 | - testrun/testing_server-5.2 | 11 | - testrun/testing_server-5.2 |
| 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 | 14 | ||
| 15 | smoke_script: &smoke_script | ||
| 16 | - ./makedist 3.0.0 | ||
| 17 | - ./smoke_test.sh luarocks-3.0.0.tar.gz | ||
| 18 | |||
| 15 | unit_script: &unit_script | 19 | unit_script: &unit_script |
| 16 | - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" | 20 | - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" |
| 17 | - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" | 21 | - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" |
| @@ -20,12 +24,24 @@ integration_script: &integration_script | |||
| 20 | - lua -v | 24 | - lua -v |
| 21 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck ./configure; fi | 25 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck ./configure; fi |
| 22 | - ./configure --with-lua=lua_install | 26 | - ./configure --with-lua=lua_install |
| 23 | - ./makedist dev | 27 | - ./makedist 3.0.0 |
| 24 | - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" | 28 | - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" |
| 25 | - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" | 29 | - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" |
| 26 | 30 | ||
| 27 | jobs: | 31 | jobs: |
| 28 | include: | 32 | include: |
| 33 | # Smoke tests | ||
| 34 | - stage: smoke | ||
| 35 | script: *smoke_script | ||
| 36 | os: linux | ||
| 37 | env: | ||
| 38 | - LUA="lua=5.3" | ||
| 39 | - stage: smoke | ||
| 40 | script: *smoke_script | ||
| 41 | os: osx | ||
| 42 | language: generic | ||
| 43 | env: | ||
| 44 | - LUA="luajit=2.1" | ||
| 29 | # Unit tests for linux | 45 | # Unit tests for linux |
| 30 | - stage: unit | 46 | - stage: unit |
| 31 | script: *unit_script | 47 | script: *unit_script |
| @@ -87,14 +87,14 @@ mkdir "release-windows" | |||
| 87 | mv "$out" "release-windows/$out-win32" | 87 | mv "$out" "release-windows/$out-win32" |
| 88 | 88 | ||
| 89 | cd "release-unix/$out" | 89 | cd "release-unix/$out" |
| 90 | rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor | 90 | rm -rf makedist smoke_test.sh install.bat win32 .travis.yml .gitignore appveyor* .appveyor |
| 91 | cd .. | 91 | cd .. |
| 92 | tar czvpf ../"$out.tar.gz" "$out" | 92 | tar czvpf ../"$out.tar.gz" "$out" |
| 93 | cd .. | 93 | cd .. |
| 94 | rm -rf "release-unix" | 94 | rm -rf "release-unix" |
| 95 | 95 | ||
| 96 | cd "release-windows/$out-win32" | 96 | cd "release-windows/$out-win32" |
| 97 | rm -rf makedist Makefile configure .travis.yml .gitignore test appveyor* .appveyor | 97 | rm -rf makedist smoke_test.sh Makefile configure .travis.yml .gitignore test appveyor* .appveyor |
| 98 | cd .. | 98 | cd .. |
| 99 | zip -r ../"$out-win32.zip" "$out-win32" | 99 | zip -r ../"$out-win32.zip" "$out-win32" |
| 100 | cd .. | 100 | cd .. |
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 | ||
