-
Notifications
You must be signed in to change notification settings - Fork 31
Fix Cobertura XML DTD compliance + add path normalization #58
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
base: main
Are you sure you want to change the base?
Fix Cobertura XML DTD compliance + add path normalization #58
Conversation
|
Hi Bartosz, thanks for your contribution. Quite a bit to digest :-) |
|
@a7ex take your time :) |
a7ex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terrific work, Bartosz, thank you. I struggled y bit with the Python unit tests, but that's just me being a swift head. As I understand that is a standard test and that is of course smart.
| - name: Test Individual File Validation | ||
| run: | | ||
| echo "🔍 Testing individual file validation..." | ||
| # Generate a test XML file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no .build/release/...
The built product is in:
.build/apple/Products/Release/$productName
| swift build -c release --disable-sandbox --arch arm64 --arch x86_64 | ||
| # Verify binary was created | ||
| if [[ ! -f .build/release/xcresultparser ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no .build/release/xcresultparser
The built product is in:
.build/apple/Products/Release/xcresultparser
| fi | ||
| echo "✅ Binary built successfully" | ||
| .build/release/xcresultparser --version || echo "Binary version check completed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
| # Test --coverage-base-path flag | ||
| echo "Testing --coverage-base-path flag..." | ||
| .build/release/xcresultparser Tests/XcresultparserTests/TestAssets/test.xcresult \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
| # Test --sources-root flag | ||
| echo "Testing --sources-root flag..." | ||
| .build/release/xcresultparser Tests/XcresultparserTests/TestAssets/test.xcresult \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong path
| # Test backward compatibility with -p flag | ||
| echo "Testing backward compatibility (-p flag)..." | ||
| .build/release/xcresultparser Tests/XcresultparserTests/TestAssets/test.xcresult \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just pretend I made a comment everywhere, where you used ".build/release/xcresultparser"
After building on my machine, there is not symlink to ".build/apple/Products/Release/" we will need to figure out the correct build path here.
This PR fixes Cobertura XML output so it’s valid against the official
coverage-04.dtdand adds CLI flags for easier path handling in CI/CD environments.My last PR missed a few marks and I decided to spent my time making
xcresultparsercompliant with latest Cobertura DTD standard :)Too bad that Apple doesn't give the official support for it but I believe I managed to bridge that gap with the help from Claude 4 Sonnet.
The test workflows behave like "e2e" tests. Went with Python instead of XCTests or Swift Testing to let external tool run
xcresultparserand validate its output.TODO
Fixes
xcresultparser 1.9.30(not tracked)New CLI Flags
Example
Before ❌
After ✅
Testing
Notes
I've also tested it locally with my project to see if DataDog CLI likes it:
