diff options
author | Christoph Jentzsch <jentzsch.software@gmail.com> | 2014-10-28 00:04:18 +0800 |
---|---|---|
committer | Christoph Jentzsch <jentzsch.software@gmail.com> | 2014-10-28 00:04:18 +0800 |
commit | fb2157445522a857e05f8c4b9ee5d43755f92c14 (patch) | |
tree | 23678b1d1b076b2d146b3f84d47aca23144bc0c6 /genesis.cpp | |
parent | b69cc9815ff7b93e811f7fb5b0ef8b5164a1812a (diff) | |
download | dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.gz dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.bz2 dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.lz dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.xz dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.tar.zst dexon-solidity-fb2157445522a857e05f8c4b9ee5d43755f92c14.zip |
use ETHEREUM_TEST_PATH in all tests
Diffstat (limited to 'genesis.cpp')
-rw-r--r-- | genesis.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/genesis.cpp b/genesis.cpp index 5f17d276..16ffb185 100644 --- a/genesis.cpp +++ b/genesis.cpp @@ -35,9 +35,20 @@ namespace js = json_spirit; BOOST_AUTO_TEST_CASE(genesis_tests) { + const char* ptestPath = getenv("ETHEREUM_TEST_PATH"); + string testPath; + + if (ptestPath == NULL) + { + cnote << " could not find environment variable ETHEREUM_TEST_PATH \n"; + testPath = "../../../tests"; + } + else + testPath = ptestPath; + cnote << "Testing Genesis block..."; js::mValue v; - string s = asString(contents("../../../tests/genesishashestest.json")); + string s = asString(contents(testPath + "/genesishashestest.json")); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of 'genesishashestest.json' is empty. Have you cloned the 'tests' repo branch develop?"); js::read_string(s, v); |