Commit graph

29 commits

Author SHA1 Message Date
furo b24f14d4f3 Set sqlite3 .timeout in integration_test.sh 2024-05-10 17:48:44 +02:00
ChillerDragon 244875e339 Increase rcon command delay in integration test
Closed #8261
2024-05-05 15:24:38 +08:00
Zwelf 2eb4a50d4d Add check for correct finish time in integration_test.sh
ALso exclude coverage.map from twmap-checker due to using tele
checkpoints without matching tele checkpoints to test physics.

Disable exact checks on valgrind. Only require at least one finish.
2024-04-21 23:24:16 +02:00
Robert Müller b352545621 Improve integration test script
Fix valgrind errors not being detected as failures when the tests otherwise finish, as the valgrind results are printed to stderr and not to the logfiles. Additionally, valgrind failures were not being detected because the error summary is not printed to stderr immediately but only after some time when valgrind has processed the summary.

Find random unused port to bind to by opening a socket on port 0 and closing it immediately. This gives a port that will very likely be unused because the system cycles through all ports before reusing old ones obtained this way.

Add `wait_for_launch` function to reduce duplicate code. Wait for server to launch before starting clients.

Improve log messages.
2023-12-02 18:33:46 +01:00
heinrich5991 ee21fde231 Make default server start a little less noisy
Spam like the following is now hidden by the default config file:
```
[2022-06-16 01:55:22][console]: moderator access for 'left' is now enabled
[2022-06-16 01:55:22][console]: helper access for 'left' is now enabled
[2022-06-16 01:55:22][console]: user access for 'left' is now disabled
```

