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

Running a single unit tests with reports #4547

Closed
dangershony opened this issue May 20, 2021 · 4 comments
Closed

Running a single unit tests with reports #4547

dangershony opened this issue May 20, 2021 · 4 comments

Comments

@dangershony
Copy link

Hi devs,
Not so much a c++ dev here, I am tying to run a single tests with not much luck.
I want to execute the run-commit_tx (to examine its output reports) from the logs I understand I should do make check-units -k run-commit_tx but no luck, some help please?

@cdecker
Copy link
Member

cdecker commented May 20, 2021

No problem, there are two steps here: a) compile the binary that contains the tests, and b) run the binary. The following will get you going:

make channeld/test/run-commit_tx  # Full path of the binary from the repo root
channeld/test/run-commit_tx  # Run it as a binary
echo $?  # Print the return code to determine if we are ok or have an error

Depending on which test you're running this might give more or less context, but the test will return ok (return code 0) if all tests passed, or error (return code other than 0) if something went wrong.

@cdecker cdecker self-assigned this May 20, 2021
@dangershony
Copy link
Author

Thanks I will eave this issue open a bit longer in case I have more questions

@dangershony
Copy link
Author

Hi quick question I noticed there are not tests for option_anchor_outputs = true did I miss them?

@cdecker
Copy link
Member

cdecker commented May 30, 2021

The option_anchor_outputs option is guarded by the --enable-developer configure flag, and specific tests will be skipped if not configured to enable them.

However the anchor outputs option may not have their own tests because they get extensively tested as part of the other tests (they are involved in every channel that is created in any tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants