[parted-devel] test failures when configuring without --disable-shared
Jim Meyering
jim at meyering.net
Tue May 29 15:35:06 UTC 2007
On IRC, xeos reported test failures in t0000 and t2000
with diffs like this:
-/home/xeos/projects/parted/parted/.libs/lt-parted: invalid token: msdos
+parted: invalid token: msdos
Here's the patch I expect to apply.
It also removes an inter-part dependency by moving the creation
of the "o2" temporary file into the test where it's used.
Some of this duplication should be factored out, eventually...
diff --git a/tests/t0000-basic.sh b/tests/t0000-basic.sh
index 35bf6e6..5f651b3 100755
--- a/tests/t0000-basic.sh
+++ b/tests/t0000-basic.sh
@@ -71,13 +71,14 @@ test_expect_success 'create interactive input' 'printf "y\n\n" > in'
# Now that there's a label, rerunning the same command is interactive.
test_expect_success \
'rerun that same command, but now with a preexisting label' \
- 'parted ---pretend-input-tty $dev mklabel msdos < in > o2 2>&1'
+ 'parted ---pretend-input-tty $dev mklabel msdos < in > out 2>&1'
# Transform the actual output, to avoid spurious differences when
# $PWD contains a symlink-to-dir. Also, remove the ^M ...^M bogosity.
test_expect_success \
'normalize the actual output' \
- 'sed "s,on /.*/$dev,on DEVICE,;s,
*
,,;s, $,," o2 > out'
+ 'mv out o2 && sed -e "s,on /.*/$dev,on DEVICE,;s,
*
,,;s, $,," \
+ -e "s,^.*/lt-parted: ,parted: ," o2 > out'
# Create expected output file.
fail=0
diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh
index d571ae1..d71da87 100755
--- a/tests/t1100-busy-label.sh
+++ b/tests/t1100-busy-label.sh
@@ -76,7 +76,8 @@ test_expect_success 'create expected output file' 'test $fail = 0'
# Transform the actual output, removing ^M ...^M.
test_expect_success \
'normalize the actual output' \
- 'mv out o2 && sed "s,
*
,,;s, $,," o2 > out'
+ 'mv out o2 && sed -e "s,
*
,,;s, $,," o2 \
+ -e "s,^.*/lt-parted: ,parted: ," o2 > out'
test_expect_success \
'check for expected failure diagnostic' \
diff --git a/tests/t2000-mkfs.sh b/tests/t2000-mkfs.sh
index fb39815..e1a01fc 100755
--- a/tests/t2000-mkfs.sh
+++ b/tests/t2000-mkfs.sh
@@ -96,6 +96,11 @@ test_expect_failure \
'parted -s $dev mkpartfs primary bogus 1 1 >out 2>&1'
test_expect_success \
+ 'normalize the actual output' \
+ 'mv out o2 && sed -e "s,
*
,,;s, $,," \
+ -e "s,^.*/lt-parted: ,parted: ," o2 > out'
+
+test_expect_success \
'check for expected diagnostic' \
'{ echo "parted: invalid token: bogus"
echo "Error: Expecting a file system type."; } > exp &&
More information about the parted-devel
mailing list