From f8179800d0eccaef960442a7e65b1e305f3a96d5 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 19 Oct 2015 18:46:21 -0200 Subject: Support "luajit" as a provided dependency in rockspec format 3.0 --- test/testfiles/luajit-fail-1.0-1.rockspec | 22 ++++++++++++++++++++++ test/testfiles/luajit-success-1.0-1.rockspec | 23 +++++++++++++++++++++++ test/testing.sh | 8 ++++++++ 3 files changed, 53 insertions(+) create mode 100644 test/testfiles/luajit-fail-1.0-1.rockspec create mode 100644 test/testfiles/luajit-success-1.0-1.rockspec (limited to 'test') diff --git a/test/testfiles/luajit-fail-1.0-1.rockspec b/test/testfiles/luajit-fail-1.0-1.rockspec new file mode 100644 index 00000000..f8204600 --- /dev/null +++ b/test/testfiles/luajit-fail-1.0-1.rockspec @@ -0,0 +1,22 @@ +package = "luajit-fail" +version = "1.0-1" +source = { + url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua", +} +description = { + summary = "Test luajit dependency fail", + detailed = [[ +Fail luajit dependency when running with rockspec_format < 3.0. +]], + homepage = "http://luarocks.org/", + license = "MIT/X license" +} +dependencies = { + "luajit >= 2.0" +} +build = { + type = "builtin", + modules = { + testing = "testing.lua" + } +} diff --git a/test/testfiles/luajit-success-1.0-1.rockspec b/test/testfiles/luajit-success-1.0-1.rockspec new file mode 100644 index 00000000..31c930c3 --- /dev/null +++ b/test/testfiles/luajit-success-1.0-1.rockspec @@ -0,0 +1,23 @@ +rockspec_format = "3.0" +package = "luajit-success" +version = "1.0-1" +source = { + url = "https://raw.githubusercontent.com/keplerproject/luarocks/master/test/testing.lua", +} +description = { + summary = "Test luajit dependency fail", + detailed = [[ +Use luajit dependency when running with rockspec_format >= 3.0. +]], + homepage = "http://luarocks.org/", + license = "MIT/X license" +} +dependencies = { + "luajit >= 2.0" +} +build = { + type = "builtin", + modules = { + testing = "testing.lua" + } +} diff --git a/test/testing.sh b/test/testing.sh index 7292c75d..5ae6bb35 100755 --- a/test/testing.sh +++ b/test/testing.sh @@ -224,6 +224,7 @@ luarocks_noecho="run_lua --noecho luarocks" luarocks_noecho_nocov="run_lua --noecho --nocov luarocks" luarocks_admin="run_lua luarocks-admin" luarocks_admin_nocov="run_lua --nocov luarocks-admin" +luajit_luarocks="luajit -e require('luacov.runner')('$testing_dir/luacov.config') $basedir/bin/luarocks" ################################################### @@ -524,6 +525,13 @@ test_fetch_base_dir() { $lua <