-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and refactor tests #79
Fix and refactor tests #79
Conversation
Previously, the test scripts have been executed from a rewritten version, which used `sed` to adjust binary paths. Not only have the tests passed despite the scripts not being created correctly, this mechanism was also cumbersome and intransparent. This refactoring now uses the original test scripts from the source tree. When building/testing with `cmake`/`ctest`, the (absolute) paths to executables are being taken from the environment, which is set in CMake via the new `declare_test_executable()` function. When executing tests from `make check` (or for manual execution), the current dir is used. Which is fine, if executed from the cmake build dir. The path to the files containing the expected data is passed as parameter now. Furthermore, some optimisations have been done in the bash scripts. Output files of the test execution are not deleted anymore, which should be OK, if executed in the build directory. EG_DATA is now also being passed as parameter. Refactor and add contrib test also, although not clear how this is connected and how this adds value to contrib...
Test `test1` has not been executed in CI, so I guess a change in the data set just went unnoticed.
@flederwiesel
|
There now is flederwiesel#1 to fix the distribution. Note, that it was wrong anyway (only one of the three *.out files was distributed). Let me know if you need a PR for this one in master. |
I believe that all files in tests/shape_eg_data/ also need to be part of the distribution to make the test1.sh passing. |
@thbeu Not sure if you want to pursue this, but maybe create a new PR then ? |
OK, there now is #110 which superseds this PR. |
Fix test execution by complete refactoring.
Previously, the test scripts have been executed from a rewritten version, which
used
sed
to adjust binary paths. Not only have the tests passed despite thescripts not being created correctly, this mechanism was also cumbersome and
intransparent.
This refactoring now uses the original test scripts from the source tree.
When building/testing with
cmake
/ctest
, the (absolute) paths to executablesare being taken from the environment, which is set in CMake via the new
declare_test_executable()
function.When executing tests from
make check
(or for manual execution), the currentdir is used. Which is fine, if executed from the cmake build dir.
The path to the files containing the expected data is passed as parameter now.
Furthermore, some optimisations have been done in the bash scripts. Output files
of the test execution are not deleted anymore, which should be OK, if executed
in the build directory. EG_DATA is now also being passed as parameter.
Refactor and add contrib test also, although not clear how this is connected
and how this adds value to contrib...