[libvirt-php 4/6] tests: skip test if not running on host with running libvirtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 tests/test-get-models.phpt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test-get-models.phpt b/tests/test-get-models.phpt
index 60af7fa..3ed6ec5 100644
--- a/tests/test-get-models.phpt
+++ b/tests/test-get-models.phpt
@@ -1,9 +1,9 @@
 <?php
 	require_once('functions.phpt');
 
-	$conn = libvirt_connect(NULL);
+	$conn = @libvirt_connect(NULL, false);
 	if (!is_resource($conn))
-		bail('Connection to default hypervisor failed');
+		skip( basename(__FILE__) );
 
 	$soundhw = libvirt_connect_get_soundhw_models($conn, NULL, VIR_CONNECT_FLAG_SOUNDHW_GET_NAMES);
 	$nics = libvirt_connect_get_nic_models($conn);
-- 
2.26.2





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux