From 37ac8cd4d3067c57e33b873545d5d887d3944cd1 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 | 24 ++++++++++++++++++++---- makedist | 4 ++-- smoke_test.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 6 deletions(-) create mode 100755 smoke_test.sh diff --git a/.travis.yml b/.travis.yml index aca8460a..d359c83a 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.1.1 + - ./smoke_test.sh luarocks-3.1.1.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 - - busted -o gtest --exclude-tags=gpg,git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis" - - busted -o gtest --exclude-tags=gpg,git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" - + - ./makedist 3.1.1 + - 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 on Linux script: *unit_script diff --git a/makedist b/makedist index 9675f7cd..a66fe9bb 100755 --- a/makedist +++ b/makedist @@ -95,7 +95,7 @@ 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" rm -f ../"$out.tar.gz.asc" @@ -103,7 +103,7 @@ 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" rm -f ../"$out-win32.zip.asc" 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 73866791fca824ed3a16d9acb63586e73d895ad2 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 6 May 2019 14:36:12 -0300 Subject: Release 3.1.1 --- appveyor.yml | 4 ++-- configure | 2 +- install.bat | 2 +- luarocks-3.1.1-1.rockspec | 37 +++++++++++++++++++++++++++++++++++++ luarocks-dev-1.rockspec | 36 ------------------------------------ src/luarocks/core/cfg.lua | 4 ++-- 6 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 luarocks-3.1.1-1.rockspec delete mode 100644 luarocks-dev-1.rockspec diff --git a/appveyor.yml b/appveyor.yml index 2117694c..174b64f7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 3.0.0.{build}-test +version: 3.1.1.{build}-test shallow_clone: true @@ -6,7 +6,7 @@ matrix: fast_finish: true environment: - LUAROCKS_VER: 3.0.0 + LUAROCKS_VER: 3.1.1 matrix: # Lua 5.1 tests diff --git a/configure b/configure index e64eac28..316537a5 100755 --- a/configure +++ b/configure @@ -318,7 +318,7 @@ do done echo -BLUE "Configuring LuaRocks version dev..." +BLUE "Configuring LuaRocks version 3.1.1..." echo echo diff --git a/install.bat b/install.bat index 43b18e1d..4d390785 100644 --- a/install.bat +++ b/install.bat @@ -6,7 +6,7 @@ local vars = {} vars.PREFIX = nil -vars.VERSION = "3.0" +vars.VERSION = "3.1" vars.SYSCONFDIR = nil vars.SYSCONFFORCE = nil vars.CONFBACKUPDIR = nil diff --git a/luarocks-3.1.1-1.rockspec b/luarocks-3.1.1-1.rockspec new file mode 100644 index 00000000..e92a2d1c --- /dev/null +++ b/luarocks-3.1.1-1.rockspec @@ -0,0 +1,37 @@ +rockspec_format = "3.0" +package = "luarocks" +version = "3.1.1-1" +source = { + url = "git+https://github.com/luarocks/luarocks", + tag = "v3.1.1", +} +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 a1f30ef4..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 02fb564b..d6732350 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua @@ -19,8 +19,8 @@ local sysdetect = require("luarocks.core.sysdetect") -------------------------------------------------------------------------------- -local program_version = "dev" -local program_series = "3.0" +local program_version = "3.1.1" +local program_series = "3.1" local major_version = (program_version:match("([^.]%.[^.])")) or program_series local is_windows = package.config:sub(1,1) == "\\" -- cgit v1.2.3-55-g6feb