support/testing: add lzlib test
PATCH 1/4 support/testing: add lzlib test
--- .gitlab-ci.yml | 1 + support/testing/tests/package/test_lzlib.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 support/testing/tests/package/test_lzlib.py
.gitlab-ci.yml +1 -0
@@ -399,6 +399,7 @@ tests.package.test_luasocket.TestLuaLuaSocket: { extends: .runtime_test } tests.package.test_luasocket.TestLuajitLuaSocket: { extends: .runtime_test } tests.package.test_luasyslog.TestLuaLuasyslog: { extends: .runtime_test } tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test } +tests.package.test_lzlib.TestLuaLzlib: { extends: .runtime_test } tests.package.test_openjdk.TestOpenJdk: { extends: .runtime_test } tests.package.test_perl.TestPerl: { extends: .runtime_test } tests.package.test_perl_class_load.TestPerlClassLoad: { extends: .runtime_test }
support/testing/tests/package/test_lzlib.py new file +14 -0
@@ -0,0 +1,14 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLzlib(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LZLIB=y + """ + + def test_run(self): + self.login() + self.module_test("zlib") + self.module_test("gzip")
Signature · 1 line
2.20.1
PATCH 2/4 support/testing: add lua-gd test
--- .gitlab-ci.yml | 2 ++ support/testing/tests/package/test_lua_gd.py | 31 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 support/testing/tests/package/test_lua_gd.py
.gitlab-ci.yml +2 -0
@@ -381,6 +381,8 @@ tests.package.test_lua_cqueues.TestLuaLuaCqueues: { extends: .runtime_test } tests.package.test_lua_cqueues.TestLuajitLuaCqueues: { 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_gd.TestLuaLuaGD: { extends: .runtime_test } +tests.package.test_lua_gd.TestLuajitLuaGD: { extends: .runtime_test } tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test } tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test } tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test }
support/testing/tests/package/test_lua_gd.py new file +31 -0
@@ -0,0 +1,31 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaGD(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_GD=y + BR2_PACKAGE_FONTCONFIG=y + BR2_PACKAGE_JPEG=y + BR2_PACKAGE_LIBPNG=y + """ + + def test_run(self): + self.login() + self.module_test("gd") + + +class TestLuajitLuaGD(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_GD=y + BR2_PACKAGE_FONTCONFIG=y + BR2_PACKAGE_JPEG=y + BR2_PACKAGE_LIBPNG=y + """ + + def test_run(self): + self.login() + self.module_test("gd")
Signature · 1 line
2.20.1
PATCH 2/4 support/testing: add lua-gd test
Hello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>
Regards,
Ricardo
PATCH 3/4 support/testing: add lua-sdl2 test
In reply to Francois Perrad--- .gitlab-ci.yml | 2 + .../testing/tests/package/test_lua_sdl2.py | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 support/testing/tests/package/test_lua_sdl2.py
.gitlab-ci.yml +2 -0
@@ -385,6 +385,8 @@ tests.package.test_lua_gd.TestLuaLuaGD: { extends: .runtime_test } tests.package.test_lua_gd.TestLuajitLuaGD: { extends: .runtime_test } tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test } tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuaLuaSDL2: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuajitLuaSDL2: { 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 }
support/testing/tests/package/test_lua_sdl2.py new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 3/4 support/testing: add lua-sdl2 test
Hello,
Quoted 12 lines · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>--- .gitlab-ci.yml | 2 + .../testing/tests/package/test_lua_sdl2.py | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 support/testing/tests/package/test_lua_sdl2.py.gitlab-ci.yml +0
-0
.gitlab-ci.yml tests.package.test_lua_gd.TestLuaLuaGD: { extends: .runtime_test } · line 389
Quoted 5 lines
.gitlab-ci.yml +2
-0@@ -385,6 +385,8 @@ tests.package.test_lua_gd.TestLuaLuaGD: { extends: .runtime_test } tests.package.test_lua_gd.TestLuajitLuaGD: { extends: .runtime_test } tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test } tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuaLuaSDL2: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuajitLuaSDL2: { extends: .runtime_test }
These 2 test cases failed for me:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517926
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517929
with this output:
# lua -l SDL -e 'a=1' lua: module 'SDL' not found: no field package.preload['SDL'] no file './SDL.lua' no file '/usr/share/luajit-2.0.5/SDL.lua' no file '/usr/local/share/lua/5.1/SDL.lua' no file '/usr/local/share/lua/5.1/SDL/init.lua' no file '/usr/share/lua/5.1/SDL.lua' no file '/usr/share/lua/5.1/SDL/init.lua' no file './SDL.so' no file '/usr/local/lib/lua/5.1/SDL.so' no file '/usr/lib/lua/5.1/SDL.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: at 0xb6f51bb0 [C]: at 0x00011af8 # echo $? 1 #
Regards,
Ricardo
PATCH 3/4 support/testing: add lua-sdl2 test
Le lun. 7 oct. 2019 ? 02:07, Ricardo Martincoski < [email protected]> a ?crit :
Quoted 24 lines
Hello,
.gitlab-ci.yml tests.package.test_lua_gd.TestLuaLuaGD: { extends:
Quoted 12 lines · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>--- .gitlab-ci.yml | 2 + .../testing/tests/package/test_lua_sdl2.py | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 support/testing/tests/package/test_lua_sdl2.py.gitlab-ci.yml +0
-0@@ -385,6 +385,8 @@ tests.package.test_lua_gd.TestLuaLuaGD: { extends:.runtime_test }
.gitlab-ci.yml tests.package.test_lua_gd.TestLuaLuaGD: { extends: .runtime_test }
Quoted 5 lines
.gitlab-ci.yml +2
-0tests.package.test_lua_gd.TestLuajitLuaGD: { extends: .runtime_test } tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test } tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuaLuaSDL2: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuajitLuaSDL2: { extends: .runtime_test}
Quoted 5 lines
These 2 test cases failed for me:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517926
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517929
Ricardo,
you need this fix https://patchwork.ozlabs.org/patch/1172611/
Fran?ois
Quoted 22 lines
with this output:
# lua -l SDL -e 'a=1' lua: module 'SDL' not found: no field package.preload['SDL'] no file './SDL.lua' no file '/usr/share/luajit-2.0.5/SDL.lua' no file '/usr/local/share/lua/5.1/SDL.lua' no file '/usr/local/share/lua/5.1/SDL/init.lua' no file '/usr/share/lua/5.1/SDL.lua' no file '/usr/share/lua/5.1/SDL/init.lua' no file './SDL.so' no file '/usr/local/lib/lua/5.1/SDL.so' no file '/usr/lib/lua/5.1/SDL.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: at 0xb6f51bb0 [C]: at 0x00011af8 # echo $? 1 #
Quoted 6 lines
Regards,
Ricardo_______________________________________________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/20191007/58db83b4/attachment.html>
PATCH 3/4 support/testing: add lua-sdl2 test
Hello,
Quoted 6 lines · Fran?ois Perrad
Le lun. 7 oct. 2019 ? 02:07, Ricardo Martincoski < ricardo.martincoski at gmail.com> a ?crit :
Quoted 3 lines
Hello,
On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
[snip]
Quoted 4 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+tests.package.test_lua_sdl2.TestLuaLuaSDL2: { extends: .runtime_test } +tests.package.test_lua_sdl2.TestLuajitLuaSDL2: { extends: .runtime_test}
Quoted 8 lines
Quoted 5 lines
These 2 test cases failed for me:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517926
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517929Ricardo,
you need this fix https://patchwork.ozlabs.org/patch/1172611/
Thank you, I will reply with my tags to both patches.
Regards,
Ricardo
PATCH 3/4 support/testing: add lua-sdl2 test
In reply to Francois PerradHello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>
These test cases fail on current master:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517926
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/312517929
The same test cases pass after applying a fix:
https://patchwork.ozlabs.org/patch/1172611/
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/314232922
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/314232995
Regards,
Ricardo
PATCH 4/4 support/testing: add luvi test
In reply to Francois Perrad--- .gitlab-ci.yml | 1 + support/testing/tests/package/test_luvi.py | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 support/testing/tests/package/test_luvi.py
.gitlab-ci.yml +1 -0
@@ -403,6 +403,7 @@ tests.package.test_luasocket.TestLuaLuaSocket: { extends: .runtime_test } tests.package.test_luasocket.TestLuajitLuaSocket: { extends: .runtime_test } tests.package.test_luasyslog.TestLuaLuasyslog: { extends: .runtime_test } tests.package.test_luasyslog.TestLuajitLuasyslog: { extends: .runtime_test } +tests.package.test_luvi.TestLuvi: { extends: .runtime_test } tests.package.test_lzlib.TestLuaLzlib: { extends: .runtime_test } tests.package.test_openjdk.TestOpenJdk: { extends: .runtime_test } tests.package.test_perl.TestPerl: { extends: .runtime_test }
support/testing/tests/package/test_luvi.py new file +36 -0
@@ -0,0 +1,36 @@ +import os + +import infra.basetest + + +class TestLuvi(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUVI=y + BR2_PACKAGE_OPENSSL=y + BR2_PACKAGE_PCRE=y + BR2_PACKAGE_ZLIB=y + """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + def version_test(self): + cmd = "luvi -v" + output, exit_code = self.emulator.run(cmd) + self.assertIn('luvi', output[0]) + self.assertIn('zlib', output[1]) + self.assertIn('rex', output[2]) + self.assertIn('libuv', output[3]) + self.assertIn('ssl', output[4]) + + def test_run(self): + self.login() + self.version_test()
Signature · 1 line
2.20.1
PATCH 4/4 support/testing: add luvi test
Hello,
I did not find anything really wrong with this patch, but I think we can reuse more code.
Did you find any issue using the armv5 kernel?
For me it seems to work fine:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/313198399
In the case we can use the armv5 kernel, we can also use TestLuaBase, by doing 3 changes I propose below.
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/314234461
On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
[snip]
support/testing/tests/package/test_luvi.py line 3
Quoted 10 lines
support/testing/tests/package/test_luvi.py new file +3
-0@@ -0,0 +1,36 @@ +import os + +import infra.basetest
These would become:
from tests.package.test_lua import TestLuaBase
support/testing/tests/package/test_luvi.py line 10
Quoted 8 lines
support/testing/tests/package/test_luvi.py new file +7
-0+ + +class TestLuvi(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set
These would become:
class TestLuvi(TestLuaBase):
config = TestLuaBase.config + \
"""Quoted 5 lines
support/testing/tests/package/test_luvi.py new file +5
-0+ BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUVI=y + BR2_PACKAGE_OPENSSL=y + BR2_PACKAGE_PCRE=y + BR2_PACKAGE_ZLIB=y
support/testing/tests/package/test_luvi.py line 24
Quoted 10 lines
support/testing/tests/package/test_luvi.py new file +9
-0+ """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() +
And login() would not be defined, reusing the implementation from the parent class.
support/testing/tests/package/test_luvi.py line 36
Quoted 13 lines
support/testing/tests/package/test_luvi.py new file +12
-0+ def version_test(self): + cmd = "luvi -v" + output, exit_code = self.emulator.run(cmd) + self.assertIn('luvi', output[0]) + self.assertIn('zlib', output[1]) + self.assertIn('rex', output[2]) + self.assertIn('libuv', output[3]) + self.assertIn('ssl', output[4]) + + def test_run(self): + self.login() + self.version_test()
Regards,
Ricardo
PATCH 4/4 support/testing: add luvi test
Le mar. 8 oct. 2019 ? 01:38, Ricardo Martincoski < [email protected]> a ?crit :
Quoted 7 lines
Hello,
I did not find anything really wrong with this patch, but I think we can reuse
more code.
I disagree.
luvi is related to lua, but it is not a Lua module (like NodeJS which is an JavaScript interpreter, is not a JavaScript library/module). so, it is a choice to not use TestLuaBase.
In my todo list, I want remove luvi from the Lua modules section in package/Config.in, and find its real location.
Fran?ois
Quoted 75 lines
Did you find any issue using the armv5 kernel?
For me it seems to work fine:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/313198399In the case we can use the armv5 kernel, we can also use TestLuaBase, by doing
3 changes I propose below.
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/314234461On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
[snip]
Review
Quoted 1 line
(quoted diff) +0
-0
b/support/testing/tests/package/test_luvi.pysupport/testing/tests/package/test_luvi.py line 3
Quoted 9 lines
new file mode 100644
index 000000000..a85a6f4d2support/testing/tests/package/test_luvi.py new file +3
-0@@ -0,0 +1,36 @@ +import os + +import infra.basetestThese would become:
from tests.package.test_lua import TestLuaBasesupport/testing/tests/package/test_luvi.py line 10
Quoted 8 lines
support/testing/tests/package/test_luvi.py new file +7
-0+ + +class TestLuvi(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not setThese would become:
class TestLuvi(TestLuaBase):config = TestLuaBase.config + \ """Quoted 5 lines
support/testing/tests/package/test_luvi.py new file +5
-0+ BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUVI=y + BR2_PACKAGE_OPENSSL=y + BR2_PACKAGE_PCRE=y + BR2_PACKAGE_ZLIB=ysupport/testing/tests/package/test_luvi.py line 24
Quoted 10 lines
support/testing/tests/package/test_luvi.py new file +9
-0+ """ + + def login(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv7", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() +And
login()would not be defined, reusing the implementation from the parent
class.support/testing/tests/package/test_luvi.py
Quoted 13 lines
support/testing/tests/package/test_luvi.py new file +12
-1+ def version_test(self): + cmd = "luvi -v" + output, exit_code = self.emulator.run(cmd) + self.assertIn('luvi', output[0]) + self.assertIn('zlib', output[1]) + self.assertIn('rex', output[2]) + self.assertIn('libuv', output[3]) + self.assertIn('ssl', output[4]) + + def test_run(self): + self.login() + self.version_test() --
Quoted 6 lines
Regards,
Ricardo_______________________________________________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/20191008/1bd9498d/attachment.html>
PATCH 4/4 support/testing: add luvi test
Hello,
Quoted 10 lines · Fran?ois Perrad
Le mar. 8 oct. 2019 ? 01:38, Ricardo Martincoski < ricardo.martincoski at gmail.com> a ?crit :
Quoted 7 lines
Hello,
I did not find anything really wrong with this patch, but I think we can reuse
more code.
Quoted 4 lines
I disagree.
luvi is related to lua, but it is not a Lua module (like NodeJS which is an JavaScript interpreter, is not a JavaScript library/module). so, it is a choice to not use TestLuaBase.
You are right. Thank you for your explanation.
Regards,
Ricardo
PATCH 4/4 support/testing: add luvi test
In reply to Francois PerradHello,
On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
Perhaps when applying this patch the commit message could be extended, something like this:
Do not import TestLuaBase since luvi is related to lua, but it is not a Lua module.
Quoted 2 lines
Signed-off-by Francois Perrad <[email protected]>
Regards,
Ricardo
PATCH 1/4 support/testing: add lzlib test
In reply to Francois PerradHello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>
Regards,
Ricardo
PATCH 1/4 support/testing: add lzlib test
In reply to Francois PerradQuoted 6 lines · On Sun, 29 Sep 2019 14:55:17 +0200 Francois Perrad <[email protected]> wrote:
Signed-off-by Francois Perrad <[email protected]>--- .gitlab-ci.yml | 1 + support/testing/tests/package/test_lzlib.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 support/testing/tests/package/test_lzlib.py
Series applied. Thanks! And thanks to Ricardo for the review.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com