Split "magic" test in bash_test (#4093)

Also skip bash_test in non-PR pipelines; it only makes noise
This commit is contained in:
Eugene Kliuchnikov authored and GitHub committed 2025-01-29 17:49:22 +00:00
1 parent 527d55283c
commit 21f10ce7fc
4 files changed
+30 -6

No files matched your search

+9 -3
View File
@@ -73,8 +73,8 @@ jobs:
skip_install: true
- name: coverage
skip_install: true
# TODO: understand why this does not work
ctest_args: -E 'test_jpegli_jni_wrapper'
disable_tests:
- test_jpegli_jni_wrapper # TODO: why this does not work?
# Build with support for decoding to JPEG bytes disabled. Produces a
# smaller build if only decoding to pixels is needed.
- name: release-nojpeg
@@ -336,7 +336,13 @@ jobs:
- name: Test ${{ matrix.mode }}
if: env.WILL_TEST == 'true'
run: |
./ci.sh test ${{ matrix.ctest_args }}
disabled_tests="${{ join(matrix.disable_tests, '|') }}"
if [[ -z "${disabled_tests}" ]]; then
disabled_tests="bash_test";
else
disabled_tests="bash_test|${disabled_tests}";
fi
./ci.sh test -E "${disabled_tests}"
# Print the running time summary for the slowest tests.
- name: Test runtime stats
+8 -1
View File
@@ -101,7 +101,14 @@ jobs:
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'CI:full'))
run: ctest --test-dir build --parallel 2 --output-on-failure -E "${{ join(matrix.disable_tests, '|') }}"
run: |
disabled_tests="${{ join(matrix.disable_tests, '|') }}"
if [[ -z "${disabled_tests}" ]]; then
disabled_tests="bash_test";
else
disabled_tests="bash_test|${disabled_tests}";
fi
ctest --test-dir build --parallel 2 --output-on-failure -E "${disabled_tests}"
- name: Fast benchmark ${{ matrix.msystem }}
if: github.event_name != 'merge_group' && !(matrix.disable_benchmark || false)
+1 -1
View File
@@ -137,4 +137,4 @@ jobs:
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'CI:full'))
run: |
./ci.sh test
./ci.sh test -E 'bash_test'
+12 -1
View File
@@ -105,13 +105,21 @@ test_printf_size_t() {
"'%\" PRIuS \"' or '%\" PRIdS \"'." >&2
ret=1
fi
return ${ret}
}
test_no_include_gtest() {
local ret=0
if grep -n -E '[^_]gtest\.h' \
$(git ls-files | grep -E '(\.c|\.cc|\.cpp|\.h)$' | grep -v -F /testing.h); then
echo "Don't include gtest directly, instead include 'testing.h'. " >&2
ret=1
fi
return ${ret}
}
test_include_printf_macros() {
local ret=0
local f
for f in $(git ls-files | grep -E "\.cc$" | xargs grep 'PRI[udx]S' |
cut -f 1 -d : | uniq); do
@@ -124,7 +132,11 @@ test_printf_size_t() {
ret=1
fi
done
return ${ret}
}
test_no_priudxs_in_headers() {
local ret=0
for f in $(git ls-files | grep -E "\.h$" | grep -v -E '(printf_macros\.h|testing\.h)' |
xargs grep -n 'PRI[udx]S'); do
# Having PRIuS / PRIdS in a header file means that printf_macros.h may
@@ -133,7 +145,6 @@ test_printf_size_t() {
echo "$f: Don't use PRI.S in header files. Sorry."
ret=1
done
return ${ret}
}