diff mbox series

[3/4] support/testing: add lua-sdl2 test

Message ID 20190929125520.16957-3-francois.perrad@gadz.org
State Accepted
Headers show
Series [1/4] support/testing: add lzlib test | expand

Commit Message

Francois Perrad Sept. 29, 2019, 12:55 p.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 .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

Comments

Ricardo Martincoski Oct. 7, 2019, 12:07 a.m. UTC | #1
Hello,

On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:

> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  .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
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index a1e309b50..ecbcbcb78 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -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
Francois Perrad Oct. 7, 2019, 4:06 a.m. UTC | #2
Le lun. 7 oct. 2019 à 02:07, Ricardo Martincoski <
ricardo.martincoski@gmail.com> a écrit :

> Hello,
>
> On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
>
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> >  .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
> >
> > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> > index a1e309b50..ecbcbcb78 100644
> > --- a/.gitlab-ci.yml
> > +++ b/.gitlab-ci.yml
> > @@ -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
>
>
Ricardo,

you need this fix https://patchwork.ozlabs.org/patch/1172611/

François


> 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_______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Ricardo Martincoski Oct. 7, 2019, 11:30 p.m. UTC | #3
Hello,

On Mon, Oct 07, 2019 at 01:06 AM, François Perrad wrote:

> Le lun. 7 oct. 2019 à 02:07, Ricardo Martincoski <
> ricardo.martincoski@gmail.com> a écrit :
> 
>> Hello,
>>
>> On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:
[snip]
>> > +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
>>
>>
> Ricardo,
> 
> you need this fix https://patchwork.ozlabs.org/patch/1172611/

Thank you, I will reply with my tags to both patches.


Regards,
Ricardo
Ricardo Martincoski Oct. 7, 2019, 11:31 p.m. UTC | #4
Hello,

On Sun, Sep 29, 2019 at 09:55 AM, Francois Perrad wrote:

> 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>

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
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a1e309b50..ecbcbcb78 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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 }
diff --git a/support/testing/tests/package/test_lua_sdl2.py b/support/testing/tests/package/test_lua_sdl2.py
new file mode 100644
index 000000000..22c4087f5
--- /dev/null
+++ b/support/testing/tests/package/test_lua_sdl2.py
@@ -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")