Skip to content

Commit

Permalink
Make test suite work during package building
Browse files Browse the repository at this point in the history
This now makes release.sh depend on cgroups v2,
but this should be fine.
  • Loading branch information
PhilippWendler committed Sep 20, 2024
1 parent f4a4c8d commit ccd0bc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

include pyproject.toml
include *.md
include test/*.sh
recursive-include benchexec/tablegenerator/react-table/build *.min.js
recursive-include benchexec/tablegenerator/react-table/build *.min.css
recursive-include bin *
Expand Down
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export PYBUILD_NAME=benchexec
# Our tests need some additional files in {build_dir} to execute succesfully
export PYBUILD_BEFORE_TEST=cp -r {dir}/bin {dir}/doc {build_dir}/
export PYBUILD_AFTER_TEST=rm -r {build_dir}/bin {build_dir}/doc
export PYBUILD_TEST_ARGS=""

%:
dh $@ --with python3 --buildsystem=pybuild
Expand Down
5 changes: 4 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ cd "BenchExec-$VERSION"
dh_make -p "benchexec_$VERSION" --createorig -f "../$TAR" -i -c apache || true

dpkg-buildpackage --build=source -sa "--sign-key=$DEBKEY"
podman run --rm -w "$(pwd)" -v "$TEMP_DEB:$TEMP_DEB:rw" ubuntu:20.04 bash -c '
podman run --security-opt unmask=/sys/fs/cgroup --cgroups=split \
--security-opt unmask=/proc/* --security-opt seccomp=unconfined --device /dev/fuse \
--rm -w "$(pwd)" -v "$TEMP_DEB:$TEMP_DEB:rw" --rm ubuntu:20.04 \
"$TEMP_DEB/BenchExec-$VERSION/test/setup_cgroupsv2_in_container.sh" bash -c '
apt-get update
apt-get install -y --no-install-recommends dpkg-dev
TZ=UTC DEBIAN_FRONTEND=noninteractive apt-get install -y $(dpkg-checkbuilddeps 2>&1 | grep -o "Unmet build dependencies:.*" | cut -d: -f2- | sed "s/([^)]*)//g")
Expand Down

0 comments on commit ccd0bc4

Please sign in to comment.