Page 4 of 4

Re: Irrlicht unit tests

Posted: Wed Mar 30, 2022 5:40 pm
by juozas
Last line upon closing example:

Code: Select all

R8G8B8Quit message received.
Did you forget std::endl?
Anyway, I also noticed you added some useful code to the tests, so I'm posting the full output of screenshot test here, you might find it useful :)

Code: Select all

Starting test 48, 'screenshot'
Running test testShots
Testing driver OpenGL 3.3
Color Format 0 supported
Color Format 1 supported
Color Format 2 supported
Color Format 3 supported
Color Format 4 unsupported
Color Format 5 unsupported
Color Format 6 unsupported
Color Format 7 unsupported
Color Format 8 unsupported
Color Format 9 unsupported
Color Format 10 unsupported
Color Format 11 unsupported
Color Format 12 unsupported
Color Format 13 unsupported
Color Format 14 unsupported
Color Format 15 unsupported
Color Format 16 unsupported
Color Format 17 unsupported
Color Format 18 unsupported
Color Format 19 unsupported
Color Format 20 unsupported
Color Format 21 unsupported
Color Format 22 unsupported
Color Format 23 unsupported
Color Format 24 unsupported
Color Format 25 unsupported
Color Format 26 unsupported
Color Format 27 unsupported
Color Format 28 unsupported
Color Format 29 unsupported
Color Format 30 unsupported
Running test testShotsOfShots
Testing driver Irrlicht Software Driver 1.0
Image match: 100.000000%
Testing driver Burning's Video 0.52 beautiful
Image match: 100.000000%
Testing driver OpenGL 3.3
Image match: 100.000000%
Running test testShotsOfShots
Testing driver Irrlicht Software Driver 1.0
Image match: 100.000000%
Testing driver Burning's Video 0.52 beautiful
Image match: 100.000000%
Testing driver OpenGL 3.3
Image match: 86.368736%
Writing mismatched image to 'results/OpenGL-shotsInShots2.png'
driver color format: R8G8B8

******** Test failure ********
Test 48 'screenshot' failed
******** Test failure ********
Edit: not much useful as pointed in edit of the previous post

Re: Irrlicht unit tests

Posted: Wed Mar 30, 2022 8:41 pm
by CuteAlien
Thanks. Not sure I'll figure this one out. There's not too much that can go wrong, it's simply glReadPixels returning the wrong result as soon as antialiasing is enabled. Maybe something that's not guaranteed to work (will read a bit more about glx, maybe I find some hint in the documentation).

At least we know now that rendering itself is fine. And except for such tests it's usually better to render to a texture instead of reading the framebuffer anyway. So not too big of a problem. And I found some other suspicious stuff while looking at this *sigh*

Re: Irrlicht unit tests

Posted: Fri Aug 26, 2022 6:18 pm
by juozas
Small issue with unit tests when running on Linux. Near the end I see a message saying

Code: Select all

sh: 1: tests.log: not found
you should use something like

Code: Select all

gnome-text-editor tests.log
for gui based default text editor (if available), or

Code: Select all

editor tests.log
for terminal/curses/etc based one. Don't forget to make sure the command exists, e.g. use

Code: Select all

which <command>
and do apropriate stuff depending on what you get (don't forget to exclude angled brackets from command, empty string returned by above means command tested does not exist)
You can directly call any edtor by command name, e.g. gedit, mousepad, leafpad, gvim/vim.gtk3 etc. for gui based editor or vim, nano, ed, etc. for terminal based one.

Re: Irrlicht unit tests

Posted: Sat Aug 27, 2022 8:57 pm
by CuteAlien
I guess the safe way would be to call more or less. Unfortunately no real default associations with txt files available. editor... kinda might work, didn't know this opens some (nano on my fresh installed Debian system it seems).

Thanks anyway, I'll take another look at this in a few days (just switched to new computer last week and my system isn't fully set-up yet right now... I hope I remember, just noticing my todo list is also still only on old system *sigh*).

Re: Irrlicht unit tests

Posted: Sat Sep 24, 2022 1:54 pm
by CuteAlien
I've added some comment how to find results on Linux when $PAGER is not set. You can also do something like: export PAGER=myfavoritetexttool

Re: Irrlicht unit tests

Posted: Fri May 10, 2024 4:53 pm
by juozas
Found some warnings when compiling unit tests (revision 6625), some might not be new, listing them anyway.\

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o archiveReader.o archiveReader.cpp
archiveReader.cpp:356:13: warning: ‘bool {anonymous}::testMountFile(irr::io::IFileSystem*)’ defined but not used [-Wunused-function]
  356 | static bool testMountFile(IFileSystem* fs)
      |             ^~~~~~~~~~~~~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o matrixOps.o matrixOps.cpp
matrixOps.cpp: In function ‘void {anonymous}::calltest()’:
matrixOps.cpp:526:25: warning: ‘void irr::core::CMatrix4<T>::transformBox(irr::core::aabbox3d<float>&) const [with T = float]’ is deprecated [-Wdeprecated-declarations]
  526 |         mat.transformBox(bb1);
      |         ~~~~~~~~~~~~~~~~^~~~~
