suppport/testing: Lua and friends
cover suppport/testing: Lua and friends
test_lua.py allows to test the Lua interpreters, and it is used as base class for testing Lua modules.
note1: Prosody is not a Lua module, but an application using Lua and some Lua modules.
note2: the patch 3/3 is a fix, and must be applied also in master
Francois Perrad (3):
support/testing: add lua test
support/testing; add prosody test
prosody: fix runtime dependencies
.gitlab-ci.yml | 4 ++ package/prosody/Config.in | 5 ++ support/testing/tests/package/test_lua.py | 59 +++++++++++++++++++ support/testing/tests/package/test_prosody.py | 48 +++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 support/testing/tests/package/test_lua.py create mode 100644 support/testing/tests/package/test_prosody.py
Signature · 1 line
2.17.1
PATCH 1/3 support/testing: add lua test
--- .gitlab-ci.yml | 2 + support/testing/tests/package/test_lua.py | 59 +++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 support/testing/tests/package/test_lua.py
.gitlab-ci.yml +2 -0
@@ -312,6 +312,8 @@ tests.init.test_systemd.TestInitSystemSystemdRwNetworkd: *runtime_test tests.package.test_dropbear.TestDropbear: *runtime_test tests.package.test_ipython.TestIPythonPy2: *runtime_test tests.package.test_ipython.TestIPythonPy3: *runtime_test +tests.package.test_lua.TestLua: *runtime_test +tests.package.test_lua.TestLuajit: *runtime_test tests.package.test_perl.TestPerl: *runtime_test tests.package.test_perl_class_load.TestPerlClassLoad: *runtime_test tests.package.test_perl_gdgraph.TestPerlGDGraph: *runtime_test
support/testing/tests/package/test_lua.py new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/3 support/testing: add lua test
Hello,
Quoted 1 line · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>
[with the entire series applied:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/129168829
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/129168830]
Regards,
Ricardo
PATCH 2/3 support/testing; add prosody test
In reply to Francois Perrad--- .gitlab-ci.yml | 2 + support/testing/tests/package/test_prosody.py | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 support/testing/tests/package/test_prosody.py
.gitlab-ci.yml +2 -0
@@ -321,6 +321,8 @@ tests.package.test_perl_libwww_perl.TestPerllibwwwperl: *runtime_test tests.package.test_perl_mail_dkim.TestPerlMailDKIM: *runtime_test tests.package.test_perl_x10.TestPerlX10: *runtime_test tests.package.test_perl_xml_libxml.TestPerlXMLLibXML: *runtime_test +tests.package.test_prosody.TestLua51Prosody: *runtime_test +tests.package.test_prosody.TestLuajitProsody: *runtime_test tests.package.test_python.TestPython2: *runtime_test tests.package.test_python.TestPython3: *runtime_test tests.package.test_python_argh.TestPythonPy2Argh: *runtime_test
support/testing/tests/package/test_prosody.py new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/3 support/testing; add prosody test
Hello,
support/testing/tests/package/test_prosody.py line 17
Quoted 6 lines · Francois Perrad
support/testing/tests/package/test_prosody.py new file +6
-0+ def prosody_test(self): + # prosody was launched as service + cmd = "prosodyctl status" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn("Prosody is running", output[0])
I get an error message before the expected string:
# prosodyctl status certmanager error SSL/TLS: Error initialising for client_https port 0: unknown elliptic curve in "X25519:P-384:P-256:P-521" Prosody is running with PID 727 #
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/125808115
I don't know if this message is expected in this minimal config or not. If it is expected, we could add a comment and run something like this:
self.assertIn("Prosody is running", output[1])
Any ideas?
Regards,
Ricardo
PATCH 2/3 support/testing; add prosody test
Le mar. 27 nov. 2018 ? 03:43, Ricardo Martincoski < [email protected]> a ?crit :
Quoted 19 lines
Hello,
support/testing/tests/package/test_prosody.py line 17
Quoted 6 lines · Francois Perrad
support/testing/tests/package/test_prosody.py new file +6
-0+ def prosody_test(self): + # prosody was launched as service + cmd = "prosodyctl status" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn("Prosody is running", output[0])I get an error message before the expected string:
# prosodyctl status certmanager error SSL/TLS: Error initialising for client_https port 0: unknown elliptic curve in "X25519:P-384:P-256:P-521" Prosody is running with PID 727 #
Quoted 9 lines
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/125808115
I don't know if this message is expected in this minimal config or not. If it is expected, we could add a comment and run something like this:
self.assertIn("Prosody is running", output[1])Any ideas?
We use the same "minimal" config.
We have a reproductibility issue.
I run test_prosody on my local box : "Prosody is running" is in output[0] You run the same test in Gitlab CI : "Prosody is running" is in output[1]
Could you try to run the test locally ?
Fran?ois
Quoted 7 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/20181127/b999f5fb/attachment.html>
PATCH 2/3 support/testing; add prosody test
Hello,
Quoted 29 lines · Fran?ois Perrad
Le mar. 27 nov. 2018 ? 03:43, Ricardo Martincoski < ricardo.martincoski at gmail.com> a ?crit :
Quoted 18 lines · Francois Perrad
support/testing/tests/package/test_prosody.py line 17
Quoted 7 lines
support/testing/tests/package/test_prosody.py new file +6
-0+ def prosody_test(self): + # prosody was launched as service + cmd = "prosodyctl status" + output, exit_code = self.emulator.run(cmd) + self.assertEqual(exit_code, 0) + self.assertIn("Prosody is running", output[0])I get an error message before the expected string:
# prosodyctl status certmanager error SSL/TLS: Error initialising for client_https port 0: unknown elliptic curve in "X25519:P-384:P-256:P-521" Prosody is running with PID 727 #Quoted 9 lines
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/125808115
I don't know if this message is expected in this minimal config or not. If it is expected, we could add a comment and run something like this:
self.assertIn("Prosody is running", output[1])Any ideas?
Quoted 6 lines
We use the same "minimal" config.
We have a reproductibility issue.
I runtest_prosodyon my local box : "Prosody is running" is in output[0] You run the same test in Gitlab CI : "Prosody is running" is in output[1]Could you try to run the test locally ?
Sure.
Calling run-tests locally (based on next branch 06a2d67c) also generates the same error message and displays "Prosody is running" is in output[1]
But then I rebased the tests to the master branch (1209eb2d) and called run-tests locally.
No error message and "Prosody is running" is in output[0] And the same good result (based on master) on the GitLab CI
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/126437379
So it looks something related to the next branch.
Finally I merged master to next+tests and the test case passes.
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/126443939
So it looks something already fixed on master branch.
And I can add my tags to your patches (not today due to the lack of time). Sorry for the noise.
Regards,
Ricardo
PATCH 3/3 prosody: fix runtime dependencies
In reply to Francois Perradprosody is not available for Lua 5.3, but only 5.1 & 5.2.
prosody needs the module BitOp which is included in LuaJIT
note: the actual config is working only LuaJIT
--- package/prosody/Config.in | 5 +++++ 1 file changed, 5 insertions(+)
package/prosody/Config.in +5 -0
@@ -2,7 +2,9 @@ config BR2_PACKAGE_PROSODY bool "prosody" depends on BR2_USE_MMU # fork depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_PACKAGE_LUA_5_3 depends on !BR2_STATIC_LIBS # luaexpat, luasec, luasocket, luafilesystem + select BR2_PACKAGE_LUABITOP if !BR2_PACKAGE_LUAJIT # runtime select BR2_PACKAGE_LUAEXPAT # runtime select BR2_PACKAGE_LUASEC # runtime select BR2_PACKAGE_LUASOCKET # runtime
@@ -19,3 +21,6 @@ config BR2_PACKAGE_PROSODY comment "prosody needs the lua interpreter, dynamic library" depends on !BR2_PACKAGE_HAS_LUAINTERPRETER || BR2_STATIC_LIBS depends on BR2_USE_MMU + +comment "prosody needs a Lua 5.1/5.2 interpreter" + depends on BR2_PACKAGE_LUA_5_3
Signature · 1 line
2.17.1
PATCH 3/3 prosody: fix runtime dependencies
Hello,
I was reviewing/testing your test cases and I noticed in the cover letter [1]:
"note2: the patch 3/3 is a fix, and must be applied also in master"
+ Dushara (from 'utils/get-developers -f package/prosody/Config.in')
+ maintainers, to better decide whether it goes to master or it waits the release and later gets backported
I kept the full patch below.
[1] http://patchwork.ozlabs.org/cover/1002643/
Quoted 26 lines · Francois Perrad
prosody is not available for Lua 5.3, but only 5.1 & 5.2.
prosody needs the module BitOp which is included in LuaJIT
note: the actual config is working only LuaJIT
Signed-off-by Francois Perrad <[email protected]>--- package/prosody/Config.in | 5 +++++ 1 file changed, 5 insertions(+)package/prosody/Config.in +2
-0@@ -2,7 +2,9 @@ config BR2_PACKAGE_PROSODY bool "prosody" depends on BR2_USE_MMU # fork depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_PACKAGE_LUA_5_3 depends on !BR2_STATIC_LIBS # luaexpat, luasec, luasocket, luafilesystem + select BR2_PACKAGE_LUABITOP if !BR2_PACKAGE_LUAJIT # runtime select BR2_PACKAGE_LUAEXPAT # runtime select BR2_PACKAGE_LUASEC # runtime select BR2_PACKAGE_LUASOCKET # runtime
package/prosody/Config.in config BR2_PACKAGE_PROSODY · line 26
Quoted 6 lines
package/prosody/Config.in +3
-0@@ -19,3 +21,6 @@ config BR2_PACKAGE_PROSODY comment "prosody needs the lua interpreter, dynamic library" depends on !BR2_PACKAGE_HAS_LUAINTERPRETER || BR2_STATIC_LIBS depends on BR2_USE_MMU + +comment "prosody needs a Lua 5.1/5.2 interpreter" + depends on BR2_PACKAGE_LUA_5_3
Regards,
Ricardo
cover suppport/testing: Lua and friends
In reply to Francois PerradHello,
Quoted 4 lines · Francois Perrad
Francois Perrad (3):
support/testing: add lua test
support/testing; add prosody test
prosody: fix runtime dependencies
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com