aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author7heo <7heo@mail.com>2016-12-27 13:13:13 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-10 13:50:25 +0100
commit198b8db9fdffc7ecb4b354ff29a963d679166624 (patch)
treea6efa2ac4101b785391a2f8ed9990f7f70e479c5
parent254c00aa7d6a4cbe8b4a0cb02fc2699d72a13cda (diff)
downloadmkinitfs-198b8db9fdffc7ecb4b354ff29a963d679166624.tar.bz2
mkinitfs-198b8db9fdffc7ecb4b354ff29a963d679166624.tar.xz
test: better messages
-rwxr-xr-xtest.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/test.sh b/test.sh
index e3792d9..127be52 100755
--- a/test.sh
+++ b/test.sh
@@ -2,6 +2,7 @@
set -e
set -u
+set -x
# Defaults
operation=full
@@ -82,8 +83,8 @@ then
echo "> Closing the device '/dev/mapper/temp-test'"
sudo cryptsetup luksClose temp-test
- echo "> Testing nfplug-findfs (passphrase was '$passphrase')"
- sudo ./nlplug-findfs ${flags}-c $block -m 'test-device' || true
+ echo "> Testing nlplug-findfs on $block (passphrase was '$passphrase')"
+ echo "$passphrase" | sudo ./nlplug-findfs ${flags}-c $block -m 'test-device'
echo "> Mounting the device"
sudo mount /dev/mapper/test-device local-mount
@@ -97,7 +98,7 @@ fi
echo "> Cleaning up"
mountpoint local-mount && sudo umount local-mount
[ -b /dev/mapper/test-device ] && sudo cryptsetup luksClose test-device
-for i in $(seq 0 $(sudo losetup -f | sed 's:^[a-z/]*\([0-9]*\)$:\1:; s/$/-1/' | bc)); do
+for i in $(seq 0 $(($(sudo losetup -f | sed 's:^[a-z/]*\([0-9]*\)$:\1:; s/$/-1/')))); do
sudo losetup -d /dev/loop$i
done
[ -d local-mount ] && rmdir local-mount