Skip to content

Commit d662ec1

Browse files
committed
Enable debug logging for tests.
Normalize debug filename as "test-debug.log". Show ippeveprinter log for failed ippeveprinter runs.
1 parent 904b781 commit d662ec1

3 files changed

Lines changed: 21 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ jobs:
2626
- name: Configure libcups
2727
env:
2828
CC: /usr/bin/gcc
29-
run: ./configure --enable-debug --enable-debug-printfs --enable-maintainer --with-tls=openssl || (cat config.log; pkg-config --list-all; exit 1)
29+
run: ./configure --enable-debug --enable-maintainer --with-tls=openssl --with-sanitizer=address || (cat config.log; pkg-config --list-all; exit 1)
3030
- name: Make libcups
3131
run: make
3232
- name: Test libcups
33-
run: make test || cat cups/test.log && exit 1
33+
env:
34+
ASAN_OPTIONS: leak_check_at_exit=false
35+
CUPS_DEBUG_LOG: +test-debug.log
36+
CUPS_DEBUG_LEVEL: 4
37+
run: make test || (cat cups/test*.log; test tools/test.log && cat tools/test*.log; exit 1)
3438

3539
build-linux-gnutls:
3640

@@ -50,11 +54,15 @@ jobs:
5054
- name: Configure libcups
5155
env:
5256
CC: /usr/bin/gcc
53-
run: ./configure --enable-debug --enable-debug-printfs --enable-maintainer --with-tls=gnutls || (cat config.log; pkg-config --list-all; exit 1)
57+
run: ./configure --enable-debug --enable-maintainer --with-tls=gnutls --with-sanitizer=address || (cat config.log; pkg-config --list-all; exit 1)
5458
- name: Make libcups
5559
run: make
5660
- name: Test libcups
57-
run: make test || cat cups/test.log && exit 1
61+
env:
62+
ASAN_OPTIONS: leak_check_at_exit=false
63+
CUPS_DEBUG_LOG: +test-debug.log
64+
CUPS_DEBUG_LEVEL: 4
65+
run: make test || (cat cups/test*.log; test tools/test.log && cat tools/test*.log; exit 1)
5866

5967
build-macos:
6068

@@ -66,11 +74,14 @@ jobs:
6674
with:
6775
submodules: recursive
6876
- name: Configure libcups
69-
run: ./configure --enable-debug --enable-debug-printfs --enable-maintainer || (cat config.log; pkg-config --list-all; exit 1)
77+
run: ./configure --enable-debug --enable-maintainer --with-sanitizer=address || (cat config.log; pkg-config --list-all; exit 1)
7078
- name: Make libcups
7179
run: make
7280
- name: Test libcups
73-
run: make test || cat cups/test.log && exit 1
81+
env:
82+
CUPS_DEBUG_LOG: +test-debug.log
83+
CUPS_DEBUG_LEVEL: 4
84+
run: make test || (cat cups/test*.log; test tools/test.log && cat tools/test*.log; exit 1)
7485

7586
build-windows:
7687

cups/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ all: $(TARGETS)
190190
#
191191

192192
test: $(UNITTARGETS)
193-
rm -f test.log
193+
rm -f test.log test-debug.log
194194
date >test.log
195195
echo Running array API tests...
196196
./testarray 2>>test.log

tools/run-tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ cd ..
1414
name="Test Printer $(date +%H%M%S)"
1515
status=0
1616

17+
rm -f tools/test.log tools/test-debug.log
18+
1719
echo "Running ippeveprinter..."
18-
CUPS_DEBUG_LOG=test-cups.log CUPS_DEBUG_LEVEL=4 CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cupsDNSSD|cupsDo|cupsGet|cupsSend)' tools/ippeveprinter-static -vvv -a tools/test.conf -n localhost "$name" 2>tools/test.log &
20+
CUPS_DEBUG_LOG=tools/test-debug.log CUPS_DEBUG_LEVEL=4 CUPS_DEBUG_FILTER='^(http|_http|ipp|_ipp|cupsDNSSD|cupsCreate|cupsDo|cupsGet|cupsSend)' tools/ippeveprinter-static -vvv -a tools/test.conf -n localhost "$name" 2>tools/test.log &
1921
ippeveprinter=$!
2022

2123
# Test the instance...

0 commit comments

Comments
 (0)