com php-src: Add support for "xfail" to phpt SKIPIF sections: run-tests.php
| From: | Nikita Popov | Date: | Tue, 10 Jan 2017 22:32:03 +0000 |
| Subject: | com php-src: Add support for "xfail" to phpt SKIPIF sections: run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96681@lists.php.net to get a copy of this message | ||
Commit: 5cee9dfe9a479c15d08f66a4baca83ed4e7ed288
Author: Nikita Popov <nikic@php.net> Tue, 22 Nov 2016 22:43:23 +0100
Parents: 908ad3cc80136a0804138d112f601141a02e0c7c
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5cee9dfe9a479c15d08f66a4baca83ed4e7ed288
Log:
Add support for "xfail" to phpt SKIPIF sections
If SKIPIF output starts with "xfail" instead of "skip", the test
will be marked as XFAIL with the following message. Example:
--TEST--
Test xfailif feature
--SKIPIF--
<?php
if (some_cond()) die('xfail Expected to fail!');
?>
--FILE--
...
Changed paths:
M run-tests.php
Diff:
diff --git a/run-tests.php b/run-tests.php
index 14a252b..4016288 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1590,6 +1590,11 @@ TEST $file
$info = " (warn: $m[1])";
}
}
+
+ if (!strncasecmp('xfail', ltrim($output), 5)) {
+ // Pretend we have an XFAIL section
+ $section_text['XFAIL'] = trim(substr(ltrim($output), 5));
+ }
}
}