mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
tests: move guestfs-md5.sh to test-data
Move it to the test-data directory, giving it a more generic name so it can be used also for more than just md5; adjust qemu tests accordingly. This is just code motion, no behaviour change.
This commit is contained in:
@@ -26,6 +26,9 @@ SUBDIRS += fake-virtio-win fake-virt-tools
|
||||
SUBDIRS += files
|
||||
SUBDIRS += .
|
||||
|
||||
EXTRA_DIST = \
|
||||
guestfs-hashsums.sh
|
||||
|
||||
# Build an ISO containing various files from the subdirectories, which
|
||||
# is used by tests/c-api and a few guestfish tests and regression
|
||||
# tests.
|
||||
|
||||
30
test-data/guestfs-hashsums.sh
Executable file
30
test-data/guestfs-hashsums.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash -
|
||||
# libguestfs
|
||||
# Copyright (C) 2014 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
do_md5 ()
|
||||
{
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
md5sum "$1" | awk '{print $1}'
|
||||
;;
|
||||
*)
|
||||
echo "$0: unknown method to calculate MD5 of file on $(uname)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user