soltest: force the use of the --testpath option for soltest with an explicit error.

This commit is contained in:
Daniel Kirchner 2018-03-14 10:45:01 +01:00
parent 032ea9bc5b
commit 1882c508c6

View File

@ -55,6 +55,10 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
{ {
master_test_suite_t& master = framework::master_test_suite(); master_test_suite_t& master = framework::master_test_suite();
master.p_name.value = "SolidityTests"; master.p_name.value = "SolidityTests";
solAssert(
!dev::test::Options::get().testPath.empty(),
"No test path specified. The --testpath argument is required."
);
solAssert(dev::solidity::test::SyntaxTest::registerTests( solAssert(dev::solidity::test::SyntaxTest::registerTests(
master, master,
dev::test::Options::get().testPath / "libsolidity", dev::test::Options::get().testPath / "libsolidity",