Skip to content

fix: strip script output before logged JSON#113

Merged
ascorbic merged 1 commit intomainfrom
strip-delimiters
Apr 15, 2024
Merged

fix: strip script output before logged JSON#113
ascorbic merged 1 commit intomainfrom
strip-delimiters

Conversation

@ascorbic
Copy link
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The bcd tests now test console.dir, which causes them to log output as part of the test. This is causing the generated JSON to break and tests to fail, because currently we just naively write the script output to a JSON file. With this PR I've added a shell script that uses sed to strip anything from before a RUNTIME_DATA_START delimiter, menaing that anything printed during the test run itself is ignored.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@queengooborg
Copy link
Collaborator

Good catch, thanks!

Do we perhaps want to have the runner script itself write the file rather than piping logging output to save a step? LGTM though!

@ascorbic ascorbic merged commit 03daa95 into main Apr 15, 2024
@queengooborg queengooborg deleted the strip-delimiters branch April 15, 2024 19:42
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