diff options
author | Bruce Rogers <brogers@suse.com> | 2017-03-02 12:44:37 -0700 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2017-03-06 00:54:19 -0600 |
commit | ec72c0e271f2b13953079a4f4dadb49ac5910b54 (patch) | |
tree | 71e345f56332499135db4e933c682fe973cc9123 /tests | |
parent | ce2eb6c4a044d809caf4dc4e08aed77678f9760e (diff) | |
download | qemu-ec72c0e271f2b13953079a4f4dadb49ac5910b54.zip qemu-ec72c0e271f2b13953079a4f4dadb49ac5910b54.tar.gz qemu-ec72c0e271f2b13953079a4f4dadb49ac5910b54.tar.bz2 |
tests: check path to avoid a failing qga/get-vcpus test
The qga/get-vcpus test fails in a simple chroot environment, as
used in an openSUSE Build Service local build, so first check
that the sysfs based path exists in order to avoid calling this
test in an environment where it won't work right.
Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-qga.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-qga.c b/tests/test-qga.c index 868b02a..9e6d19a 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -924,7 +924,9 @@ int main(int argc, char **argv) g_test_add_data_func("/qga/info", &fix, test_qga_info); g_test_add_data_func("/qga/network-get-interfaces", &fix, test_qga_network_get_interfaces); - g_test_add_data_func("/qga/get-vcpus", &fix, test_qga_get_vcpus); + if (!access("/sys/devices/system/cpu/cpu0", F_OK)) { + g_test_add_data_func("/qga/get-vcpus", &fix, test_qga_get_vcpus); + } g_test_add_data_func("/qga/get-fsinfo", &fix, test_qga_get_fsinfo); g_test_add_data_func("/qga/get-memory-block-info", &fix, test_qga_get_memory_block_info); |