Skip to content

Commit 2ff92d7

Browse files
authored
Output CI test logs always (#821)
1 parent cfce191 commit 2ff92d7

File tree

2 files changed

+23
-40
lines changed

2 files changed

+23
-40
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
run: cd build && make -j3
134134

135135
- name: Test
136-
run: cd build && ctest -j3 --output-on-failure
136+
run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
137137

138138
- name: Install
139139
run: |
@@ -222,7 +222,7 @@ jobs:
222222
run: cmake --build build --config Release
223223

224224
- name: Test
225-
run: cd build && ctest -C Release -j3 --output-on-failure
225+
run: cd build && ctest -C Release -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
226226

227227
- name: Install
228228
run: |
@@ -326,7 +326,7 @@ jobs:
326326
327327
./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-Werror
328328
make -j3
329-
make check || (cat ./test-suite.log; false)
329+
(make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
330330
331331
make install "DESTDIR=`pwd`/install-dir"
332332
maint/RunManifestTest install-dir maint/manifest-makeinstall-freebsd
@@ -338,7 +338,7 @@ jobs:
338338
cmake $CMAKE_FLAGS -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build
339339
cd build
340340
make -j3
341-
ctest -j3 --output-on-failure
341+
ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
342342
cmake --install . --prefix install-dir
343343
../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-freebsd
344344
../maint/RunSymbolTest install-dir/lib/ ../maint/
@@ -400,7 +400,7 @@ jobs:
400400
401401
./configure CC="cc -m32" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn
402402
make
403-
make check || (cat ./test-suite.log; false)
403+
(make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
404404
405405
make install "DESTDIR=`pwd`/install-dir"
406406
maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris
@@ -411,7 +411,7 @@ jobs:
411411
412412
./configure CC="cc -m64" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn
413413
make
414-
make check || (cat ./test-suite.log; false)
414+
(make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
415415
416416
make install "DESTDIR=`pwd`/install-dir"
417417
maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris
@@ -423,7 +423,7 @@ jobs:
423423
CC="cc -m64" cmake $CMAKE_FLAGS -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_SOLARIS_CC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build
424424
cd build
425425
make
426-
ctest -j3 --output-on-failure
426+
ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
427427
cmake --install . --prefix install-dir
428428
../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-solaris
429429
../maint/RunSymbolTest install-dir/lib/ ../maint/
@@ -480,7 +480,7 @@ jobs:
480480
chtag -R -tc ISO8859-1 .;
481481
MAKE=gmake CC=xlc ./configure --enable-ebcdic --disable-unicode;
482482
gmake;
483-
gmake check;
483+
(gmake check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc);
484484
485485
echo "== CMake, IBM-Clang -m64 compiler ==";
486486
cd ..;
@@ -492,7 +492,7 @@ jobs:
492492
cmake $CMAKE_FLAGS -G Ninja -DPCRE2_EBCDIC=ON -DPCRE2_SUPPORT_UNICODE=OFF -DCMAKE_C_COMPILER=ibm-clang -DCMAKE_C_FLAGS="-m64 $CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build
493493
cd build;
494494
ninja;
495-
ctest -j3 --output-on-failure;
495+
ctest -j3 --output-on-failure; && (cat ./Testing/Temporary/LastTest.log || true)
496496
'
497497
498498
distcheck:

.github/workflows/dev.yml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,8 @@ jobs:
6464
- name: Build
6565
run: make -j3
6666

67-
- name: Test (main test script)
68-
run: ./RunTest
69-
70-
- name: Test (JIT test program)
71-
run: ./pcre2_jit_test
72-
73-
- name: Test (pcre2grep test script)
74-
run: ./RunGrepTest
75-
76-
- name: Test (pcre2posix program)
77-
run: ./pcre2posix_test -v
67+
- name: Test
68+
run: (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
7869

7970
dragon:
8071
# Tests with: clang AB/UB; link-size=3. Clang's logo is a dragon.
@@ -100,19 +91,10 @@ jobs:
10091
- name: Build
10192
run: make -j3
10293

103-
- name: Test (main test script)
94+
- name: Test
10495
run: |
10596
ulimit -S -s 49152 # Raise stack limit; ASAN with -O0 is very stack-hungry
106-
./RunTest
107-
108-
- name: Test (JIT test program)
109-
run: ./pcre2_jit_test
110-
111-
- name: Test (pcre2grep test script)
112-
run: ./RunGrepTest
113-
114-
- name: Test (pcre2posix program)
115-
run: ./pcre2posix_test -v
97+
(make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
11698
11799
greatawk:
118100
# Tests with: GCC, -O3, oldest supported Ubuntu (in non-extended support)
@@ -140,7 +122,7 @@ jobs:
140122
run: cd build && make -j3
141123

142124
- name: Test
143-
run: cd build && ctest -j3 --output-on-failure
125+
run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
144126

145127
- name: Install
146128
run: |
@@ -222,7 +204,7 @@ jobs:
222204
run: make -j3
223205

224206
- name: Test
225-
run: make check || (cat ./test-suite.log; false)
207+
run: (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc)
226208

227209
- name: Install
228210
run: |
@@ -271,7 +253,7 @@ jobs:
271253
run: ninja -C build
272254

273255
- name: Test
274-
run: cd build && ctest -j3 --output-on-failure
256+
run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
275257

276258
- name: Install
277259
run: |
@@ -298,7 +280,7 @@ jobs:
298280
run: cmake --build build --config RelWithDebInfo
299281

300282
- name: Test
301-
run: cd build && ctest -C RelWithDebInfo -j3 --output-on-failure
283+
run: cd build && ctest -C RelWithDebInfo -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
302284

303285
pterodactyl:
304286
# Tests with: MSVC 64-bit, Debug, shared libraries
@@ -318,7 +300,7 @@ jobs:
318300
run: cmake --build build --config Debug
319301

320302
- name: Test
321-
run: cd build && ctest -C Debug -j3 --output-on-failure
303+
run: cd build && ctest -C Debug -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
322304

323305
bigbird:
324306
# Job to execute ManyConfigTests
@@ -383,7 +365,7 @@ jobs:
383365
run: cd build && make -j3
384366

385367
- name: Test
386-
run: cd build && ctest -j3 --output-on-failure
368+
run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
387369

388370
fruitbat:
389371
# Tests with: MSYS2 unix-on-Windows environment
@@ -428,7 +410,7 @@ jobs:
428410

429411
- name: Test
430412
shell: msys2 {0}
431-
run: cd build && ctest -j3 --output-on-failure
413+
run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
432414

433415
ptarmigan:
434416
# Tests with various unusual processor architectures
@@ -496,8 +478,9 @@ jobs:
496478
set -e
497479
# TODO: Set -DCMAKE_COMPILE_WARNING_AS_ERROR=ON (there's currently a build failure on S390x)
498480
cmake $CMAKE_FLAGS -G Ninja -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build
499-
ninja -C build
500-
(cd build && ctest -j3 --output-on-failure)
481+
cd build
482+
ninja
483+
ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true)
501484
502485
zebrilus:
503486
# Tests with: Zig compiler. A "zebrilus" is known as a "zigzag heron".

0 commit comments

Comments
 (0)