From: Martin Pitt Date: Tue, 26 May 2015 05:22:45 +0000 (+0200) Subject: autopkgtest: Ship/use mock fsck from debian/tests, as it's missing in the 220 tarball X-Git-Tag: debian/247.3-7+deb11u1~1667 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1369a1ee4200310d4e6a0e1e894f0c0c507dc5dc;p=systemd.git autopkgtest: Ship/use mock fsck from debian/tests, as it's missing in the 220 tarball Fixed upstream in commit db47294f41, this can be reverted with the next upstream release. --- diff --git a/debian/changelog b/debian/changelog index b7e88bcfc..aa5de9838 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ systemd (220-1) UNRELEASED; urgency=medium * debian/rules: Remove shipped audit_type-to-name.h and keyboard-keys-from-name.gperf and regenerate them during build (bug in upstream 220 tarball). + * autopkgtest: Ship/use mock fsck from debian/tests, as it's missing in the + 220 tarball. -- Martin Pitt Fri, 22 May 2015 14:41:48 +0200 diff --git a/debian/tests/fsck b/debian/tests/fsck new file mode 100755 index 000000000..77b50d723 --- /dev/null +++ b/debian/tests/fsck @@ -0,0 +1,27 @@ +#!/bin/bash +fd=0 + +OPTIND=1 +while getopts "C:aTlM" opt; do + case "$opt" in + C) + fd=$OPTARG + ;; + \?);; + esac +done + +shift "$((OPTIND-1))" +device=$1 + +echo "Running fake fsck on $device" + +declare -a maxpass=(30 5 2 30 60) + +for pass in {1..5}; do + maxprogress=${maxpass[$((pass-1))]} + for (( current=0; current<=${maxprogress}; current++)); do + echo "$pass $current $maxprogress $device">&$fd + sleep 0.1 + done +done diff --git a/debian/tests/systemd-fsckd b/debian/tests/systemd-fsckd index 4aa0ea37b..d73738d0b 100755 --- a/debian/tests/systemd-fsckd +++ b/debian/tests/systemd-fsckd @@ -53,7 +53,7 @@ class FsckdTest(unittest.TestCase): os.rename(SYSTEM_FSCK_PATH, SAVED_FSCK_PATH) # install mock fsck and killer - self.install_bin(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'test', 'mocks', 'fsck'), + self.install_bin(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'fsck'), SYSTEM_FSCK_PATH) self.install_bin(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'process-killer'), PROCESS_KILLER_PATH)