diff options
author | Ruediger Meier | 2016-02-03 23:44:42 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-02-10 21:06:40 +0100 |
commit | 23d8c556848c8121e50ff77b16254f1802aa681a (patch) | |
tree | f152afefe72884606beccc95b91660d97dd79e67 /tests/functions.sh | |
parent | Merge branch 'pylibmount_dependency' of https://github.com/filbranden/util-linux (diff) | |
download | kernel-qcow2-util-linux-23d8c556848c8121e50ff77b16254f1802aa681a.tar.gz kernel-qcow2-util-linux-23d8c556848c8121e50ff77b16254f1802aa681a.tar.xz kernel-qcow2-util-linux-23d8c556848c8121e50ff77b16254f1802aa681a.zip |
tests: minor cleanup ts_fdisk_clean()
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 1f4d51878..8f6c87724 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -610,18 +610,18 @@ function ts_fdisk_clean { local DEVNAME=$1 # remove non comparable parts of fdisk output - if [ x"${DEVNAME}" != x"" ]; then - sed -i -e "s:${DEVNAME}:<removed>:g;" $TS_OUTPUT - fi - - sed -i -e 's/Disk identifier:.*/Disk identifier: <removed>/g' \ - -e 's/Created a new.*/Created a new <removed>./g' \ - -e 's/^Device[[:blank:]]*Start/Device Start/g' \ - -e 's/^Device[[:blank:]]*Boot/Device Boot/g' \ - -e 's/^Device[[:blank:]]*Flag/Device Flag/g' \ - -e 's/Welcome to fdisk.*/Welcome to fdisk <removed>./g' \ - -e 's/typescript file.*/typescript file <removed>./g' \ - $TS_OUTPUT + if [ -n "${DEVNAME}" ]; then + sed -i -e "s@${DEVNAME}@<removed>@;" $TS_OUTPUT + fi + + sed -i \ + -e 's/Disk identifier:.*/Disk identifier: <removed>/' \ + -e 's/Created a new.*/Created a new <removed>./' \ + -e 's/^Device[[:blank:]]*Start/Device Start/' \ + -e 's/^Device[[:blank:]]*Boot/Device Boot/' \ + -e 's/Welcome to fdisk.*/Welcome to fdisk <removed>./' \ + -e 's/typescript file.*/typescript file <removed>./' \ + $TS_OUTPUT } function ts_scsi_debug_init { |