mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

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`
12 lines
365 B
C
12 lines
365 B
C
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: echo '#include "not_real.h"' > %t/include_not_real.h
|
|
// 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 -fsyntax-only %s
|
|
|
|
#include "include_not_real.h"
|
|
|
|
void foo() {
|
|
bar();
|
|
}
|