diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-05-20 19:07:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 19:07:16 +0200 |
commit | bc8bc69beb7c6ee26c97e9a57aff4124f064d9ac (patch) | |
tree | cda471aec343d65781529bcdf752b62897381671 /tests | |
parent | 399be12585f83302178175396bcaf4487ffd57a9 (diff) |
CI: enable parallel tests (for x86_64, at least) (#2444)
TODO: enable parallel tests when using docker with no-x86_64 archs.
When I tried the obviuos solutions:
```
NDPI_FORCE_PARALLEL_UTESTS=1 NDPI_SKIP_PARALLEL_BAR=1 make check VERBOSE=1
```
I got:
```
Run configuration "caches_cfg" [--cfg=lru.ookla.size,0 --cfg=lru.msteams.ttl,1]
ookla.pcap /bin/sh: 1: run_single_pcap: not found
teams.pcap /bin/sh: 1: run_single_pcap: not found
Run configuration "caches_global" [--cfg=lru.ookla.scope,1 --cfg=lru.bittorrent.scope,1 --cfg=lru.stun.scope,1 --cfg=lru.tls_cert.scope,1 --cfg=lru.mining.scope,1 --cfg=lru.msteams.scope,1 --cfg=lru.stun_zoom.scope,1]
bittorrent.pcap /bin/sh: 1: run_single_pcap: not found
lru_ipv6_caches.pcapng /bin/sh: 1: run_single_pcap: not found
mining.pcapng /bin/sh: 1: run_single_pcap: not found
...
```
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/do.sh.in | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/do.sh.in b/tests/do.sh.in index 12f8b05dd..d3444b9fb 100755 --- a/tests/do.sh.in +++ b/tests/do.sh.in @@ -26,6 +26,11 @@ if [ "${NDPI_FORCE_PARALLEL_UTESTS}" = "1" ]; then FORCE_PARALLEL_UTESTS=1 fi +SKIP_PARALLEL_BAR=0 +if [ "${NDPI_SKIP_PARALLEL_BAR}" = "1" ]; then + SKIP_PARALLEL_BAR=1 +fi + #Remember: valgrind and *SAN are incompatible! CMD_PREFIX="${CMD_PREFIX}" if [ "${NDPI_TESTS_WINE}" = "1" ]; then @@ -188,7 +193,11 @@ export -f run_single_pcap check_results() { if [ $FORCE_PARALLEL_UTESTS -eq 1 ]; then - parallel --bar --tag "run_single_pcap" ::: $PCAPS + if [ $SKIP_PARALLEL_BAR -eq 1 ]; then + parallel --tag "run_single_pcap" ::: $PCAPS + else + parallel --bar --tag "run_single_pcap" ::: $PCAPS + fi RET=$? #Number of failed job up to 100 RC=$(( RC + $RET )) else |