[llvm] [AMDGPU][test]added remove duplicate options for update_mc_test_check script (PR #111769)
Brox Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 14:58:13 PDT 2024
================
@@ -118,6 +119,19 @@ def main():
default=None,
help="Set a default -march for when neither triple nor arch are found in a RUN line",
)
+ parser.add_argument(
+ "--remove-duplicate",
+ action="store_true",
+ default=False,
+ help="remove duplicated test line if found",
+ )
+ parser.add_argument(
+ "--sort",
+ action="store_true",
+ default=False,
+ help="sort testline in alphabetic order (keep run-lines on top), this option could be dangerous as it"
+ "could change the order of lines that are not expected",
----------------
broxigarchen wrote:
The sorting is not very smart to handle all cases, and there are cases that might suprise the user, for example, the --sort and --remove-duplicate used at same time:
```
testlineA
//comment 1
testlineA
//commet 2
```
after remove-duplicate it become
```
testlineA
//comment 1
//commet 2
```
and then sort, `comment2` will be moved to other places which seems coming out of no where.
https://github.com/llvm/llvm-project/pull/111769
More information about the llvm-commits
mailing list