-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm][llvm-lit] Add option to create unique result file names if results already exist #112729
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f212fda
[llvm][llvm-lit] Add a base class for reports that are written to files
DavidSpickett 26f5f34
[llvm][llvm-lit] Add option to create unique result file names if res…
DavidSpickett 117636b
don't need to recurse rm
DavidSpickett 6a54a5a
give an example in the help
DavidSpickett 66c0c67
cleanup test
DavidSpickett 8ee1c44
Refactor file opening
DavidSpickett a202ecd
newline at EOF
DavidSpickett a9f802d
use templfile instead of incrementing number
DavidSpickett cefa577
example in help
DavidSpickett b2796c7
typo fix
DavidSpickett 020f9a4
precheck that there are only 2 xml files
DavidSpickett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Check that lit will not overwrite existing result files when given | ||
## --use-unique-output-file-name. | ||
|
||
## Files are overwritten without the option. | ||
# RUN: rm -f %t.xunit*.xml | ||
# RUN: echo "test" > %t.xunit.xml | ||
# RUN: not %{lit} --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output | ||
# RUN: FileCheck < %t.xunit.xml %s --check-prefix=NEW | ||
# NEW: <?xml version="1.0" encoding="UTF-8"?> | ||
# NEW-NEXT: <testsuites time="{{[0-9.]+}}"> | ||
## (other tests will check the contents of the whole file) | ||
|
||
# RUN: rm -f %t.xunit*.xml | ||
# RUN: echo "test" > %t.xunit.xml | ||
## Files should not be overwritten with the option. | ||
# RUN: not %{lit} --xunit-xml-output %t.xunit.xml --use-unique-output-file-name %{inputs}/xunit-output | ||
# RUN: FileCheck < %t.xunit.xml %s --check-prefix=EXISTING | ||
# EXISTING: test | ||
## Results in a new file with some discriminator added. | ||
# RUN: ls -l %t.xunit*.xml | wc -l | FileCheck %s --check-prefix=NUMFILES | ||
# NUMFILES: 2 | ||
# RUN: FileCheck < %t.xunit.*.xml %s --check-prefix=NEW | ||
DavidSpickett marked this conversation as resolved.
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.