mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: Extend $TEST_FUNCTIONS with predefined functions for skipping tests etc.
Apply this change across all the shell scripts containing tests. Additionally this defines the environment variables $abs_srcdir, $abs_builddir, $top_srcdir, $top_builddir, $abs_top_srcdir and $abs_top_builddir which can now be used throughout test scripts.
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
export LANG=C
|
||||
set -e
|
||||
|
||||
$srcdir/../podcheck.pl virt-rescue.pod virt-rescue
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
|
||||
$top_srcdir/podcheck.pl virt-rescue.pod virt-rescue
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
export LANG=C
|
||||
set -e
|
||||
|
||||
guest=../test-data/phony-guests/fedora.img
|
||||
$TEST_FUNCTIONS
|
||||
skip_if_skipped
|
||||
skip_unless_phony_guest fedora.img
|
||||
|
||||
if [ ! -s "$guest" ]; then
|
||||
echo "$0: test skipped because $guest does not exist or is an empty file"
|
||||
exit 77
|
||||
fi
|
||||
guest="$top_builddir/test-data/phony-guests/fedora.img"
|
||||
|
||||
rm -f virt-rescue-suggest.out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user