In file included from ../include/SMaterial.h:9,
                 from ../include/IMeshBuffer.h:9,
                 from ../include/IDynamicMeshBuffer.h:8,
                 from ../include/CDynamicMeshBuffer.h:8,
                 from ../include/irrlicht.h:34,
                 from testUtils.h:5,
                 from matrixOps.cpp:4:
../include/matrix4.h:1299:36: note: declared here
 1299 |         IRR_DEPRECATED inline void CMatrix4<T>::transformBox(core::aabbox3d<f32>& box) const
      |                                    ^~~~~~~~~~~
matrixOps.cpp:482:14: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
  482 |         bool b = mat == mat2;
      |              ^
matrixOps.cpp:509:19: warning: variable ‘v3’ set but not used [-Wunused-but-set-variable]
  509 |         vector3df v3 = mat.getScale();
      |                   ^~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o testUtils.o testUtils.cpp
testUtils.cpp: In function ‘void logTestString(const char*, ...)’:
testUtils.cpp:512:22: warning: format not a string literal and no format arguments [-Wformat-security]
  512 |         (void)printf(logString);
      |                      ^~~~~~~~~
testUtils.cpp:515:40: warning: format not a string literal and no format arguments [-Wformat-security]
  515 |                 (void)fprintf(logFile, logString);
      |                                        ^~~~~~~~~

Code: Select all

g++ -Wall -ansi -pedantic -fno-exceptions -O0 -g -D_DEBUG  -I../include -I/usr/X11R6/include -pipe  -c -o textureFeatures.o textureFeatures.cpp
textureFeatures.cpp: In function ‘bool {anonymous}::lockAllMipLevels(irr::video::E_DRIVER_TYPE)’:
textureFeatures.cpp:140:58: warning: ‘irr::video::ITexture* irr::video::IVideoDriver::addTexture(const path&, irr::video::IImage*, void*)’ is deprecated [-Wdeprecated-declarations]
  140 |                 video::ITexture* tex = driver->addTexture("miptest", image, mipdata);
      |                                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/IQ3Shader.h:11,
                 from ../include/IAnimatedMeshMD3.h:9,
                 from ../include/irrlicht.h:59,
                 from testUtils.h:5,
                 from textureFeatures.cpp:4:
../include/IVideoDriver.h:336:42: note: declared here
  336 |                 IRR_DEPRECATED ITexture* addTexture(const io::path& name, IImage* image, void* mipmapData)
      |                                          ^~~~~~~~~~
Some warnings triggered by IRR_DEPRECATED data type. Unit tests should probably be updated. Running Ubuntu Linux 22.04 LTS with Nvidia binary driver 470 and updated GeForce video card.

Re: Irrlicht unit tests

Posted: Fri May 10, 2024 9:01 pm
by CuteAlien
Thanks, I get most as well. Fixed the trivial ones, will have to check the rest. But currently still struggling with another report.

Not getting the printf one btw, I guess Ubuntu has newer gcc version by now than my Debian stable (still gcc 12.2.0 here).

Re: Irrlicht unit tests

Posted: Sat May 11, 2024 5:09 am
by juozas
I run gcc 11.4.0 on 22.04 LTS, while 24.04 has 13.2.0, which is newer.

Re: Irrlicht unit tests

Posted: Sat May 11, 2024 8:54 am
by CuteAlien
Hm, strange - even copy-pasted the line you used for compiling. Usually it's the newer GCC's adding warnings, not removing them ;-)
edit: I made a fix in [r6672] which should remove that warning.

Re: Irrlicht unit tests

Posted: Sat May 11, 2024 7:00 pm
by juozas
Svn reports that most recent version at the time I'm posting (Sat May 11 18:58:08 UTC 2024) is 6628 and not 6672, probably the repository is not synced properly, the printf warning is still there.

Re: Irrlicht unit tests

Posted: Sat May 11, 2024 8:31 pm
by CuteAlien
Sorry, just typo, meant r6627 not 72. Also I didn't notice that warnings is triggered by 2 lines so I only had fixed one of them. [r6629] has the other one fixed now (I hope).

Re: Irrlicht unit tests

Posted: Sun May 12, 2024 5:07 am
by juozas
Finally no warnings, though it's crashing upon running at test 40 if not run from the tests directory, many tests fail as the files are not in expected places. Otherwise all tests pass.

Code: Select all

Starting test 40, 'makeColorKeyTexture'
Irrlicht Engine version 1.9.0
Linux 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64
Creating X window...
Using plain X visual
Visual chosen: 33
Could not open file of texture: ../media/wall.bmp
Could not open file of texture: ../media/portal2.bmp
Segmentation fault (core dumped)

Re: Irrlicht unit tests

Posted: Sun May 12, 2024 10:56 am
by CuteAlien
The texture warning is still open, but should be last one for now (edit: fixed now as well). And yes - tests have to be run from within tests folder. On Linux this generally means copying the binary first in there. Slightly annoying, but nothing I plan to change for now.