support/testing: add lua-sdl2 test
authorFrancois Perrad <fperrad@gmail.com>
Sun, 29 Sep 2019 12:55:19 +0000 (14:55 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 26 Oct 2019 14:31:36 +0000 (16:31 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
.gitlab-ci.yml
support/testing/tests/package/test_lua_sdl2.py [new file with mode: 0644]

index 3c2525d3391a860694728e7f73be12247dbaef0b..c689039007d86a0c70696de9c2d2f792bfc5fe65 100644 (file)
@@ -390,6 +390,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 }
diff --git a/support/testing/tests/package/test_lua_sdl2.py b/support/testing/tests/package/test_lua_sdl2.py
new file mode 100644 (file)
index 0000000..22c4087
--- /dev/null
@@ -0,0 +1,41 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaSDL2(TestLuaBase):
+    config = TestLuaBase.config + \
+        """
+        BR2_PACKAGE_LUA=y
+        BR2_PACKAGE_LUA_SDL2=y
+        BR2_PACKAGE_SDL2_IMAGE=y
+        BR2_PACKAGE_SDL2_MIXER=y
+        BR2_PACKAGE_SDL2_NET=y
+        BR2_PACKAGE_SDL2_TTF=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("SDL")
+        self.module_test("SDL.image")
+        self.module_test("SDL.mixer")
+        self.module_test("SDL.net")
+        self.module_test("SDL.ttf")
+
+
+class TestLuajitLuaSDL2(TestLuaBase):
+    config = TestLuaBase.config + \
+        """
+        BR2_PACKAGE_LUAJIT=y
+        BR2_PACKAGE_LUA_SDL2=y
+        BR2_PACKAGE_SDL2_IMAGE=y
+        BR2_PACKAGE_SDL2_MIXER=y
+        BR2_PACKAGE_SDL2_NET=y
+        BR2_PACKAGE_SDL2_TTF=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("SDL")
+        self.module_test("SDL.image")
+        self.module_test("SDL.mixer")
+        self.module_test("SDL.net")
+        self.module_test("SDL.ttf")