mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-23 07:52:06 +00:00
327894859c
Jenkins sometimes starts a new working directory by appending @2 (or incrementing the number if the @n suffix is already there). This causes several clang tests to fail as: s@INPUT_DIR@%/S/Inputs@g gets expanded to the invalid: s@INPUT_DIR@/path/to/workdir@2/Inputs@g ~~~~~~~~~~ where the part marked with ~'s is interpreted as the flags. These are invalid and the test fails. Previous fixes simply exchanged the @ character for another like | but that's just moving the problem. Address it by adding an expansion that escapes the @ character we're using as a delimiter as well as other magic characters in the replacement of sed's s@@@. There's still room for expansions to cause trouble though. One I ran into while testing this was that having a directory called foo@bar causes lots of `CHECK-NOT: foo` directives to match. There's also things like directories containing `\1`
7 lines
257 B
C
7 lines
257 B
C
// RUN: sed -e "s@INPUT_DIR@%{/S:regex_replacement}/Inputs@g" -e "s@OUT_DIR@%{/t:regex_replacement}@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
|
|
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -include "not_real.h" -fsyntax-only %s
|
|
|
|
void foo() {
|
|
bar();
|
|
}
|