[PATCH] D157817: [clang] Fix ClangScanDeps test for #61006.

Ingo Müller via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 13 11:23:45 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1800038fba42: [clang] Fix ClangScanDeps test for #61006. (authored by ingomueller-net).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157817/new/

https://reviews.llvm.org/D157817

Files:
  clang/test/ClangScanDeps/pr61006.cppm


Index: clang/test/ClangScanDeps/pr61006.cppm
===================================================================
--- clang/test/ClangScanDeps/pr61006.cppm
+++ clang/test/ClangScanDeps/pr61006.cppm
@@ -6,10 +6,10 @@
 // RUN: mkdir -p %t
 // RUN: split-file %s %t
 //
-// RUN: EXPECTED_RESOURCE_DIR=`%clang -print-resource-dir`
-// RUN: ln -s %clang++ %t/clang++
-// RUN: sed "s|EXPECTED_RESOURCE_DIR|$EXPECTED_RESOURCE_DIR|g; s|DIR|%/t|g" %t/P1689.json.in > %t/P1689.json
-// RUN: clang-scan-deps -compilation-database %t/P1689.json -format=p1689 | FileCheck %t/a.cpp -DPREFIX=%/t
+// RUN: EXPECTED_RESOURCE_DIR=`%clang -print-resource-dir` && \
+// RUN: ln -s %clang++ %t/clang++ && \
+// RUN: sed "s|EXPECTED_RESOURCE_DIR|$EXPECTED_RESOURCE_DIR|g; s|DIR|%/t|g" %t/P1689.json.in > %t/P1689.json && \
+// RUN: clang-scan-deps -compilation-database %t/P1689.json -format=p1689 | FileCheck %t/a.cpp -DPREFIX=%/t && \
 // RUN: clang-scan-deps -format=p1689 \
 // RUN:   -- %t/clang++ -std=c++20 -c -fprebuilt-module-path=%t %t/a.cpp -o %t/a.o \
 // RUN:      -resource-dir $EXPECTED_RESOURCE_DIR | FileCheck %t/a.cpp -DPREFIX=%/t
@@ -25,7 +25,7 @@
 ]
 
 //--- a.cpp
-#include <stddef.h>
+#include "a.h"
 import b;
 
 // CHECK: {
@@ -42,3 +42,5 @@
 // CHECK-NEXT:   ],
 // CHECK-NEXT:   "version": 1
 // CHECK-NEXT: }
+
+//--- a.h


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157817.549731.patch
Type: text/x-patch
Size: 1326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230813/f9366640/attachment.bin>


More information about the cfe-commits mailing list