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

test: correctly make test-output.xml paths relative in windows #3620

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

yangannyx
Copy link
Contributor

@yangannyx yangannyx commented Jun 6, 2024

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
This PR aims to improve CircleCI parallelization by ensuring that past timings are detectable. The previous sed script was failing on Windows due to discrepancies over the use of backward and forward slash in directory addresses.

Testing
Tested that running the new script for making test paths relative works on a test xml file generated locally using CI=1 yarn test --suite="slow". Verified relative paths were successfully generated on both mac and windows machines.

Windows generated test_output.xml

  <testsuite name="init" timestamp="2024-06-06T22:58:55" tests="6" file="C:\Users\AnnyYang\code\forge\packages\api\core\test\slow\api_spec_slow.ts" time="0.000" failures="0">

test_output.xml after running preview sed

  <testsuite name="init" timestamp="2024-06-06T22:58:55" tests="6" file="C:\Users\AnnyYang\code\forge\packages\api\core\test\slow\api_spec_slow.ts" time="0.000" failures="0">

test_output.xml after running current sed

  <testsuite name="init" timestamp="2024-06-06T22:58:55" tests="6" file="packages\api\core\test\slow\api_spec_slow.ts" time="0.000" failures="0">

@yangannyx yangannyx requested a review from a team as a code owner June 6, 2024 23:54
@yangannyx yangannyx force-pushed the circle-ci-fix-windows-relative-paths branch from a047595 to 6d6e028 Compare June 7, 2024 00:45
Copy link
Member

@BlackHole1 BlackHole1 left a comment

Choose a reason for hiding this comment

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

LGTM

@yangannyx
Copy link
Contributor Author

yangannyx commented Jun 7, 2024

This LGTM

Commit 1: timings not detected because previous CI runs have incorrect path
Commit 2: timing not detected bc commit 1 had a bug with the sed command
Commit 3: timings detected from commit 2

@erickzhao erickzhao changed the title fix: correctly makes test-output.xml paths relative in windows Jun 7, 2024
@erickzhao erickzhao merged commit 38f64e4 into main Jun 7, 2024
13 checks passed
@erickzhao erickzhao deleted the circle-ci-fix-windows-relative-paths branch June 7, 2024 18:04
@yangannyx yangannyx mentioned this pull request Jun 11, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants