From 3840082ab509490f16766cd8c155a1cf4b606fec Mon Sep 17 00:00:00 2001 From: Zixu Wang Date: Wed, 16 Mar 2022 17:19:35 -0700 Subject: [PATCH] [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. --- clang/test/SymbolGraph/global_record.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/test/SymbolGraph/global_record.c b/clang/test/SymbolGraph/global_record.c index ba4bf96..fa577ee 100644 --- a/clang/test/SymbolGraph/global_record.c +++ b/clang/test/SymbolGraph/global_record.c @@ -4,7 +4,9 @@ // RUN: %t/reference.output.json // RUN: %clang -extract-api -target arm64-apple-macosx \ // RUN: %t/input.c -o %t/output.json | FileCheck -allow-empty %s -// RUN: sed -e "s@\"generator\": \"clang.*\"@\"generator\": \"clang\"@g" \ + +// Generator version is not consistent across test runs, normalize it. +// RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \ // RUN: %t/output.json >> %t/output-normalized.json // RUN: diff %t/reference.output.json %t/output-normalized.json @@ -32,7 +34,7 @@ char unavailable __attribute__((unavailable)); "minor": 5, "patch": 3 }, - "generator": "clang" + "generator": "?" }, "module": { "name": "", -- 2.7.4