mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: Replace $TEST_FUNCTIONS
Replace strange $TEST_FUNCTIONS variable/expansion thing with something more like what we use in nbdkit, a simple tests/functions.sh script that gets sourced into each test script. Update the common submodule to get: commit 8137d47d0e654065391151eb275e3b64f230f6f5 Author: Richard W.M. Jones <rjones@redhat.com> Date: Thu Feb 13 11:13:55 2025 +0000 mlcustomize, mltools: Replace $TEST_FUNCTIONS TEST_FUNCTIONS is being removed from libguestfs and guestfs-tools (it was removed from virt-v2v a while back). Make the same adjustment in the common submodule. (and some other commits which are not relevant to libguestfs)
This commit is contained in:
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish -a option.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-a.out
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test add-domain command.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-add-domain-{1,2,3,4}.img
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
# Test guestfish -a URI.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-add-uri.out
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish alloc and sparse commands.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-alloc.img
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish copy-in and copy-out commands.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
# This test fails on some versions of mock which lack /dev/fd
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish -d option.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-d-{1,2,3,4}.img
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
$top_srcdir/podcheck.pl "$srcdir/guestfish.pod" guestfish \
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish edit command.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
# This test fails on some versions of mock which lack /dev/fd
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish string escapes.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test.output test.error test.error.old
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish events.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-events.out
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish file attributes commands (chmod, copy-attributes, etc).
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-file-attrs.out
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test find0 call.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_test_iso
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test guestfish glob command.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-glob.img test-glob.out
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_phony_guest fedora.img
|
||||
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
# Test passing invalid parameters for memory size, smp, etc when setting up
|
||||
# the appliance.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
# Memory size
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
|
||||
# Test guestfish mount-local / mount-local-run commands.
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
skip_if_skipped
|
||||
skip_unless_fuse
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test read_file call.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_test_iso
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test remote events in guestfish.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
eval "$(guestfish --listen)"
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test remote control of guestfish.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-remote.img
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
# Test reopening the handle in the same process. This used to fail
|
||||
# but was corrected in 03e1f74ee08dc71bc09cc7655bf4732685f80b43.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-reopen.img
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_phony_guest fedora.img
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
|
||||
# Test remote control of guestfish.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
rm -f test-stringlist.img
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
# RHBZ#511372 guestfish doesn't understand '~' in filenames
|
||||
# and multiple other fixes to tilde handling.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
# Set XDG_CACHE_HOME correctly, unless set already. See:
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
# target to a directory instead of the full filename, then previously
|
||||
# libguestfs would hang. It should return an error instead.
|
||||
|
||||
source ../tests/functions.sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_test_iso
|
||||
|
||||
|
||||
Reference in New Issue
Block a user