diff options
author | Francois Perrad <fperrad@gmail.com> | 2018-11-24 10:07:53 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-12-06 23:08:59 +0100 |
commit | 9d0863012862c751602c3f1e96faeea77272fc61 (patch) | |
tree | 11264fbd27a1e9ffcc455c2d4e21c453f75f8b0c /support/testing | |
parent | 768a9b9dd7ef0d2e1bc35e41352f0df6daf59d46 (diff) | |
download | buildroot-9d0863012862c751602c3f1e96faeea77272fc61.tar.gz buildroot-9d0863012862c751602c3f1e96faeea77272fc61.zip |
support/testing: add prosody test
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'support/testing')
-rw-r--r-- | support/testing/tests/package/test_prosody.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/support/testing/tests/package/test_prosody.py b/support/testing/tests/package/test_prosody.py new file mode 100644 index 0000000000..8ef8ff95ff --- /dev/null +++ b/support/testing/tests/package/test_prosody.py @@ -0,0 +1,48 @@ +from tests.package.test_lua import TestLuaBase + + +class TestProsody(TestLuaBase): + def lua_dependencies_test(self): + self.module_test('bit') # luabitop + self.module_test('lfs') # luafilesystem + self.module_test('lxp') # luaexpat + self.module_test('socket') # luasocket + self.module_test('ssl') # luasec + + 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]) + + +class TestProsodyLua51(TestProsody): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_5_1=y + BR2_PACKAGE_PROSODY=y + """ + + def test_run(self): + self.login() + self.version_test('Lua 5.1') + self.g_version_test('Lua 5.1') + self.lua_dependencies_test() + self.prosody_test() + + +class TestProsodyLuajit(TestProsody): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_PROSODY=y + """ + + def test_run(self): + self.login() + self.version_test('LuaJIT 2') + self.g_version_test('Lua 5.1') + self.lua_dependencies_test() + self.prosody_test() |