Skip to content

Commit b7cd648

Browse files
committed
CI: add unit test run without proc/sys/dev
1 parent 68f4590 commit b7cd648

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/unit_tests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ADDITIONAL_DEPS=(
2525
python3-pytest
2626
rpm
2727
zstd
28+
debootstrap
2829
)
2930

3031
function info() {
@@ -128,6 +129,18 @@ for phase in "${PHASES[@]}"; do
128129
(set +x; while :; do echo -ne "\n[WATCHDOG] $(date)\n"; sleep 30; done) &
129130
meson test --timeout-multiplier=3 -C build --print-errorlogs
130131
;;
132+
RUN_NOPROC)
133+
debootstrap testing testing
134+
chroot testing mkdir -p /tmp/src/
135+
chroot testing sh -c "echo 'deb-src http://deb.debian.org/debian testing main' > /etc/apt/sources.list.d/testing-src.list"
136+
chroot testing apt-get update
137+
chroot testing apt-get build-dep -y systemd
138+
mount --bind . testing/tmp/src
139+
chroot testing meson -Dnobody-group=nogroup -Dslow-tests=true build
140+
chroot testing ninja -C build -v
141+
chroot testing meson test -C build --print-errorlogs
142+
umount --lazy testing/tmp/src
143+
;;
131144
CLEANUP)
132145
info "Cleanup phase"
133146
if [ ! -f /etc/machine-id ] && [ -w /etc/machine-id.bak ]; then

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
- v[0-9]+-stable
11+
- build_noproc
1112

1213
permissions:
1314
contents: read
@@ -21,7 +22,7 @@ jobs:
2122
strategy:
2223
fail-fast: false
2324
matrix:
24-
run_phase: [GCC, GCC_ASAN_UBSAN, CLANG, CLANG_RELEASE, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS]
25+
run_phase: [GCC, GCC_ASAN_UBSAN, CLANG, CLANG_RELEASE, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS NOPROC]
2526
cryptolib: [auto]
2627
include:
2728
- run_phase: GCC

0 commit comments

Comments
 (0)