Boost logo

Boost Users :

Subject: [Boost-users] [boost.test] Don't report skipped test as failure
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2016-07-08 07:12:36


Hello,

I use boost.test precondition in an MPI application to disable test at ranks != 0 if they do not use MPI:

boost::test_tools::assertion_result isMaster(boost::unit_test::test_unit_id)
{
  return precice::utils::Parallel::getProcessRank() == 0;
}

BOOST_AUTO_TEST_SUITE(NearestNeighborMapping)

BOOST_AUTO_TEST_CASE(ConsistentNonIncremental,
                     * boost::unit_test::precondition(isMaster))
{...}

That works perfect, I just don't like that sipped test are reported as errors. Example with all tests deactivated:

% ./testprecice
Global setup
Running 2 test cases...
Global teardown

*** Errors were detected in the test module "Master Test Suite"; see standard output for details

Here you think it's an error, but it's just skipped tests:

% ./testprecice -r detailed
Global setup
Running 2 test cases...
Global teardown

Test module "Master Test Suite" has failed with:
  2 test cases out of 2 skipped

  Test suite "NearestNeighborMapping" has failed with:
    2 test cases out of 2 skipped

    Test case "NearestNeighborMapping/ConsistentNonIncremental" was skipped
    Test case "NearestNeighborMapping/ConservativeNonIncremental" was skipped

Could this behavior be changed somehow and skipped test not be reported as failures?

Thanks,
Florian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net