OpenCMISS / functional_test_framework

A framework for running and evaluating OpenCMISS functional tests.
Apache License 2.0
0 stars 5 forks source link

Can't handle multiple tests in an example #16

Open chrispbradley opened 6 years ago

chrispbradley commented 6 years ago

The test framework does not work with multiple tests of the same type (python or non-python). For example a C and a Fortran test. If I have two test database files.

laplace_equation.cmake containing

set(TEST_GIT_REPO /data/OpenCMISS/examples/laplace_equation) set(TEST_BRANCH develop) set(TEST_TARGETS laplace_equation_Fortran) set(TEST_EXPECTED_RESULTS src/fortran/expected_results/) set(TEST_ABS_TOLERANCE 1e-12) set(TEST_REL_TOLERANCE 1e-12)

set(TEST_GIT_REPO /data/OpenCMISS/examples/laplace_equation) set(TEST_BRANCH develop) set(PYTEST_TARGETS src/python/laplace_equation.py) set(PYTEST_EXPECTED_RESULTS src/python/expected_results/) set(PYTEST_ABS_TOLERANCE 1e-12) set(PYTEST_REL_TOLERANCE 1e-12)

and laplace_equationc.cmake containing

set(TEST_GIT_REPO /data/OpenCMISS/examples/laplace_equation) set(TEST_BRANCH develop) set(TEST_TARGETS laplace_equation_C) set(TEST_EXPECTED_RESULTS src/c/expected_results/) set(TEST_ABS_TOLERANCE 1e-12) set(TEST_REL_TOLERANCE 1e-12)

then the test framework fails because of conflicting targets.

hsorby commented 6 years ago

The way to write this would be:

laplace_equation.cmake containing

set(TEST_GIT_REPO /data/OpenCMISS/examples/laplace_equation) set(TEST_BRANCH develop) set(TEST_TARGETS laplace_equation_Fortran laplace_equation_C) set(TEST_EXPECTED_RESULTS src/fortran/expected_results/ src/c/expected_results/) set(TEST_ABS_TOLERANCE 1e-12) set(TEST_REL_TOLERANCE 1e-12)

set(TEST_GIT_REPO /data/OpenCMISS/examples/laplace_equation) set(TEST_BRANCH develop) set(PYTEST_TARGETS src/python/laplace_equation.py) set(PYTEST_EXPECTED_RESULTS src/python/expected_results/) set(PYTEST_ABS_TOLERANCE 1e-12) set(PYTEST_REL_TOLERANCE 1e-12)