summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorFrancesco Cosoleto2011-08-17 00:19:05 +0200
committerKarel Zak2011-08-30 10:54:37 +0200
commitd0bcd9b32284dbfeec9d76f4adf046fd68528398 (patch)
tree557a5424db14d524e41b5e17c82fbc2d579b1ba3 /tests/functions.sh
parentfdisk: print welcome message (diff)
downloadkernel-qcow2-util-linux-d0bcd9b32284dbfeec9d76f4adf046fd68528398.tar.gz
kernel-qcow2-util-linux-d0bcd9b32284dbfeec9d76f4adf046fd68528398.tar.xz
kernel-qcow2-util-linux-d0bcd9b32284dbfeec9d76f4adf046fd68528398.zip
tests: add ts_fdisk_clean function to make fdisk output comparable
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 70bd45a23..acfbbeefe 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -393,3 +393,10 @@ s/# <!-- util-linux.*-->//;
/^$/d" /etc/fstab
}
+function ts_fdisk_clean {
+ # remove non comparable parts of fdisk output
+ [ x"${DEVNAME}" != x"" ] && sed -i -e "s/\/dev\/${DEVNAME}/\/dev\/.../g" $TS_OUTPUT
+ sed -i -e 's/Disk identifier:.*//g' \
+ -e 's/Building a new.*//g' \
+ $TS_OUTPUT
+}