13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

/build/libethereum/test<br />

and execute a command ./testeth This will run all test cases automatically. To run a specific test case you<br />

could use parameter -t in the command line option:<br />

./testeth -t /<br />

Or just the test suite:<br />

./testeth -t <br />

You could also use --filltests option to rerun test creation from .json files which are located at<br />

../cpp-ethereum/test/.json<br />

./testeth -t / --filltests<br />

By default using --filltests option testeth recreate tests to the ETHEREUM_TEST_PATH folder. You<br />

might want to set this variable globally on your system like:<br />

nano /etc/environment<br />

ETHEREUM_TEST_PATH="/home/user/ethereum/tests"<br />

Filler files are test templates which are used to fill initial parameters defined at test specification <strong>Ethereum</strong> Tests<br />

and then create a complete test .json file. You might find filler files very useful when creating your own tests.<br />

The --checkstate option adds a BOOST error if the post state of filled test differs from it’s expected<br />

section.<br />

To specify a concrete test in a TEST_CASE file for filling/running procedure use --singletest option:<br />

./testeth -t / --singletest <br />

If you want to debug (note: testeth should be build with VMTRACE=1) a single test within a result test .json<br />

file, you might use the following command:<br />

./testeth --log_level=test_suite --run_test=/<br />

--singletest .json<br />

--vmtrace --verbosity 12<br />

or<br />

./testeth -t / --singletest --vmtrace<br />

--verbosity 12<br />

Some tests may use excessive resources when running, so by default they are disabled. Such tests require specific<br />

flag to be set in order to be executed. Like --performance, --inputLimits, --memory, --quadratic.<br />

You may also enable all of the tests by setting --all flag. Be careful. Enabled memory tests may stress your<br />

system to use 4GB of RAM and more.<br />

That’s it for test execution. To read more about command line options you may run testeth with --help<br />

option.<br />

Now let’s see what test cases are available.<br />

Test Cases<br />

Almost each test case has it’s filler file available at /webthree-umbrella/libethereum/test<br />

100 Chapter 1. Contents

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!