Andrew Jeffery | d0a8556 | 2023-04-18 06:22:39 +0930 | [diff] [blame] | 1 | tests = [ |
Andrew Jeffery | d0a8556 | 2023-04-18 06:22:39 +0930 | [diff] [blame] | 2 | 'test-ringbuffer-boundary-poll', |
| 3 | 'test-ringbuffer-boundary-read', |
| 4 | 'test-ringbuffer-contained-offset-read', |
| 5 | 'test-ringbuffer-contained-read', |
| 6 | 'test-ringbuffer-poll-force', |
| 7 | 'test-ringbuffer-read-commit', |
| 8 | 'test-ringbuffer-simple-poll', |
| 9 | ] |
| 10 | |
| 11 | foreach t : tests |
| 12 | test(t, executable(t, f'@t@.c', c_args: [ '-DSYSCONFDIR=""' ], |
| 13 | include_directories: '..')) |
| 14 | endforeach |
Alexander Hansen | 1e04f44 | 2024-06-12 16:35:58 +0200 | [diff] [blame] | 15 | |
| 16 | tests_depend_iniparser = [ |
| 17 | 'test-client-escape', |
| 18 | 'test-config-parse', |
| 19 | 'test-config-parse-bytesize', |
| 20 | 'test-config-resolve-console-id' |
| 21 | ] |
| 22 | |
| 23 | foreach ct : tests_depend_iniparser |
| 24 | test( |
| 25 | ct, |
| 26 | executable( |
| 27 | ct, |
| 28 | f'@ct@.c', |
| 29 | c_args: [ '-DSYSCONFDIR=""' ], |
| 30 | dependencies: [ iniparser_dep ], |
| 31 | include_directories: '..' |
| 32 | ) |
| 33 | ) |
| 34 | endforeach |
Andrew Jeffery | 29a8f98 | 2024-07-31 10:47:08 +0930 | [diff] [blame] | 35 | |
| 36 | socat = find_program('socat', native: true) |
| 37 | |
Alexander Hansen | e11cca1 | 2024-08-02 15:08:05 +0200 | [diff] [blame] | 38 | server_tests = [ |
| 39 | 'test-console-logs-to-file', |
Alexander Hansen | 6498f9f | 2024-09-13 17:15:33 +0200 | [diff] [blame^] | 40 | 'test-console-logs-to-file-no-sections', |
Alexander Hansen | e11cca1 | 2024-08-02 15:08:05 +0200 | [diff] [blame] | 41 | 'test-console-socket-read', |
Alexander Hansen | c7602e0 | 2024-08-02 16:13:56 +0200 | [diff] [blame] | 42 | 'test-console-socket-write', |
Alexander Hansen | 97e7e51 | 2024-08-02 16:44:41 +0200 | [diff] [blame] | 43 | 'test-multiple-consoles', |
Alexander Hansen | e11cca1 | 2024-08-02 15:08:05 +0200 | [diff] [blame] | 44 | ] |
| 45 | |
| 46 | foreach st : server_tests |
| 47 | test(st, |
| 48 | find_program(st), |
| 49 | args: [ socat.full_path(), server.full_path() ], |
| 50 | depends: [ server ], |
| 51 | suite: 'itests' |
| 52 | ) |
| 53 | endforeach |
Alexander Hansen | 12bf483 | 2024-08-02 10:24:56 +0200 | [diff] [blame] | 54 | |
Alexander Hansen | a30b765 | 2024-08-02 14:49:10 +0200 | [diff] [blame] | 55 | client_tests = [ |
| 56 | 'test-console-client-can-read', |
| 57 | 'test-console-client-can-write', |
| 58 | ] |
| 59 | |
| 60 | foreach ct : client_tests |
| 61 | test(ct, |
| 62 | find_program(ct), |
| 63 | args: [ socat.full_path(), server.full_path(), client.full_path() ], |
| 64 | depends: [ server, client ], |
| 65 | suite: 'itests' |
| 66 | ) |
| 67 | endforeach |