diff options
-rw-r--r-- | fish/Makefile.am | 20 | ||||
-rwxr-xr-x | fish/test-a.sh (renamed from fish/test-guestfish-a.sh) | 10 | ||||
-rwxr-xr-x | fish/test-add-domain.sh | 6 | ||||
-rwxr-xr-x | fish/test-copy.sh | 4 | ||||
-rwxr-xr-x | fish/test-d.sh (renamed from fish/test-guestfish-d.sh) | 2 | ||||
-rwxr-xr-x | fish/test-edit.sh | 2 | ||||
-rwxr-xr-x | fish/test-escapes.sh (renamed from fish/test-guestfish-escapes.sh) | 2 | ||||
-rwxr-xr-x | fish/test-events.sh (renamed from fish/test-guestfish-events.sh) | 2 | ||||
-rwxr-xr-x | fish/test-find0.sh | 2 | ||||
-rwxr-xr-x | fish/test-read_file.sh | 4 | ||||
-rwxr-xr-x | fish/test-remote.sh | 16 | ||||
-rwxr-xr-x | fish/test-reopen.sh | 2 | ||||
-rwxr-xr-x | fish/test-stringlist.sh | 10 | ||||
-rwxr-xr-x | fish/test-tilde.sh (renamed from fish/test-guestfish-tilde.sh) | 14 | ||||
-rwxr-xr-x | fish/test-upload-to-dir.sh | 2 |
15 files changed, 49 insertions, 49 deletions
diff --git a/fish/Makefile.am b/fish/Makefile.am index 07784547..23dafd3a 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -236,12 +236,12 @@ TESTS_ENVIRONMENT = \ $(top_builddir)/run TESTS = \ + test-a.sh \ test-add-domain.sh \ - test-guestfish-a.sh \ - test-guestfish-d.sh \ - test-guestfish-escapes.sh \ - test-guestfish-events.sh \ - test-guestfish-tilde.sh + test-d.sh \ + test-escapes.sh \ + test-events.sh \ + test-tilde.sh if ENABLE_APPLIANCE TESTS += \ @@ -256,17 +256,17 @@ TESTS += \ endif EXTRA_DIST += \ + test-a.sh \ test-add-domain.sh \ test-copy.sh \ + test-d.sh \ test-edit.sh \ + test-escapes.sh \ + test-events.sh \ test-find0.sh \ - test-guestfish-a.sh \ - test-guestfish-d.sh \ - test-guestfish-escapes.sh \ - test-guestfish-events.sh \ - test-guestfish-tilde.sh \ test-read_file.sh \ test-remote.sh \ test-reopen.sh \ test-stringlist.sh \ + test-tilde.sh \ test-upload-to-dir.sh diff --git a/fish/test-guestfish-a.sh b/fish/test-a.sh index 4fd45f73..20cc5cd8 100755 --- a/fish/test-guestfish-a.sh +++ b/fish/test-a.sh @@ -22,23 +22,23 @@ set -e rm -f test.out -../fish/guestfish -x -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x -a /dev/null </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out -../fish/guestfish -x --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 grep -sq 'add_drive.*format:qcow2' test.out -../fish/guestfish -x --ro --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --ro --format=qcow2 -a /dev/null </dev/null >test.out 2>&1 grep -sq 'add_drive.*readonly:true.*format:qcow2' test.out -../fish/guestfish -x --format -a /dev/null </dev/null >test.out 2>&1 +./guestfish -x --format -a /dev/null </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out -../fish/guestfish -x -a /dev/null --format=qcow2 </dev/null >test.out 2>&1 +./guestfish -x -a /dev/null --format=qcow2 </dev/null >test.out 2>&1 ! grep -sq 'add_drive.*format' test.out diff --git a/fish/test-add-domain.sh b/fish/test-add-domain.sh index 6154a758..85937088 100755 --- a/fish/test-add-domain.sh +++ b/fish/test-add-domain.sh @@ -62,7 +62,7 @@ cat > test.xml <<EOF </node> EOF -../fish/guestfish >test.out <<EOF +./guestfish >test.out <<EOF domain guest libvirturi:test://$cwd/test.xml readonly:true debug-drives EOF @@ -72,7 +72,7 @@ grep -sq "test2.img.*snapshot=on.*format=raw" test.out grep -sq "test3.img.*snapshot=on.*format=qcow2" test.out # Test readonlydisk = "ignore". -../fish/guestfish >test.out <<EOF +./guestfish >test.out <<EOF -domain guest libvirturi:test://$cwd/test.xml readonly:true readonlydisk:ignore debug-drives EOF @@ -84,7 +84,7 @@ grep -sq "test3.img" test.out # Test atomicity. rm test3.img -../fish/guestfish >test.out <<EOF +./guestfish >test.out <<EOF -domain guest libvirturi:test://$cwd/test.xml readonly:true debug-drives EOF diff --git a/fish/test-copy.sh b/fish/test-copy.sh index b6f34226..6467a52a 100755 --- a/fish/test-copy.sh +++ b/fish/test-copy.sh @@ -36,7 +36,7 @@ cp $srcdir/../tests/data/known* original cp -P $srcdir/../tests/data/abssymlink* original output=$( -../fish/guestfish -N fs -m /dev/sda1 <<EOF +./guestfish -N fs -m /dev/sda1 <<EOF mkdir /data # This creates a directory /data/data/ copy-in original /data @@ -63,7 +63,7 @@ fi mkdir copy -../fish/guestfish --ro -a test1.img -m /dev/sda1 <<EOF +./guestfish --ro -a test1.img -m /dev/sda1 <<EOF copy-out /data/original copy EOF diff --git a/fish/test-guestfish-d.sh b/fish/test-d.sh index 41f16094..6475ad83 100755 --- a/fish/test-guestfish-d.sh +++ b/fish/test-d.sh @@ -62,7 +62,7 @@ cat > test.xml <<EOF </node> EOF -../fish/guestfish -c "test://$cwd/test.xml" --ro -d guest \ +./guestfish -c "test://$cwd/test.xml" --ro -d guest \ debug-drives </dev/null >test.out grep -sq "test1.img.*snapshot=on" test.out ! grep -sq "test1.img.*format" test.out diff --git a/fish/test-edit.sh b/fish/test-edit.sh index 93b2e908..a077ada6 100755 --- a/fish/test-edit.sh +++ b/fish/test-edit.sh @@ -34,7 +34,7 @@ rm -f test1.img export EDITOR="echo second line of text >>" output=$( -../fish/guestfish -N fs -m /dev/sda1 <<EOF +./guestfish -N fs -m /dev/sda1 <<EOF write /file.txt "this is a test\n" chmod 0600 /file.txt chown 10 11 /file.txt diff --git a/fish/test-guestfish-escapes.sh b/fish/test-escapes.sh index 3ab8a319..4cd3cf2e 100755 --- a/fish/test-guestfish-escapes.sh +++ b/fish/test-escapes.sh @@ -22,7 +22,7 @@ set -e rm -f test.output test.error test.error.old -../fish/guestfish <<'EOF' 2>test.error | od > test.output +./guestfish <<'EOF' 2>test.error | od > test.output echo "" echo " " echo " " diff --git a/fish/test-guestfish-events.sh b/fish/test-events.sh index d910c675..76d3823f 100755 --- a/fish/test-guestfish-events.sh +++ b/fish/test-events.sh @@ -22,7 +22,7 @@ set -e rm -f test.out -../fish/guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' > test.out +./guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' > test.out trace true event ev1 * "echo $EVENT $@" diff --git a/fish/test-find0.sh b/fish/test-find0.sh index 5fd31856..1fd638ee 100755 --- a/fish/test-find0.sh +++ b/fish/test-find0.sh @@ -22,7 +22,7 @@ set -e rm -f test.out -../fish/guestfish <<'EOF' +./guestfish <<'EOF' add-ro ../tests/data/test.iso run mount-ro /dev/sda / diff --git a/fish/test-read_file.sh b/fish/test-read_file.sh index c6e41580..d0471333 100755 --- a/fish/test-read_file.sh +++ b/fish/test-read_file.sh @@ -22,7 +22,7 @@ set -e rm -f test.out -../fish/guestfish <<'EOF' > test.out +./guestfish <<'EOF' > test.out add-ro ../tests/data/test.iso run mount-ro /dev/sda / @@ -31,4 +31,4 @@ EOF cmp ../tests/data/helloworld.tar test.out -rm -f test.out
\ No newline at end of file +rm -f test.out diff --git a/fish/test-remote.sh b/fish/test-remote.sh index ff5b85ad..a0010321 100755 --- a/fish/test-remote.sh +++ b/fish/test-remote.sh @@ -22,24 +22,24 @@ set -e rm -f test.img -eval `../fish/guestfish --listen` +eval `./guestfish --listen` -../fish/guestfish --remote alloc test.img 10M -../fish/guestfish --remote run -../fish/guestfish --remote part-disk /dev/sda mbr -../fish/guestfish --remote mkfs ext2 /dev/sda1 -../fish/guestfish --remote mount-options "" /dev/sda1 / +./guestfish --remote alloc test.img 10M +./guestfish --remote run +./guestfish --remote part-disk /dev/sda mbr +./guestfish --remote mkfs ext2 /dev/sda1 +./guestfish --remote mount-options "" /dev/sda1 / # Failure of the above commands will cause the guestfish listener to exit. # Incorrect return from echo_daemon will not, so need to ensure the listener # exits in any case, while still reporting an error. error=0 -echo=$(../fish/guestfish --remote echo_daemon "This is a test") +echo=$(./guestfish --remote echo_daemon "This is a test") if [ "$echo" != "This is a test" ]; then error=1; fi -../fish/guestfish --remote exit +./guestfish --remote exit rm -f test.img diff --git a/fish/test-reopen.sh b/fish/test-reopen.sh index 321f2a02..383fb077 100755 --- a/fish/test-reopen.sh +++ b/fish/test-reopen.sh @@ -23,7 +23,7 @@ set -e rm -f test.img -../fish/guestfish <<'EOF' +./guestfish <<'EOF' reopen reopen reopen diff --git a/fish/test-stringlist.sh b/fish/test-stringlist.sh index 1aa953bc..5928a810 100755 --- a/fish/test-stringlist.sh +++ b/fish/test-stringlist.sh @@ -22,7 +22,7 @@ set -e rm -f test.img -eval `../fish/guestfish --listen` +eval `./guestfish --listen` error=0 @@ -32,15 +32,15 @@ function check_echo { local echo - echo=$(../fish/guestfish --remote echo_daemon "$test") + echo=$(./guestfish --remote echo_daemon "$test") if [ "$echo" != "$expected" ]; then echo "Expected \"$expected\", got \"$echo\"" error=1 fi } -../fish/guestfish --remote alloc test.img 10M -../fish/guestfish --remote run +./guestfish --remote alloc test.img 10M +./guestfish --remote run check_echo "' '" " " check_echo "\'" "'" @@ -53,7 +53,7 @@ check_echo "'foo' 'bar'" "foo bar" check_echo "'foo' " "foo" check_echo " 'foo'" "foo" -../fish/guestfish --remote exit +./guestfish --remote exit rm -f test.img diff --git a/fish/test-guestfish-tilde.sh b/fish/test-tilde.sh index aed44311..cf39d339 100755 --- a/fish/test-guestfish-tilde.sh +++ b/fish/test-tilde.sh @@ -27,12 +27,12 @@ set -e HOME=$(pwd) export HOME -if [ `echo 'echo ~' | ../fish/guestfish` != "$HOME" ]; then +if [ `echo 'echo ~' | ./guestfish` != "$HOME" ]; then echo "$0: failed: did not expand ~ correctly" exit 1 fi -if [ `echo 'echo ~/foo' | ../fish/guestfish` != "$HOME/foo" ]; then +if [ `echo 'echo ~/foo' | ./guestfish` != "$HOME/foo" ]; then echo "$0: failed: did not expand ~/foo correctly" exit 1 fi @@ -41,12 +41,12 @@ fi # should have a home directory. root="$(echo ~root)" -if [ `echo 'echo ~root' | ../fish/guestfish` != "$root" ]; then +if [ `echo 'echo ~root' | ./guestfish` != "$root" ]; then echo "$0: failed: did not expand ~root correctly" exit 1 fi -if [ `echo 'echo ~root/foo' | ../fish/guestfish` != "$root/foo" ]; then +if [ `echo 'echo ~root/foo' | ./guestfish` != "$root/foo" ]; then echo "$0: failed: did not expand ~root/foo correctly" exit 1 fi @@ -55,16 +55,16 @@ fi unset HOME home="$(echo ~)" -if [ `echo 'echo ~' | ../fish/guestfish` != "$home" ]; then +if [ `echo 'echo ~' | ./guestfish` != "$home" ]; then echo "$0: failed: did not expand ~ correctly when \$HOME unset" exit 1 fi -if [ `echo 'echo ~/foo' | ../fish/guestfish` != "$home/foo" ]; then +if [ `echo 'echo ~/foo' | ./guestfish` != "$home/foo" ]; then echo "$0: failed: did not expand ~/foo correctly when \$HOME unset" exit 1 fi # Setting $HOME to pwd above causes guestfish to create a history # file. Remove it. -rm -f .guestfish
\ No newline at end of file +rm -f .guestfish diff --git a/fish/test-upload-to-dir.sh b/fish/test-upload-to-dir.sh index 1ef24a01..99aaad6b 100755 --- a/fish/test-upload-to-dir.sh +++ b/fish/test-upload-to-dir.sh @@ -24,7 +24,7 @@ set -e rm -f test1.img test.out -if ../fish/guestfish -N fs -m /dev/sda1 upload ../tests/data/test.iso / 2>test.out +if ./guestfish -N fs -m /dev/sda1 upload ../tests/data/test.iso / 2>test.out then echo "$0: expecting guestfish to return an error" exit 1 |