Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

ERROR: test case THREW exception: Must set path to test cases in TEST_DIR environment variable #62

Closed
Russell734 opened this issue Jan 14, 2020 · 1 comment

Comments

@Russell734
Copy link

ressull@ressull-Inspiron-3670:~/eEVM/build$ sudo ./eevm_tests 
[doctest] doctest version is "2.0.0"
[doctest] run with "--help" for options
===============================================================================
/home/ressull/eEVM/tests/harness.cpp:164:
TEST SUITE: logic
TEST CASE:  vmBitwiseLogicOperationTest

/home/ressull/eEVM/tests/harness.cpp:164: ERROR: test case THREW exception: Must set path to test cases in TEST_DIR environment variable

===============================================================================
/home/ressull/eEVM/tests/harness.cpp:169:
TEST SUITE: logic
TEST CASE:  vmEnvironmentalInfoTest

/home/ressull/eEVM/tests/harness.cpp:169: ERROR: test case THREW exception: Must set path to test cases in TEST_DIR environment variable

===============================================================================

I got a question, when I running the ./eevm_tests. it shows ERROR: test case THREW exception: Must set path to test cases in TEST_DIR environment variable.
Actually, I ran "export" also set the export in the /etc/profile

The hello_world/sum all works well, only the eevm_tests. But the thing is I already set the env.

Thanks.

@eddyashton
Copy link
Member

sudo uses a different environment. This test doesn't need sudo privileges, so either of the following should work:

TEST_DIR=[/path/to/test_cases] ./eevm_tests
export TEST_DIR=[/path/to/test_cases]
./eevm_tests

If you need to use sudo for some other reason, then sudo -E ./eevm_tests should preserve the existing environment variables.

To confirm the correct TEST_DIR path, run ctest -VV. This should run the tests, and will also print the environment variables used if you wish to run them manually/individually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants