提交 ec72c0e2 编写于 作者: B Bruce Rogers 提交者: Michael Roth

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: NBruce Rogers <brogers@suse.com>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 ce2eb6c4
...@@ -924,7 +924,9 @@ int main(int argc, char **argv) ...@@ -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/info", &fix, test_qga_info);
g_test_add_data_func("/qga/network-get-interfaces", &fix, g_test_add_data_func("/qga/network-get-interfaces", &fix,
test_qga_network_get_interfaces); 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-fsinfo", &fix, test_qga_get_fsinfo);
g_test_add_data_func("/qga/get-memory-block-info", &fix, g_test_add_data_func("/qga/get-memory-block-info", &fix,
test_qga_get_memory_block_info); test_qga_get_memory_block_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册