Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Sep 5, 2020

Description of proposed changes

As mentioned in #3949, there are three gmtest scripts in three different directories. This PR makes some changes to test/gmtest.in so that it can be used to run all tests. Thus, we don't have to maintain the gmtest scripts in the doc/examples and doc/scripts directories.

Some important changes after this PR:

  1. We now use the path relative to the GMT root directory as the test names. For example, GMT_autolegend.shbecomesdoc/scripts/GMT_autolegend.sh; ex01/ex01.shbecomesdoc/examples/ex01/ex01.sh, and blockmean/etest.shbecomestest/blockmean/etest.sh`.
  2. There were three fail_count.txt files. Now there is only one, in the build/test directory.

With the more consistent test naming, now it's possible to run three groups of tests separately:

  • ctest -R doc/example to only run the examples
  • ctest -R doc/scripts to run the scripts used in the documentation
  • ctest -R test/ to run all the "real" tests
  • ctest -R test/api to run api tests only

Fixes #3949.

Eliminate the "duplicated" gmtest scripts in doc/examples and
doc/gmtest.

Now all tests are executed by calling test/gmtest script.
@seisman seisman changed the title Use one gmtest to run all different kinds of tests Use one gmtest script to run all different kinds of tests Sep 5, 2020
Copy link
Member

@PaulWessel PaulWessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification!

@seisman seisman merged commit 0ee828d into master Sep 5, 2020
@seisman seisman deleted the improve-test branch September 5, 2020 18:37
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.

Improve the gmtest script

3 participants