mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Option to disable/remove all tests that require IPC.
This commit is contained in:
parent
89bb8cbd6a
commit
ea6d925a5d
@ -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;
|
||||
}
|
||||
|
@ -108,6 +108,7 @@ struct Options: boost::noncopyable
|
||||
std::string ipcPath;
|
||||
bool showMessages = false;
|
||||
bool optimize = false;
|
||||
bool disableIPC = false;
|
||||
|
||||
static Options const& get();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user