This eases fixes the classname in the junit output of run-tests.php,
which now can be properly handled by junit XML consumers.
---
php/extension/guestfs_php_001.phpt | 13 ------------
php/extension/guestfs_php_002.phpt | 36 --------------------------------
php/extension/guestfs_php_003.phpt | 29 -------------------------
php/extension/tests/guestfs_php_001.phpt | 13 ++++++++++++
php/extension/tests/guestfs_php_002.phpt | 36 ++++++++++++++++++++++++++++++++
php/extension/tests/guestfs_php_003.phpt | 29 +++++++++++++++++++++++++
php/run-php-tests.sh | 2 +-
7 files changed, 79 insertions(+), 79 deletions(-)
delete mode 100644 php/extension/guestfs_php_001.phpt
delete mode 100644 php/extension/guestfs_php_002.phpt
delete mode 100644 php/extension/guestfs_php_003.phpt
create mode 100644 php/extension/tests/guestfs_php_001.phpt
create mode 100644 php/extension/tests/guestfs_php_002.phpt
create mode 100644 php/extension/tests/guestfs_php_003.phpt
diff --git a/php/extension/guestfs_php_001.phpt b/php/extension/guestfs_php_001.phpt
deleted file mode 100644
index 013ebb5..0000000
--- a/php/extension/guestfs_php_001.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Load the module and create a handle.
---FILE--
-<?php
-$g = guestfs_create ();
-if ($g == false) {
- echo ("Failed to create guestfs_php handle.\n");
- exit;
-}
-echo ("Created guestfs_php handle.\n");
-?>
---EXPECT--
-Created guestfs_php handle.
diff --git a/php/extension/guestfs_php_002.phpt b/php/extension/guestfs_php_002.phpt
deleted file mode 100644
index 91b2067..0000000
--- a/php/extension/guestfs_php_002.phpt
+++ /dev/null
@@ -1,36 +0,0 @@
---TEST--
-Launch the appliance and run basic tests.
---FILE--
-<?php
-$g = guestfs_create ();
-if ($g == false) {
- echo ("Failed to create guestfs_php handle.\n");
- exit;
-}
-
-if (! guestfs_add_drive_scratch ($g, 100 * 1024 * 1024) ||
- ! guestfs_launch ($g) ||
- ! guestfs_part_disk ($g, "/dev/sda", "mbr") ||
- ! guestfs_pvcreate ($g, "/dev/sda1") ||
- ! guestfs_vgcreate ($g, "VG", array ("/dev/sda1")) ||
- ! guestfs_lvcreate ($g, "LV", "VG", 64) ||
- ! guestfs_mkfs ($g, "ext2", "/dev/VG/LV")) {
- die ("Error: ".guestfs_last_error ($g)."\n");
-}
-
-$version = guestfs_version ($g);
-if ($version == false) {
- echo ("Error: ".guestfs_last_error ($g)."\n");
- exit;
-}
-if (!is_int ($version["major"]) ||
- !is_int ($version["minor"]) ||
- !is_int ($version["release"]) ||
- !is_string ($version["extra"])) {
- echo ("Error: incorrect return type from guestfs_version\n");
-}
-
-echo ("OK\n");
-?>
---EXPECT--
-OK
diff --git a/php/extension/guestfs_php_003.phpt b/php/extension/guestfs_php_003.phpt
deleted file mode 100644
index e268e98..0000000
--- a/php/extension/guestfs_php_003.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Check function with optional arguments.
---FILE--
-<?php
-$g = guestfs_create ();
-if ($g == false) {
- echo ("Failed to create guestfs_php handle.\n");
- exit;
-}
-if (guestfs_add_drive ($g, "/dev/null") == false) {
- echo ("Failed add_drive, no optional arguments: " . guestfs_last_error ($g) .
"\n");
- exit;
-}
-if (guestfs_add_drive ($g, "/dev/null", 0) == false) {
- echo ("Failed add_drive, one optional argument: " . guestfs_last_error ($g) .
"\n");
- exit;
-}
-if (guestfs_add_drive ($g, "/dev/null", 1) == false) {
- echo ("Failed add_drive, one optional argument: " . guestfs_last_error ($g) .
"\n");
- exit;
-}
-if (guestfs_add_drive ($g, "/dev/null", 1, "raw") == false) {
- echo ("Failed add_drive, two optional arguments: " . guestfs_last_error ($g)
. "\n");
- exit;
-}
-echo ("Completed tests OK.\n");
-?>
---EXPECT--
-Completed tests OK.
diff --git a/php/extension/tests/guestfs_php_001.phpt
b/php/extension/tests/guestfs_php_001.phpt
new file mode 100644
index 0000000..013ebb5
--- /dev/null
+++ b/php/extension/tests/guestfs_php_001.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Load the module and create a handle.
+--FILE--
+<?php
+$g = guestfs_create ();
+if ($g == false) {
+ echo ("Failed to create guestfs_php handle.\n");
+ exit;
+}
+echo ("Created guestfs_php handle.\n");
+?>
+--EXPECT--
+Created guestfs_php handle.
diff --git a/php/extension/tests/guestfs_php_002.phpt
b/php/extension/tests/guestfs_php_002.phpt
new file mode 100644
index 0000000..91b2067
--- /dev/null
+++ b/php/extension/tests/guestfs_php_002.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Launch the appliance and run basic tests.
+--FILE--
+<?php
+$g = guestfs_create ();
+if ($g == false) {
+ echo ("Failed to create guestfs_php handle.\n");
+ exit;
+}
+
+if (! guestfs_add_drive_scratch ($g, 100 * 1024 * 1024) ||
+ ! guestfs_launch ($g) ||
+ ! guestfs_part_disk ($g, "/dev/sda", "mbr") ||
+ ! guestfs_pvcreate ($g, "/dev/sda1") ||
+ ! guestfs_vgcreate ($g, "VG", array ("/dev/sda1")) ||
+ ! guestfs_lvcreate ($g, "LV", "VG", 64) ||
+ ! guestfs_mkfs ($g, "ext2", "/dev/VG/LV")) {
+ die ("Error: ".guestfs_last_error ($g)."\n");
+}
+
+$version = guestfs_version ($g);
+if ($version == false) {
+ echo ("Error: ".guestfs_last_error ($g)."\n");
+ exit;
+}
+if (!is_int ($version["major"]) ||
+ !is_int ($version["minor"]) ||
+ !is_int ($version["release"]) ||
+ !is_string ($version["extra"])) {
+ echo ("Error: incorrect return type from guestfs_version\n");
+}
+
+echo ("OK\n");
+?>
+--EXPECT--
+OK
diff --git a/php/extension/tests/guestfs_php_003.phpt
b/php/extension/tests/guestfs_php_003.phpt
new file mode 100644
index 0000000..e268e98
--- /dev/null
+++ b/php/extension/tests/guestfs_php_003.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Check function with optional arguments.
+--FILE--
+<?php
+$g = guestfs_create ();
+if ($g == false) {
+ echo ("Failed to create guestfs_php handle.\n");
+ exit;
+}
+if (guestfs_add_drive ($g, "/dev/null") == false) {
+ echo ("Failed add_drive, no optional arguments: " . guestfs_last_error ($g) .
"\n");
+ exit;
+}
+if (guestfs_add_drive ($g, "/dev/null", 0) == false) {
+ echo ("Failed add_drive, one optional argument: " . guestfs_last_error ($g) .
"\n");
+ exit;
+}
+if (guestfs_add_drive ($g, "/dev/null", 1) == false) {
+ echo ("Failed add_drive, one optional argument: " . guestfs_last_error ($g) .
"\n");
+ exit;
+}
+if (guestfs_add_drive ($g, "/dev/null", 1, "raw") == false) {
+ echo ("Failed add_drive, two optional arguments: " . guestfs_last_error ($g)
. "\n");
+ exit;
+}
+echo ("Completed tests OK.\n");
+?>
+--EXPECT--
+Completed tests OK.
diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh
index e498987..53216be 100755
--- a/php/run-php-tests.sh
+++ b/php/run-php-tests.sh
@@ -41,7 +41,7 @@ rm -f env
echo "PATH=$PATH" > env
printenv | grep -E '^(LIBGUESTFS|LIBVIRT|LIBVIRTD|VIRTLOCKD|LD|MALLOC)_' >>
env
-TESTS=$(echo guestfs_php_*.phpt)
+TESTS=$(echo tests/guestfs_php_*.phpt)
echo TESTS: $TESTS
make test TESTS="$TESTS" PHP_EXECUTABLE="$PWD/php-for-tests.sh"
REPORT_EXIT_STATUS=1
--
1.8.3.1