Skip to content

[#362] Clean up generated log files in testDebugLogFiles unit test - #363

Closed
Labreo wants to merge 1 commit into
PecanProject:masterfrom
Labreo:358-clean-up-debug-logs-unit-test
Closed

[#362] Clean up generated log files in testDebugLogFiles unit test#363
Labreo wants to merge 1 commit into
PecanProject:masterfrom
Labreo:358-clean-up-debug-logs-unit-test

Conversation

@Labreo

@Labreo Labreo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • What: Added cleanup step to testDebugLogFiles.c to delete the temporary generated log files on successful test completion.
  • Motivation: Running unit tests currently leaves untracked generated logs (debug_logs/ and debug_log_test.log) in tests/smoke/russell_1/, causing the git working tree to become dirty.

How was this change tested?

Ran make test locally, verified that all tests passed, and confirmed that git status reports no untracked files afterwards.

Reproduction steps

  1. Run make test on master branch -> git status shows untracked log files.
  2. Apply changes and run make test -> git status remains clean.

Related issues

Checklist

  • Related issues are listed above. PRs without an approved, related issue may not get reviewed.
  • PR title has the issue number in it ("[#] <concise description of proposed change>")
  • Tests added/updated for new features (if applicable)
  • Documentation updated (if applicable)
  • docs/CHANGELOG.md updated with noteworthy changes
  • Code formatted with clang-format (run git clang-format if needed)

Copilot AI lite review requested due to automatic review settings August 6, 2026 07:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a test hygiene issue in the SIPNET unit test suite by ensuring the testDebugLogFiles test no longer leaves behind untracked debug log artifacts in tests/smoke/russell_1/, keeping the working tree clean after running make test.

Changes:

  • Add a post-success cleanup step to remove debug_logs/ and debug_log_test.log generated by testDebugLogFiles.
  • Add a corresponding “Fixed” entry in docs/CHANGELOG.md to document the change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/sipnet/test_sipnet_infrastructure/testDebugLogFiles.c Removes generated debug log artifacts after a successful test run to avoid dirty working trees.
docs/CHANGELOG.md Documents the fix in the Unreleased “Fixed” section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/CHANGELOG.md

### Fixed

- Fix testDebugLogFiles unit test leaving untracked log files in workspace after execution (#358)
Comment on lines +136 to +139
if (status == 0) {
runShell("cd " TEST_WORK_DIR
" && rm -rf debug_logs && rm -f debug_log_test.log");
}
@Alomir

Alomir commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

@Labreo Thanks for your contributions! As I mentioned in the associated ticket, this issue will be fixed in #359 in addition to other changes to this test. As the other changes are more extensive, I'm going to close this PR.

@Alomir Alomir closed this Aug 6, 2026
@Alomir

Alomir commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

I'm truly sorry about the duplicated effort - to reduce the chances for this in the future, please ask for tickets to be assigned before starting work, which gives us a chance to figure out if the work is being done elsewhere.

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.

[BUG] testDebugLogFiles unit test leaves untracked debug log files in workspace

3 participants