Also, the following were already converted to debug messages by #5904.
```
[2022-06-16 01:57:05][datafile]: loading data index=88 size=6159 uncompressed=875088
[2022-06-16 01:57:05][datafile]: loading data index=89 size=1481 uncompressed=972400
[2022-06-16 01:57:05][datafile]: loading data index=90 size=7199 uncompressed=972400
```
2023-07-24 23:43:44 +02:00
Robert Müller aa817a810b Increase wait times in integration test to reduce flakiness 2023-07-15 11:30:50 +00:00
Dennis Felsing b791718c24 Try to fix #6773 again 2023-07-07 14:45:37 +02:00
Dennis Felsing 222e12a140 Increase waiting times for client in valigrind (fixes #6773) 2023-06-27 11:08:34 +02:00
Dennis Felsing b794c00a20 Disable sound in integration tests
Seems like the CI workers don't have (virtual) sound cards, puts out
useless errors
2023-06-27 11:08:13 +02:00
heinrich5991 9b4371f18f Change log format
Remove square brackets to reduce the amount of space used.

Add log level indicator. The position between timestamp and system was
chosen because it is at a fixed position (unlike after the system) but
the log still remains naively sortable (which wouldn't happen if we were
to place it in front of the timestamp.

Before:
```
[2022-04-29 15:25:37][engine]: running on unix-linux-amd64
[2022-04-29 15:25:37][engine]: arch is little endian
[2022-04-29 15:25:37][storage]: added path '$USERDIR' ('/path/to/home/.teeworlds')
[2022-04-29 15:25:37][storage]: added path '$DATADIR' ('data')
[2022-04-29 15:25:37][storage]: added path '$CURRENTDIR' ('/path/to/ddnet')
[2022-04-29 15:25:37][host_lookup]: host='localhost' port=0 1
[2022-04-29 15:25:37][host_lookup]: host='localhost' port=0 2
[2022-04-29 15:25:37][console]: executing 'autoexec_server.cfg'
```

After:
```
2022-04-29 15:25:37 I engine: running on unix-linux-amd64
2022-04-29 15:25:37 I engine: arch is little endian
2022-04-29 15:25:37 I storage: added path '$USERDIR' ('/path/to/home/.teeworlds')
2022-04-29 15:25:37 I storage: added path '$DATADIR' ('data')
2022-04-29 15:25:37 I storage: added path '$CURRENTDIR' ('/path/to/ddnet')
2022-04-29 15:25:37 I host_lookup: host='localhost' port=0 1
2022-04-29 15:25:37 I host_lookup: host='localhost' port=0 2
2022-04-29 15:25:37 I console: executing 'autoexec_server.cfg'
```
2022-09-14 19:37:55 +02:00
Robert Müller 0bde042c11 Always print warnings/failures in integration test
This makes it easier to debug issues when they appear in the CI.
2022-08-28 16:22:16 +02:00
Robert Müller 6bd1e96aa7 Add demo recorder/player to integration test
- record and playback client demo
- record and playback server demo
2022-08-26 20:58:08 +02:00
ChillerDragon f238c55013 Fix integration tests hanging on crashes
When the client or server crash the fifo will be dead
then the cleanup command hangs at

	echo "quit" > client1.fifo

because the fifo is not responding and thus it is stuck there.
which causes the user to probably ctrl+c at some point
which then avoids client2 to be quit which might not have crashed

So this commit checks if a fail_client1.txt file exits and if it crashed
already it will skip the call to the broken fifo
2022-07-13 17:03:41 +02:00
ChillerDragon 28c4a8a346 Sort CI logs before diff to fix race condition
Logging to file and to stdout might order differently
due to multiple threads
2022-06-28 16:26:40 +02:00
def b1d1bb6739 Don't register integration test servers
Also print out more of the diff
2022-06-26 08:59:44 +02:00
Dennis Felsing 0081e99fc7 integration test: print log diff for easier result check 2022-06-25 01:39:59 +02:00
ChillerDragon c951a3cb89 Add logfiles and map changes to integration test
Cover map change
Cover logfiles
Ensure client1 always connects first
2022-06-23 15:52:28 +02:00
ChillerDragon bc243952bd Increase client boot timeout for integration test 2022-06-21 01:15:06 +02:00
ChillerDragon afd4504f96 Fix integration argument parsing 2022-06-17 23:14:13 +02:00
def 5768e52a13 Minor fixes 2022-06-07 00:33:01 +02:00
def 442ae7dc13 Make it easier to run integration tests
Entire worflow is now:

mkdir san
cd san
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ..
ninja run_integration_tests
2022-06-06 18:53:59 +02:00
def 9a89e58a16 Add lsan.supp for opengl leak (fixes #5296)
See also Jupeyy's explanation in
https://github.com/ddnet/ddnet/issues/4294 for why we want to ignore
this:

> sadly components have no OnDestruct on anything like that
> so aslong it doesn't actually leak it's just non destructed memory

So it's something we allocate once for the entire client lifetime from
my understanding.

=================================================================
==421461==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 411760 byte(s) in 10 object(s) allocated from:
    #0 0x55eaf0c08a29 in malloc (/media/ddnet/integration_test/DDNet+0x736a29)
    #1 0x55eaf0de9f72 in CCommandProcessorFragment_OpenGL2::Cmd_CreateBufferObject(CCommandBuffer::SCommand_CreateBufferObject const*) /media/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp:1898:25
    #2 0x55eaf0dd82f5 in CCommandProcessorFragment_OpenGL::RunCommand(CCommandBuffer::SCommand const*) /media/ddnet/src/engine/client/backend/opengl/backend_opengl.cpp
    #3 0x55eaf0f73229 in CCommandProcessor_SDL_GL::RunBuffer(CCommandBuffer*) /media/ddnet/src/engine/client/backend_sdl.cpp:246:20
    #4 0x55eaf0f70568 in CGraphicsBackend_Threaded::ThreadFunc(void*) /media/ddnet/src/engine/client/backend_sdl.cpp:75:25
    #5 0x55eaf0d679d7 in thread_run(void*) /media/ddnet/src/base/system.cpp:686:2
    #6 0x7f08b788c54c  (/usr/lib/libc.so.6+0x8c54c)

SUMMARY: AddressSanitizer: 411760 byte(s) leaked in 10 allocation(s).
2022-06-05 20:01:02 +02:00
ChillerDragon 44a79d5783 Add chat and rcon to integration test 2022-06-05 19:26:39 +02:00
ChillerDragon eebabaaf82 Fix indent 2022-06-05 19:26:22 +02:00
heinrich5991 b0fcda57c2 Fix integration test waiting for client to close
As described in #5295, the integration test script waits for the client
to close before launching the next one. I don't know what causes this,
but disabling full-screen mode works around the issue.

I don't know if this is okay. @ChillerDragon?

Fixes #5295.
2022-06-02 01:47:10 +02:00
def b3d8e05e00 Add valgrind to integration test 2022-05-26 23:52:29 +02:00
Dennis Felsing e3116217de test -> integration_test 2022-05-26 01:34:18 +02:00
Dennis Felsing 68bcd21eff asan+ubsan clean 2022-05-26 01:22:14 +02:00
ChillerDrgon 05efc25f32 Add integration test script and coverage map 2022-05-26 00:37:45 +02:00