SHA256
1
0
forked from pool/libguestfs
libguestfs/libguestfs.test.simple.run-libugestfs-test-tool.sh
Olaf Hering 898c43d60f - add libguestfs-test subpackage, /usr/share/guestfs (fate#316275)
libguestfs.test.simple.run-libugestfs-test-tool.sh
  libguestfs.test.simple.create-opensuse-guest.sh

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=258
2014-01-22 10:15:09 +00:00

27 lines
724 B
Bash

#!/bin/bash
# libguestfs-test-tool starts its temporary guest using a dummy disk image
# It creates a partition, a filesystem, mounts it and touches a file
# Once it is done the dummy image is removed again
# Per default it runs in --verbose mode, and our version trace the API calls
#
# Expected runtime: ca. 10 seconds
#
# Expected output:
# guest should start
# no "obvious" errors should be shown during the disk operation
# Somewhere at the end of the verbose output lines like this are expected:
# ...
# libguestfs: trace: touch "/hello"
# ...
# libguestfs: trace: touch = 0
#
#
set -x
set -e
unset LANG
unset ${!LC_*}
cpus=`grep -Ec 'cpu[0-9]' /proc/stat || echo 1`
libguestfs-test-tool -V
time libguestfs-test-tool