From 745b864c257fe9898cdb44596c59c5563c2d8ebc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 15 Jun 2016 17:13:15 +0200 Subject: php-alcaeus-mongo-php-adapter: fix tests --- php-alcaeus-mongo-php-adapter.spec | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/php-alcaeus-mongo-php-adapter.spec b/php-alcaeus-mongo-php-adapter.spec index fa92a80..2a20752 100644 --- a/php-alcaeus-mongo-php-adapter.spec +++ b/php-alcaeus-mongo-php-adapter.spec @@ -10,7 +10,7 @@ %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner alcaeus %global gh_project mongo-php-adapter -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 6 +%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 %global with_tests 0%{!?_without_tests:1} %else %global with_tests 0%{?_with_tests:1} @@ -42,7 +42,7 @@ BuildRequires: php-spl # from composer.json, require-dev": { # "phpunit/phpunit": "^4.8 || ^5.0" BuildRequires: php-composer(phpunit/phpunit) -BuildRequires: mongodb-server >= 2.4 +BuildRequires: mongodb-server >= 2.6 %endif # From composer.json, "require": { @@ -103,39 +103,40 @@ cp -pr lib/%{ns_vendor} %{buildroot}%{_datadir}/php/%{ns_vendor} %check %if %{with_tests} +RET=0 + # ignore know to fail tests (different error code) sed -e 's/testDeleteIndexUsingIndexName/SKIP_testDeleteIndexUsingIndexName/' \ -e 's/testDeleteIndexesForNonExistingCollection/SKIP_testDeleteIndexesForNonExistingCollection/' \ -i tests/%{ns_vendor}/MongoDbAdapter/Mongo/MongoCollectionTest.php +cat << 'EOF' | tee bs.php +