From ea6d925a5da79288bc2a3197c30f11c895a07a1a Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 26 Apr 2017 11:53:44 +0200 Subject: Option to disable/remove all tests that require IPC. --- test/boostTest.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'test/boostTest.cpp') diff --git a/test/boostTest.cpp b/test/boostTest.cpp index d1d35be3..6fc1c925 100644 --- a/test/boostTest.cpp +++ b/test/boostTest.cpp @@ -21,11 +21,9 @@ * Original code taken from boost sources. */ -#define BOOST_TEST_MODULE EthereumTests #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" - #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable:4535) // calling _set_se_translator requires /EHa @@ -36,3 +34,32 @@ #endif #pragma GCC diagnostic pop + +#include + +using namespace boost::unit_test; + +test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] ) +{ + master_test_suite_t& master = framework::master_test_suite(); + master.p_name.value = "SolidityTests"; + if (dev::test::Options::get().disableIPC) + { + for (auto suite: { + "SolidityAuctionRegistrar", + "SolidityFixedFeeRegistrar", + "SolidityWallet", + "LLLEndToEndTest", + "GasMeterTests", + "SolidityEndToEndTest", + "SolidityOptimizer" + }) + { + auto id = master.get(suite); + assert(id != INV_TEST_UNIT_ID); + master.remove(id); + } + } + + return 0; +} -- cgit v1.2.3