[projects/template-specs] pecl: add example how to make failed tests as XFAIL

glen glen at pld-linux.org
Sat Oct 28 22:24:33 CEST 2017


commit 2f89de89a978d1a8bb6d369047a579ebda5e7854
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Sat Oct 28 23:23:58 2017 +0300

    pecl: add example how to make failed tests as XFAIL

 php-pecl.spec | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
---
diff --git a/php-pecl.spec b/php-pecl.spec
index 3fff798..4682aeb 100644
--- a/php-pecl.spec
+++ b/php-pecl.spec
@@ -34,6 +34,25 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %setup -qc
 mv %{modname}-%{version}/* .
 
+xfail() {
+	local t=$1
+	test -f $t
+	cat >> $t <<-EOF
+
+	--XFAIL--
+	Skip
+	EOF
+}
+
+# failed tests. investigate later
+while read line; do
+	t=${line##*\[}; t=${t%\]}
+	xfail $t
+done << 'EOF'
+Test for blowfish compatibility [tests/blowfish.phpt]
+Bug #8040 (MCRYPT_MODE_* do not seem to exist) [tests/bug8040.phpt]
+EOF
+
 %build
 phpize
 %configure
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/623ca67d0d26026d5c3d93ab7e89cbc5eb24136c



More information about the pld-cvs-commit mailing list