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

Tests fix #14

Merged
merged 6 commits into from
Jan 1, 2024
Merged

Tests fix #14

merged 6 commits into from
Jan 1, 2024

Conversation

baktrius
Copy link
Owner

  • Extend test script with option to specify which tests to run allowing creation of bundles of tests (with directories)
  • Move all test from tests/ directory to tests/basic to create space for students tests
  • Fix all tests to not depend on mimpirun return code propagation

Add:

- `examples/test.h`:
  Header library which provide helper utilities
  to mark test as succeed or failed.
- `run_test`
  Helper script which detects whether any
  worker failed on test_assert (function from `test.h`)
  or haven't call test_success before exit

Those utilities combined helps write
reliable tests which don't depends on mimpirun propagating
errors from workers
Update tests to facilitate new testing utilities
which don't rely on mimpirun return code.
Change `test` to only run tests specified by positional arguments
if any are present.
In case no arguments are passed `test` nearly behavior is unchanged.
Improve `test` script to traverses directories recursively if given ones.
@baktrius baktrius requested a review from wprzytula December 31, 2023 10:26
run_test Outdated
result=0

# Check if all workers finished sucessfully
# - num of <<success>> is equeal to number of created workers
Copy link
Collaborator

Choose a reason for hiding this comment

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

equal*

run_test Outdated
# Remove temporary file
rm "$tmp_file"

# Exit with appropraite return code
Copy link
Collaborator

Choose a reason for hiding this comment

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

appropriate

@baktrius baktrius merged commit 7440df1 into main Jan 1, 2024
@baktrius baktrius deleted the tests-fix branch January 1, 2024 20:15
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.

2 participants