Skip to content

Commit 3840082

Browse files
committed
[FIX][NFC] Fix a test case in clang/SymbolGraph
The clang/SymbolGraph/global_record.c test case explicitly diffs the clang version in use, which causes failures. Fix the issue by normalize the `generator` field before checking the output.
1 parent 4a3460a commit 3840082

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/test/SymbolGraph/global_record.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
// RUN: %t/reference.output.json
55
// RUN: %clang -extract-api -target arm64-apple-macosx \
66
// RUN: %t/input.c -o %t/output.json | FileCheck -allow-empty %s
7-
// RUN: sed -e "s@\"generator\": \"clang.*\"@\"generator\": \"clang\"@g" \
7+
8+
// Generator version is not consistent across test runs, normalize it.
9+
// RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
810
// RUN: %t/output.json >> %t/output-normalized.json
911
// RUN: diff %t/reference.output.json %t/output-normalized.json
1012

@@ -32,7 +34,7 @@ char unavailable __attribute__((unavailable));
3234
"minor": 5,
3335
"patch": 3
3436
},
35-
"generator": "clang"
37+
"generator": "?"
3638
},
3739
"module": {
3840
"name": "",

0 commit comments

Comments
 (0)