Skip to content

Commit 1314884

Browse files
committed
make check: be more quiet
in run_tests.c - set log_level after common_preinit, that sets the value in script.sh: - use function - print the output as other tests - removed '|| true' from kill - it may perhaps not fail (asumed that process is actually still alive after 1 sec)
1 parent de013b9 commit 1314884

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ tests: $(TEST_TARGET)
535535

536536
.PHONY: check
537537
check: tests
538-
$(srcdir)/data/scripts/check.sh "$(TARGET)" "$(REFLECTOR_TARGET)"
538+
@$(srcdir)/data/scripts/check.sh "$(TARGET)" "$(REFLECTOR_TARGET)"
539539

540540
distcheck:
541541
$(TARGET)

data/scripts/check.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -eux
1+
#!/bin/sh -eu
22
# SPDX-License-Identifier: BSD-3-Clause
33
# Copyright (c) 2019-2026 CESNET, zájmové sdružení právnických osob
44
#
@@ -8,7 +8,17 @@
88
REFLECTOR_TARGET=$2
99

1010
# test hd-rum-transcode crasn as in the commit 66f1f0e2
11-
$REFLECTOR_TARGET 8M 5004 & pid=$!
12-
sleep 1
13-
kill $pid || true
14-
wait $pid || [ $? -eq 143 ]
11+
check_hd_rum_transcode() {
12+
printf "Testing hd-rum-translator (1 sec dummy run) .............................. "
13+
$REFLECTOR_TARGET 8M 5004 >/dev/null 2>&1& pid=$!
14+
sleep 1
15+
kill $pid
16+
wait $pid || rc=$?
17+
if [ "${rc-143}" -ne 143 ]; then
18+
echo Fail
19+
exit "$rc"
20+
fi
21+
echo Ok
22+
}
23+
24+
check_hd_rum_transcode

test/run_tests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
/*
77
* Copyright (c) 2004 University of Glasgow
8-
* Copyright (c) 2005-2023 CESNET, z. s .p .o.
8+
* Copyright (c) 2005-2026 CESNET, zájmové sdružení právnických osob
99
* All rights reserved.
1010
*
1111
* Redistribution and use in source and binary forms, with or without
@@ -177,11 +177,11 @@ int main(int argc, char **argv)
177177
return 0;
178178
}
179179

180-
log_level = LOG_LEVEL_FATAL;
181180
struct init_data *init = NULL;
182181
if ((init = common_preinit(argc, argv)) == NULL) {
183182
return 2;
184183
}
184+
log_level = LOG_LEVEL_FATAL;
185185

186186
argc -= 1;
187187
argv += 1;

0 commit comments

Comments
 (0)