Skip to content
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 (follow-up) #110

Merged
merged 9 commits into from
Mar 9, 2024

Conversation

thbeu
Copy link
Contributor

@thbeu thbeu commented Mar 9, 2024

Continue #79,

TODO

  • make distcheck

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.
@thbeu thbeu mentioned this pull request Mar 9, 2024
@thbeu thbeu marked this pull request as draft March 9, 2024 12:50
@thbeu
Copy link
Contributor Author

thbeu commented Mar 9, 2024

make distcheck succeeds with these warnings

libtool: warning: remember to run 'libtool --finish /cygdrive/c/Projekte/shapelib/shapelib-1.6.0/_inst/lib'
libtool: warning: '../libshp.la' has not been installed in '/cygdrive/c/Projekte/shapelib/shapelib-1.6.0/_inst/lib'

@thbeu thbeu marked this pull request as ready for review March 9, 2024 13:45
@rouault
Copy link
Member

rouault commented Mar 9, 2024

@thbeu Would you mind adding a make distcheck as an extra step in .github/workflows/main.yml ?

@thbeu
Copy link
Contributor Author

thbeu commented Mar 9, 2024

Done. Just 14 s more for this step.

@rouault rouault merged commit 5fecb1f into OSGeo:master Mar 9, 2024
4 checks passed
@thbeu thbeu deleted the fix-and-refactor-tests branch March 9, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants