OpenCMISS / functional_test_framework

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

Input file information not getting cleared. #12

Open hsorby opened 6 years ago

hsorby commented 6 years ago

The information for input files is not getting cleared after a test specifying at least one input. This can cause an issue for future tests that have optional arguments.

lorenzo-mechbau commented 6 years ago

Yes, adding a line in a test description like set(TEST_TARGETS_ARGS "5") causes the next tests to fail (because the argument is still somehow affecting them).

hsorby commented 6 years ago

I have a feeling that I have addressed this, I will check what I have done with the changes to fix this problem.

Do you have a the full example test file so I can check what you are running.

lorenzo-mechbau commented 6 years ago

Sorry, I missed the reply! But I'm running into the issue today again, so:

Running the examples in the folder attached with the current develop version of iron, as (accordingly modifying the paths): cmake -DOpenCMISSLibs_DIR=~/software/opencmiss/opencmiss/install -DTEST_DB=~/Desktop/functional_tests/my_testing_select/ ../functional_test_framework make

"cantilever" passes, but fails uncommenting set(TEST_TARGETS_ARGS "2|3|2|1") in functional_tests/my_testing_select/laplace_equation.cmake (Laplace fails anyway)

Thanks!

functional_tests.tar.gz

lorenzo-mechbau commented 6 years ago

Adding the line below to every test that does not need arguments set(TEST_TARGETS_ARGS " ") seems to be a (temporary?) fix.

lorenzo-mechbau commented 6 years ago

Actually I run into an error (at laplace_equation) if the line above has a blank space between the quotes (" "): [ 81%] Completed 'ndiff' [100%] Built target ndiff CMake Error at CMakeLists.txt:102 (list): list index: 1 out of range (-1, 0)

-- Configuring incomplete, errors occurred! See also "/data/homes/zanon/Desktop/functional_tests/functional_test_framework-build/testsetup-build/CMakeFiles/CMakeOutput.log". CMakeFiles/setup_tests.dir/build.make:57: recipe for target 'CMakeFiles/setup_tests' failed make[2]: [CMakeFiles/setup_tests] Error 1 CMakeFiles/Makefile2:275: recipe for target 'CMakeFiles/setup_tests.dir/all' failed make[1]: [CMakeFiles/setup_tests.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Without much investigation, my fix is to use as empty argument line: set(TEST_TARGETS_ARGS "") for Fortran and C, and set(PYTEST_TARGETS_ARGS " ") for python (with the blank space).