#4 Make tests conditional enableing tests as a default.
Merged 5 years ago by jaruga. Opened 5 years ago by jaruga.
rpms/ jaruga/rubygem-mongo feature/conditional-tests  into  master

file modified
+5 -2
@@ -1,7 +1,7 @@ 

  %global gem_name mongo

  # mongodb is not stable on rawhide and crashes during test

  # renable test once mongodb is stable again

- %global enable_tests 1

+ %bcond_without tests

  

  Name: rubygem-%{gem_name}

  Version: 2.6.2
@@ -55,7 +55,7 @@ 

  # Drop the shebang, file is not executable anyway.

  sed -i '/#!\// d' %{buildroot}%{gem_instdir}/Rakefile

  

- %if 0%{?enable_tests}

+ %if %{with tests}

  %check

  pushd .%{gem_instdir}

  
@@ -109,6 +109,9 @@ 

  %{gem_instdir}/spec

  

  %changelog

+ * Wed Sep 12 2018 Jun Aruga <jaruga@redhat.com> - 2.6.2-1

+ - Make tests conditional enableing tests as a default.

+ 

  * Mon Sep 10 2018 Vít Ondruch <vondruch@redhat.com> - 2.6.2-1

  - Update to mongo 2.6.2.

  

This PR is to enable us to run tests optionally by setting the parameter by outside.
The purpose is to build ruby module even in the case of rubygem-mongo test is failed.

$ mock -r fedora-rawhide-x86_64 --with tests *.src.rpm
$ mock -r fedora-rawhide-x86_64 --without tests *.src.rpm

Right now this package's build is failed for systemd and mock issue.
We need to take a time to fix it.

Could you please rebase and push the change? I forgot to merge it prior pushing, apologies :/

rebased onto 4bc10c4

5 years ago

Sure, rebased now.
Thanks for working to pass the tests.

<pvalena> https://src.fedoraproject.org/rpms/rubygem-mongo/pull-request/4#comment-14914 - AFAICT you're free to merge it yourself

Talking with @pvalena , I would merge this PR.

Pull-Request has been merged by jaruga

5 years ago