* [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test
@ 2019-02-19 15:43 Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 02/11] support/testing: add lpeg test Francois Perrad
` (10 more replies)
0 siblings, 11 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/luarocks/buildroot.lua | 60 ++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/package/luarocks/buildroot.lua b/package/luarocks/buildroot.lua
index 4be5fbd7c..61e44a867 100644
--- a/package/luarocks/buildroot.lua
+++ b/package/luarocks/buildroot.lua
@@ -49,6 +49,27 @@ local function wrap (txt, max)
return lines
end
+local function has_c_files (rockspec)
+ for _, mod in pairs(rockspec.build.modules or {}) do
+ if type(mod) == 'string' then
+ if mod:match'%.c$' then
+ return true
+ end
+ elseif type(mod) == 'table' then
+ local sources = mod.sources
+ if type(sources) == 'string' and sources:match'%.c$' then
+ return true
+ end
+ for _, src in ipairs(sources or mod) do
+ if src:match'%.c$' then
+ return true
+ end
+ end
+ end
+ end
+ return false
+end
+
local function get_external_dependencies (rockspec)
local t = {}
for k in pairs(rockspec.external_dependencies or {}) do
@@ -228,6 +249,42 @@ local function generate_hash (rockspec, lcname, rock_file, licenses, digest)
f:close()
end
+local function generate_test (rockspec, lcname)
+ local ucname = brname(lcname)
+ local modname = rockspec.package:gsub('%-', '')
+ local classname = modname:gsub('%.', '')
+ classname = classname:sub(1, 1):upper() .. classname:sub(2)
+ local fname = 'support/testing/tests/package/test_' .. ucname:lower() .. '.py'
+ local f = assert(io.open(fname, 'w'))
+ util.printout('write ' .. fname)
+ f:write('from tests.package.test_lua import TestLuaBase\n')
+ f:write('\n')
+ f:write('\n')
+ f:write('class TestLua' .. classname .. '(TestLuaBase):\n')
+ f:write(' config = TestLuaBase.config + \\\n')
+ f:write(' """\n')
+ f:write(' BR2_PACKAGE_LUA=y\n')
+ f:write(' BR2_PACKAGE_' .. ucname .. '=y\n')
+ f:write(' """\n')
+ f:write('\n')
+ f:write(' def test_run(self):\n')
+ f:write(' self.login()\n')
+ f:write(' self.module_test("' .. modname .. '")\n')
+ f:write('\n')
+ f:write('\n')
+ f:write('class TestLuajit' .. classname .. '(TestLuaBase):\n')
+ f:write(' config = TestLuaBase.config + \\\n')
+ f:write(' """\n')
+ f:write(' BR2_PACKAGE_LUAJIT=y\n')
+ f:write(' BR2_PACKAGE_' .. ucname .. '=y\n')
+ f:write(' """\n')
+ f:write('\n')
+ f:write(' def test_run(self):\n')
+ f:write(' self.login()\n')
+ f:write(' self.module_test("' .. modname .. '")\n')
+ f:close()
+end
+
--- Driver function for the "buildroot" command.
-- @param rockname string: the name of a rock to be fetched and unpacked.
-- @param brname string: the name used by Buildroot (optional)
@@ -319,6 +376,9 @@ function buildroot.command(flags, rockname, fsname)
generate_config(rockspec, fsname:lower())
generate_mk(rockspec, fsname:lower(), licenses)
generate_hash(rockspec, fsname:lower(), rock_file, licenses, digest)
+ if has_c_files(rockspec) then
+ generate_test(rockspec, fsname:lower())
+ end
return true
end
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 02/11] support/testing: add lpeg test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 03/11] support/testing: add lsqlite3 test Francois Perrad
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
support/testing/tests/package/test_lpeg.py | 25 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_lpeg.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2f0ebaa25..1730f3906 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -326,6 +326,8 @@ tests.package.test_docker_compose.TestDockerCompose: { extends: .runtime_test }
tests.package.test_dropbear.TestDropbear: { extends: .runtime_test }
tests.package.test_ipython.TestIPythonPy2: { extends: .runtime_test }
tests.package.test_ipython.TestIPythonPy3: { extends: .runtime_test }
+tests.package.test_lpeg.TestLuaLPeg: { extends: .runtime_test }
+tests.package.test_lpeg.TestLuajitLPeg: { extends: .runtime_test }
tests.package.test_lua.TestLua: { extends: .runtime_test }
tests.package.test_lua.TestLuajit: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_lpeg.py b/support/testing/tests/package/test_lpeg.py
new file mode 100644
index 000000000..e57415735
--- /dev/null
+++ b/support/testing/tests/package/test_lpeg.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLPeg(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LPEG=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lpeg", script="print(require[[lpeg]].version())")
+
+
+class TestLuajitLPeg(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LPEG=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lpeg", script="print(require[[lpeg]].version())")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 03/11] support/testing: add lsqlite3 test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 02/11] support/testing: add lpeg test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 04/11] support/testing: add lua-curl test Francois Perrad
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../testing/tests/package/test_lsqlite3.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_lsqlite3.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1730f3906..b67b3cde1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -328,6 +328,8 @@ tests.package.test_ipython.TestIPythonPy2: { extends: .runtime_test }
tests.package.test_ipython.TestIPythonPy3: { extends: .runtime_test }
tests.package.test_lpeg.TestLuaLPeg: { extends: .runtime_test }
tests.package.test_lpeg.TestLuajitLPeg: { extends: .runtime_test }
+tests.package.test_lsqlite3.TestLuaLsqlite3: { extends: .runtime_test }
+tests.package.test_lsqlite3.TestLuajitLsqlite3: { extends: .runtime_test }
tests.package.test_lua.TestLua: { extends: .runtime_test }
tests.package.test_lua.TestLuajit: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_lsqlite3.py b/support/testing/tests/package/test_lsqlite3.py
new file mode 100644
index 000000000..d87477464
--- /dev/null
+++ b/support/testing/tests/package/test_lsqlite3.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLsqlite3(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LSQLITE3=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lsqlite3")
+
+
+class TestLuajitLsqlite3(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LSQLITE3=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lsqlite3")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 04/11] support/testing: add lua-curl test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 02/11] support/testing: add lpeg test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 03/11] support/testing: add lsqlite3 test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 05/11] support/testing: add lua-utf8 test Francois Perrad
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../testing/tests/package/test_lua_curl.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_lua_curl.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b67b3cde1..e4e9dcb23 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -332,6 +332,8 @@ tests.package.test_lsqlite3.TestLuaLsqlite3: { extends: .runtime_test }
tests.package.test_lsqlite3.TestLuajitLsqlite3: { extends: .runtime_test }
tests.package.test_lua.TestLua: { extends: .runtime_test }
tests.package.test_lua.TestLuajit: { extends: .runtime_test }
+tests.package.test_lua_curl.TestLuaLuacURL: { extends: .runtime_test }
+tests.package.test_lua_curl.TestLuajitLuacURL: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_lua_curl.py b/support/testing/tests/package/test_lua_curl.py
new file mode 100644
index 000000000..5ee79313f
--- /dev/null
+++ b/support/testing/tests/package/test_lua_curl.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuacURL(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUA_CURL=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("cURL")
+
+
+class TestLuajitLuacURL(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUA_CURL=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("cURL")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 05/11] support/testing: add lua-utf8 test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (2 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 04/11] support/testing: add lua-curl test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 06/11] support/testing: add luaexpat test Francois Perrad
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../testing/tests/package/test_lua_utf8.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_lua_utf8.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e4e9dcb23..ad7186a98 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -334,6 +334,8 @@ tests.package.test_lua.TestLua: { extends: .runtime_test }
tests.package.test_lua.TestLuajit: { extends: .runtime_test }
tests.package.test_lua_curl.TestLuaLuacURL: { extends: .runtime_test }
tests.package.test_lua_curl.TestLuajitLuacURL: { extends: .runtime_test }
+tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test }
+tests.package.test_lua_utf8.TestLuajitUtf8: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_lua_utf8.py b/support/testing/tests/package/test_lua_utf8.py
new file mode 100644
index 000000000..3eab19dd4
--- /dev/null
+++ b/support/testing/tests/package/test_lua_utf8.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaUtf8(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUA_UTF8=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("utf8")
+
+
+class TestLuajitUtf8(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUA_UTF8=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("utf8")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 06/11] support/testing: add luaexpat test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (3 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 05/11] support/testing: add lua-utf8 test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 07/11] support/testing: add luafilesystem test Francois Perrad
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../testing/tests/package/test_luaexpat.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_luaexpat.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad7186a98..f96f7f130 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -336,6 +336,8 @@ tests.package.test_lua_curl.TestLuaLuacURL: { extends: .runtime_test }
tests.package.test_lua_curl.TestLuajitLuacURL: { extends: .runtime_test }
tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test }
tests.package.test_lua_utf8.TestLuajitUtf8: { extends: .runtime_test }
+tests.package.test_luaexpat.TestLuaLuaExpat: { extends: .runtime_test }
+tests.package.test_luaexpat.TestLuajitLuaExpat: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_luaexpat.py b/support/testing/tests/package/test_luaexpat.py
new file mode 100644
index 000000000..c71c3fadb
--- /dev/null
+++ b/support/testing/tests/package/test_luaexpat.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaExpat(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUAEXPAT=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lxp")
+
+
+class TestLuajitLuaExpat(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUAEXPAT=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lxp")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 07/11] support/testing: add luafilesystem test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (4 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 06/11] support/testing: add luaexpat test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 08/11] support/testing: add luaossl test Francois Perrad
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../tests/package/test_luafilesystem.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_luafilesystem.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f96f7f130..a73d6b7d0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -338,6 +338,8 @@ tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test }
tests.package.test_lua_utf8.TestLuajitUtf8: { extends: .runtime_test }
tests.package.test_luaexpat.TestLuaLuaExpat: { extends: .runtime_test }
tests.package.test_luaexpat.TestLuajitLuaExpat: { extends: .runtime_test }
+tests.package.test_luafilesystem.TestLuaLuaFileSystem: { extends: .runtime_test }
+tests.package.test_luafilesystem.TestLuajitLuaFileSystem: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_luafilesystem.py b/support/testing/tests/package/test_luafilesystem.py
new file mode 100644
index 000000000..a84c1f300
--- /dev/null
+++ b/support/testing/tests/package/test_luafilesystem.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaFileSystem(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUAFILESYSTEM=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lfs")
+
+
+class TestLuajitLuaFileSystem(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUAFILESYSTEM=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("lfs")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 08/11] support/testing: add luaossl test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (5 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 07/11] support/testing: add luafilesystem test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 09/11] support/testing: add luasec test Francois Perrad
` (3 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
support/testing/tests/package/test_luaossl.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_luaossl.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a73d6b7d0..92a54bd1f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -340,6 +340,8 @@ tests.package.test_luaexpat.TestLuaLuaExpat: { extends: .runtime_test }
tests.package.test_luaexpat.TestLuajitLuaExpat: { extends: .runtime_test }
tests.package.test_luafilesystem.TestLuaLuaFileSystem: { extends: .runtime_test }
tests.package.test_luafilesystem.TestLuajitLuaFileSystem: { extends: .runtime_test }
+tests.package.test_luaossl.TestLuaLuaossl: { extends: .runtime_test }
+tests.package.test_luaosll.TestLuajitLuaossl: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_luaossl.py b/support/testing/tests/package/test_luaossl.py
new file mode 100644
index 000000000..f6914e054
--- /dev/null
+++ b/support/testing/tests/package/test_luaossl.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaossl(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUAOSSL=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("openssl")
+
+
+class TestLuajitLuaossl(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUAOSSL=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("openssl")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 09/11] support/testing: add luasec test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (6 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 08/11] support/testing: add luaossl test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 10/11] support/testing: add luasocket test Francois Perrad
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
support/testing/tests/package/test_luasec.py | 25 ++++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_luasec.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 92a54bd1f..12ac3a43e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -342,6 +342,8 @@ tests.package.test_luafilesystem.TestLuaLuaFileSystem: { extends: .runtime_test
tests.package.test_luafilesystem.TestLuajitLuaFileSystem: { extends: .runtime_test }
tests.package.test_luaossl.TestLuaLuaossl: { extends: .runtime_test }
tests.package.test_luaosll.TestLuajitLuaossl: { extends: .runtime_test }
+tests.package.test_luasec.TestLuaLuaSec: { extends: .runtime_test }
+tests.package.test_luasec.TestLuajitLuaSec: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_luasec.py b/support/testing/tests/package/test_luasec.py
new file mode 100644
index 000000000..f87326362
--- /dev/null
+++ b/support/testing/tests/package/test_luasec.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaSec(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUASEC=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("ssl")
+
+
+class TestLuajitLuaSec(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUASEC=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("ssl")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 10/11] support/testing: add luasocket test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (7 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 09/11] support/testing: add luasec test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 11/11] support/testing: add rings test Francois Perrad
2019-03-28 16:22 ` [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Thomas Petazzoni
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
.../testing/tests/package/test_luasocket.py | 25 +++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_luasocket.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 12ac3a43e..65f9d5a1f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -344,6 +344,8 @@ tests.package.test_luaossl.TestLuaLuaossl: { extends: .runtime_test }
tests.package.test_luaosll.TestLuajitLuaossl: { extends: .runtime_test }
tests.package.test_luasec.TestLuaLuaSec: { extends: .runtime_test }
tests.package.test_luasec.TestLuajitLuaSec: { extends: .runtime_test }
+tests.package.test_luasocket.TestLuaLuaSocket: { extends: .runtime_test }
+tests.package.test_luasocket.TestLuajitLuaSocket: { extends: .runtime_test }
tests.package.test_perl.TestPerl: { extends: .runtime_test }
tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
tests.package.test_perl_dbd_mysql.TestPerlDBDmysql: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_luasocket.py b/support/testing/tests/package/test_luasocket.py
new file mode 100644
index 000000000..c2d19d78c
--- /dev/null
+++ b/support/testing/tests/package/test_luasocket.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaSocket(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_LUASOCKET=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("socket")
+
+
+class TestLuajitLuaSocket(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_LUASOCKET=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("socket")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 11/11] support/testing: add rings test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (8 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 10/11] support/testing: add luasocket test Francois Perrad
@ 2019-02-19 15:43 ` Francois Perrad
2019-03-28 16:22 ` [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Thomas Petazzoni
10 siblings, 0 replies; 14+ messages in thread
From: Francois Perrad @ 2019-02-19 15:43 UTC (permalink / raw)
To: buildroot
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
.gitlab-ci.yml | 2 ++
support/testing/tests/package/test_rings.py | 25 +++++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 support/testing/tests/package/test_rings.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65f9d5a1f..86067757c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -403,6 +403,8 @@ tests.package.test_python_txtorcon.TestPythonPy2Txtorcon: { extends: .runtime_te
tests.package.test_python_txtorcon.TestPythonPy3Txtorcon: { extends: .runtime_test }
tests.package.test_python_ubjson.TestPythonPy2Ubjson: { extends: .runtime_test }
tests.package.test_python_ubjson.TestPythonPy3Ubjson: { extends: .runtime_test }
+tests.package.test_rings.TestLuaRings: { extends: .runtime_test }
+tests.package.test_rings.TestLuajitRings: { extends: .runtime_test }
tests.package.test_rust.TestRust: { extends: .runtime_test }
tests.package.test_rust.TestRustBin: { extends: .runtime_test }
tests.package.test_syslog_ng.TestSyslogNg: { extends: .runtime_test }
diff --git a/support/testing/tests/package/test_rings.py b/support/testing/tests/package/test_rings.py
new file mode 100644
index 000000000..be9765f18
--- /dev/null
+++ b/support/testing/tests/package/test_rings.py
@@ -0,0 +1,25 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaRings(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUA=y
+ BR2_PACKAGE_RINGS=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("rings")
+
+
+class TestLuajitRings(TestLuaBase):
+ config = TestLuaBase.config + \
+ """
+ BR2_PACKAGE_LUAJIT=y
+ BR2_PACKAGE_RINGS=y
+ """
+
+ def test_run(self):
+ self.login()
+ self.module_test("rings")
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
` (9 preceding siblings ...)
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 11/11] support/testing: add rings test Francois Perrad
@ 2019-03-28 16:22 ` Thomas Petazzoni
2019-03-28 17:13 ` François Perrad
10 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2019-03-28 16:22 UTC (permalink / raw)
To: buildroot
Hello Fran?ois,
On Tue, 19 Feb 2019 16:43:01 +0100
Francois Perrad <fperrad@gmail.com> wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/luarocks/buildroot.lua | 60 ++++++++++++++++++++++++++++++++++
> 1 file changed, 60 insertions(+)
I have applied this entire series, thanks! It's going in the good
direction, but I found some odd things.
The lpeg test looks like this:
+ self.module_test("lpeg", script="print(require[[lpeg]].version())")
which clearly cannot have been generated by the Luarocks "buildroot"
script, which does only:
+ f:write(' self.module_test("' .. modname .. '")\n')
Also, I've used "lpeg-upgrade" and "rings-upgrade" as tests, and
noticed some differences:
- self.module_test("lpeg", script="print(require[[lpeg]].version())")
+ self.module_test("LPeg")
So we have the difference I explained above + a difference in the
casing of the module.
We have the same casing difference with rings:
- self.module_test("rings")
+ self.module_test("Rings")
Is this expected ?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test
2019-03-28 16:22 ` [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Thomas Petazzoni
@ 2019-03-28 17:13 ` François Perrad
2019-03-28 17:22 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: François Perrad @ 2019-03-28 17:13 UTC (permalink / raw)
To: buildroot
Le jeu. 28 mars 2019 ? 17:22, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :
> Hello Fran?ois,
>
> On Tue, 19 Feb 2019 16:43:01 +0100
> Francois Perrad <fperrad@gmail.com> wrote:
>
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> > package/luarocks/buildroot.lua | 60 ++++++++++++++++++++++++++++++++++
> > 1 file changed, 60 insertions(+)
>
> I have applied this entire series, thanks! It's going in the good
> direction, but I found some odd things.
>
> The lpeg test looks like this:
>
> + self.module_test("lpeg",
> script="print(require[[lpeg]].version())")
>
> which clearly cannot have been generated by the Luarocks "buildroot"
> script, which does only:
>
> + f:write(' self.module_test("' .. modname .. '")\n')
>
> Also, I've used "lpeg-upgrade" and "rings-upgrade" as tests, and
> noticed some differences:
>
> - self.module_test("lpeg",
> script="print(require[[lpeg]].version())")
> + self.module_test("LPeg")
>
> So we have the difference I explained above + a difference in the
> casing of the module.
>
> We have the same casing difference with rings:
>
> - self.module_test("rings")
> + self.module_test("Rings")
>
> Is this expected ?
>
Yes, more or less.
The lua ecosystem has no common policy about naming, etc...
So, a generated stuff sometime needs a manual editing.
Fran?ois
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190328/6dcc32fc/attachment.html>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test
2019-03-28 17:13 ` François Perrad
@ 2019-03-28 17:22 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2019-03-28 17:22 UTC (permalink / raw)
To: buildroot
On Thu, 28 Mar 2019 18:13:05 +0100
Fran?ois Perrad <francois.perrad@gadz.org> wrote:
> > Is this expected ?
> >
>
> Yes, more or less.
>
> The lua ecosystem has no common policy about naming, etc...
> So, a generated stuff sometime needs a manual editing.
So for lpeg you really a special .module_test() call ?
Why is the "rings" test case not matching the output of "make
rings-upgrade" ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-03-28 17:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 15:43 [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 02/11] support/testing: add lpeg test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 03/11] support/testing: add lsqlite3 test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 04/11] support/testing: add lua-curl test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 05/11] support/testing: add lua-utf8 test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 06/11] support/testing: add luaexpat test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 07/11] support/testing: add luafilesystem test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 08/11] support/testing: add luaossl test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 09/11] support/testing: add luasec test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 10/11] support/testing: add luasocket test Francois Perrad
2019-02-19 15:43 ` [Buildroot] [next/testing Lua modules 11/11] support/testing: add rings test Francois Perrad
2019-03-28 16:22 ` [Buildroot] [next/testing Lua modules 01/11] luarocks: add generation of test Thomas Petazzoni
2019-03-28 17:13 ` François Perrad
2019-03-28 17:22 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox