[clang] 49e1753 - Mark baremetal.cpp test as unsupported on Windows.

Kristof Beyls via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 22 03:50:08 PDT 2021


Author: Kristof Beyls
Date: 2021-10-22T11:46:50+01:00
New Revision: 49e1753c5ef9dbedfca890992cd25a70e2cbb470

URL: https://github.com/llvm/llvm-project/commit/49e1753c5ef9dbedfca890992cd25a70e2cbb470
DIFF: https://github.com/llvm/llvm-project/commit/49e1753c5ef9dbedfca890992cd25a70e2cbb470.diff

LOG: Mark baremetal.cpp test as unsupported on Windows.

A new check was added in 3b93dc68, which seems to not be possible to get
working correctly on windows systems:

The test first "captures" the install directory of the clang toolchain
running the test as follows:
// CHECK-AARCH64-NO-HOST-INC: InstalledDir: [[INSTALLEDDIR:.+]]
Then, in a check line a bit later, it uses this to check if a particular
directory in the toolchain installation directory is included when
targeting aarch64-none-elf:
// CHECK-AARCH64-NO-HOST-INC-SAME: "-internal-isystem" "[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}aarch64-none-elf{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"

Even though the test aims to take into account forward vs backward slash
differences between Windows and Unix paths, it still fails on Windows.

It seems that on Windows (this is based on the output log from a Windows
bot), the INSTALLEDDIR variable has the following value:

note: with "INSTALLEDDIR" equal to "c:\\\\b\\\\slave\\\\clang-x64-windows-msvc\\\\build\\\\stage1\\\\bin"

However the actual "InstalledDir:" output produced by the clang
toolchain on that Windows bot was:

InstalledDir: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin

It is unclear where the explosion of backslashes happens. Maybe this is
a bug in FileCheck somewhere?
Anyway, marking this test as not supported on Windows to make the bots
green again.

Added: 
    

Modified: 
    clang/test/Driver/baremetal.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/baremetal.cpp b/clang/test/Driver/baremetal.cpp
index 131f2f76e1f6..7c11fe67155a 100644
--- a/clang/test/Driver/baremetal.cpp
+++ b/clang/test/Driver/baremetal.cpp
@@ -1,3 +1,5 @@
+// UNSUPPORTED: system-windows
+
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
 // RUN:     -target armv6m-none-eabi \
 // RUN:     -T semihosted.lds \


        


More information about the cfe-commits mailing list