From 50e4b793df2f22eca5d4c4244d5c89fcc4c34b70 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 4 Jul 2018 15:21:36 -0300 Subject: Tests: add smoke test --- .travis.yml | 20 ++++++++++++++++++-- makedist | 4 ++-- smoke_test.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 4 deletions(-) create mode 100755 smoke_test.sh diff --git a/.travis.yml b/.travis.yml index 67eec990..454de1ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,10 @@ cache: - testrun/testing_server-2.1 - testrun/binary-samples +smoke_script: &smoke_script + - ./makedist 3.0.0 + - ./smoke_test.sh luarocks-3.0.0.tar.gz + unit_script: &unit_script - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" @@ -21,12 +25,24 @@ integration_script: &integration_script - lua -v - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck ./configure; fi - ./configure --with-lua=lua_install - - ./makedist dev + - ./makedist 3.0.0 - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" - + jobs: include: + # Smoke tests + - stage: smoke + script: *smoke_script + os: linux + env: + - LUA="lua=5.3" + - stage: smoke + script: *smoke_script + os: osx + language: generic + env: + - LUA="luajit=2.1" # Unit tests for linux - stage: unit script: *unit_script diff --git a/makedist b/makedist index 9b737588..fe160468 100755 --- a/makedist +++ b/makedist @@ -93,14 +93,14 @@ mkdir "release-windows" mv "$out" "release-windows/$out-win32" cd "release-unix/$out" -rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor +rm -rf makedist smoke_test.sh install.bat win32 .travis.yml .gitignore appveyor* .appveyor cd .. tar czvpf ../"$out.tar.gz" "$out" cd .. rm -rf "release-unix" cd "release-windows/$out-win32" -rm -rf makedist Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor +rm -rf makedist smoke_test.sh Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor cd .. zip -r ../"$out-win32.zip" "$out-win32" 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 @@ +#!/bin/sh -e + +tarball="$1" + +rm -rf smoketestdir +mkdir smoketestdir +cp "$tarball" smoketestdir +cd smoketestdir + +tar zxvpf "$(basename "$tarball")" +cd "$(basename "$tarball" .tar.gz)" +./configure --prefix=foobar +make +./luarocks --verbose +./luarocks --verbose install inspect +./luarocks --verbose show inspect +./lua -e 'print(assert(require("inspect")(_G)))' +make install +cd foobar +bin/luarocks --verbose +bin/luarocks --verbose install inspect +bin/luarocks --verbose show inspect +( + eval $(bin/luarocks path) + lua -e 'print(assert(require("inspect")(_G)))' +) +cd .. +rm -rf foobar + +if [ "$2" = "binary" ] +then + make binary + make install-binary + cd foobar + bin/luarocks + bin/luarocks install inspect + bin/luarocks show inspect + ( + eval $(bin/luarocks path) + lua -e 'print(assert(require("inspect")(_G)))' + ) + cd .. + rm -rf foobar +fi + +if [ "$3" = "windows" ] +then + make windows-binary +fi + +cd .. +rm -rf smoketestdir +echo +echo "Full test ran and nothing caught fire!" +echo -- cgit v1.2.3-55-g6feb From 04bbe2e4fb29922d1afc20c9d95a6e45335e09f1 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 30 Oct 2018 10:25:53 -0300 Subject: Release 3.0.4 --- .travis.yml | 6 +++--- appveyor.yml | 4 ++-- configure | 2 +- luarocks-3.0.4-1.rockspec | 37 +++++++++++++++++++++++++++++++++++++ luarocks-dev-1.rockspec | 36 ------------------------------------ src/luarocks/core/cfg.lua | 2 +- 6 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 luarocks-3.0.4-1.rockspec delete mode 100644 luarocks-dev-1.rockspec diff --git a/.travis.yml b/.travis.yml index 454de1ff..fea462a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ cache: - testrun/binary-samples smoke_script: &smoke_script - - ./makedist 3.0.0 - - ./smoke_test.sh luarocks-3.0.0.tar.gz + - ./makedist 3.0.4 + - ./smoke_test.sh luarocks-3.0.4.tar.gz unit_script: &unit_script - busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" @@ -25,7 +25,7 @@ integration_script: &integration_script - lua -v - if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck ./configure; fi - ./configure --with-lua=lua_install - - ./makedist 3.0.0 + - ./makedist 3.0.4 - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" - busted -o gtest --exclude-tags=git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" diff --git a/appveyor.yml b/appveyor.yml index 479c4960..9e51778e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 3.0.0.{build}-test +version: 3.0.4.{build}-test shallow_clone: true @@ -6,7 +6,7 @@ matrix: fast_finish: true environment: - LUAROCKS_VER: 3.0.0 + LUAROCKS_VER: 3.0.4 matrix: # Lua 5.1 tests diff --git a/configure b/configure index e64eac28..2fd2666c 100755 --- a/configure +++ b/configure @@ -318,7 +318,7 @@ do done echo -BLUE "Configuring LuaRocks version dev..." +BLUE "Configuring LuaRocks version 3.0.4..." echo echo diff --git a/luarocks-3.0.4-1.rockspec b/luarocks-3.0.4-1.rockspec new file mode 100644 index 00000000..12593405 --- /dev/null +++ b/luarocks-3.0.4-1.rockspec @@ -0,0 +1,37 @@ +rockspec_format = "3.0" +package = "luarocks" +version = "3.0.4-1" +source = { + url = "git+https://github.com/luarocks/luarocks", + tag = "v3.0.4", +} +description = { + summary = "A package manager for Lua modules.", + detailed = [[ + LuaRocks allows you to install Lua modules as self-contained + packages called "rocks", which also contain version dependency + information. This information is used both during installation, + so that when one rock is requested all rocks it depends on are + installed as well, and at run time, so that when a module is + required, the correct version is loaded. LuaRocks supports both + local and remote repositories, and multiple local rocks trees. + ]], + homepage = "http://www.luarocks.org", + issues_url = "https://github.com/luarocks/luarocks/issues", + maintainer = "Hisham Muhammad", + license = "MIT", +} +test_dependencies = { + "luacov", +} +test = { + type = "busted", + platforms = { + windows = { + flags = { "--exclude-tags=ssh,git,unix" } + }, + unix = { + flags = { "--exclude-tags=ssh,git" } + } + } +} diff --git a/luarocks-dev-1.rockspec b/luarocks-dev-1.rockspec deleted file mode 100644 index bc19e3ff..00000000 --- a/luarocks-dev-1.rockspec +++ /dev/null @@ -1,36 +0,0 @@ -rockspec_format = "3.0" -package = "luarocks" -version = "dev-1" -source = { - url = "git+https://github.com/luarocks/luarocks" -} -description = { - summary = "A package manager for Lua modules.", - detailed = [[ - LuaRocks allows you to install Lua modules as self-contained - packages called "rocks", which also contain version dependency - information. This information is used both during installation, - so that when one rock is requested all rocks it depends on are - installed as well, and at run time, so that when a module is - required, the correct version is loaded. LuaRocks supports both - local and remote repositories, and multiple local rocks trees. - ]], - homepage = "http://www.luarocks.org", - issues_url = "https://github.com/luarocks/luarocks/issues", - maintainer = "Hisham Muhammad", - license = "MIT", -} -test_dependencies = { - "luacov", -} -test = { - type = "busted", - platforms = { - windows = { - flags = { "--exclude-tags=ssh,git,unix" } - }, - unix = { - flags = { "--exclude-tags=ssh,git" } - } - } -} diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index bbcc72ac..3237786c 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -19,7 +19,7 @@ local sysdetect = require("luarocks.core.sysdetect") -------------------------------------------------------------------------------- -local program_version = "dev" +local program_version = "3.0.4" local program_series = "3.0" local major_version = (program_version:match("([^.]%.[^.])")) or program_series -- cgit v1.2.3-55-g6feb