aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-04-26 17:53:44 +0800
committerchriseth <chris@ethereum.org>2017-04-26 18:36:15 +0800
commitea6d925a5da79288bc2a3197c30f11c895a07a1a (patch)
tree5800ca7ad764c2a989a7b3950d7bf882cd766b06 /test
parent89bb8cbd6a12b4e42b7f00ea6aa64bf738d7a263 (diff)
downloaddexon-solidity-ea6d925a5da79288bc2a3197c30f11c895a07a1a.tar.gz
dexon-solidity-ea6d925a5da79288bc2a3197c30f11c895a07a1a.tar.zst
dexon-solidity-ea6d925a5da79288bc2a3197c30f11c895a07a1a.zip
Option to disable/remove all tests that require IPC.
Diffstat (limited to 'test')
-rw-r--r--test/TestHelper.cpp4
-rw-r--r--test/TestHelper.h1
-rw-r--r--test/boostTest.cpp31
3 files changed, 33 insertions, 3 deletions
diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp
index 0c0857c9..094b59c6 100644
--- a/test/TestHelper.cpp
+++ b/test/TestHelper.cpp
@@ -43,8 +43,10 @@ Options::Options()
optimize = true;
else if (string(suite.argv[i]) == "--show-messages")
showMessages = true;
+ else if (string(suite.argv[i]) == "--no-ipc")
+ disableIPC = true;
- if (ipcPath.empty())
+ if (!disableIPC && ipcPath.empty())
if (auto path = getenv("ETH_TEST_IPC"))
ipcPath = path;
}
diff --git a/test/TestHelper.h b/test/TestHelper.h
index 8f05eead..3e74b54c 100644
--- a/test/TestHelper.h
+++ b/test/TestHelper.h
@@ -108,6 +108,7 @@ struct Options: boost::noncopyable
std::string ipcPath;
bool showMessages = false;
bool optimize = false;
+ bool disableIPC = false;
static Options const& get();
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 <test/TestHelper.h>
+
+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;
+}