[PATCH] D49482: Haiku: add a test for haiku driver
Alexander von Gluck IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 30 07:43:22 PST 2021
kallisti5 updated this revision to Diff 396674.
kallisti5 added a comment.
Herald added subscribers: luke957, s.egerton, simoncook.
Herald added a project: clang.
I've reworked these tests to be a lot more in-depth. Both c and c++ are passing. I plan on trying to get more of our clang / llvm patches upstream.. so this is the first step.
./bin/llvm-lit -asvv ../clang/test/Driver/haiku.c
llvm-lit: /home/kallisti5/Code/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: using clang: /home/kallisti5/Code/llvm-project/build/bin/clang
PASS: Clang :: Driver/haiku.c (1 of 1)
Script:
--
: 'RUN: at line 1'; /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target x86_64-unknown-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86_64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
: 'RUN: at line 4'; /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target i586-pc-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
: 'RUN: at line 7'; /home/kallisti5/Code/llvm-project/build/bin/clang -no-canonical-prefixes -target riscv64-unknown-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c -### 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-RV64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.c
--
Exit Code: 0
********************
Testing Time: 0.07s
Passed: 1
./bin/llvm-lit -asvv ../clang/test/Driver/haiku.cpp
llvm-lit: /home/kallisti5/Code/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: using clang: /home/kallisti5/Code/llvm-project/build/bin/clang
PASS: Clang :: Driver/haiku.cpp (1 of 1)
Script:
--
: 'RUN: at line 1'; /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target i586-pc-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
: 'RUN: at line 4'; /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target x86_64-unknown-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-X86_64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
: 'RUN: at line 7'; /home/kallisti5/Code/llvm-project/build/bin/clang --driver-mode=g++ -no-canonical-prefixes -target riscv64-unknown-haiku --sysroot=/home/kallisti5/Code/llvm-project/clang/test/Driver/Inputs/basic_haiku_tree /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp -### -stdlib=platform 2>&1 | /home/kallisti5/Code/llvm-project/build/bin/FileCheck --check-prefixes=CHECK,CHECK-RV64 /home/kallisti5/Code/llvm-project/clang/test/Driver/haiku.cpp
--
Exit Code: 0
********************
Testing Time: 0.06s
Passed: 1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D49482/new/
https://reviews.llvm.org/D49482
Files:
clang/test/Driver/Inputs/basic_haiku_tree/boot/system/develop/headers/.keep
clang/test/Driver/Inputs/basic_haiku_tree/boot/system/develop/lib/crti.o
clang/test/Driver/Inputs/basic_haiku_tree/boot/system/develop/lib/crtn.o
clang/test/Driver/Inputs/basic_haiku_tree/boot/system/lib/.keep
clang/test/Driver/haiku.c
clang/test/Driver/haiku.cpp
Index: clang/test/Driver/haiku.cpp
===================================================================
--- /dev/null
+++ clang/test/Driver/haiku.cpp
@@ -0,0 +1,19 @@
+// RUN: %clangxx -no-canonical-prefixes -target i586-pc-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### -stdlib=platform 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-X86 %s
+// RUN: %clangxx -no-canonical-prefixes -target x86_64-unknown-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### -stdlib=platform 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-X86_64 %s
+// RUN: %clangxx -no-canonical-prefixes -target riscv64-unknown-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### -stdlib=platform 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-RV64 %s
+
+// CHECK: {{.*}}clang{{[a-zA-Z\-]*}}" "-cc1"
+// CHECK-X86: "-triple" "i586-pc-haiku"
+// CHECK-X86_64: "-triple" "x86_64-unknown-haiku"
+// CHECK-RV64: "-triple" "riscv64-unknown-haiku"
+// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
+
+// CHECK: {{.*}}g++{{[a-zA-Z\-]*}}"
+// CHECK-X86: "-m32"
+// CHECK-X86_64: "-m64"
Index: clang/test/Driver/haiku.c
===================================================================
--- /dev/null
+++ clang/test/Driver/haiku.c
@@ -0,0 +1,18 @@
+// RUN: %clang -no-canonical-prefixes -target x86_64-unknown-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-X86_64 %s
+// RUN: %clang -no-canonical-prefixes -target i586-pc-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-X86 %s
+// RUN: %clang -no-canonical-prefixes -target riscv64-unknown-haiku \
+// RUN: --sysroot=%S/Inputs/basic_haiku_tree %s -### 2>&1 \
+// RUN: | FileCheck --check-prefixes=CHECK,CHECK-RV64 %s
+
+// CHECK: {{.*}}clang{{[a-zA-Z\-]*}}" "-cc1"
+// CHECK-X86: "-triple" "i586-pc-haiku"
+// CHECK-X86_64: "-triple" "x86_64-unknown-haiku"
+// CHECK-RV64: "-triple" "riscv64-unknown-haiku"
+
+// CHECK: {{.*}}gcc{{[a-zA-Z\-]*}}"
+// CHECK-X86: "-m32"
+// CHECK-X86_64: "-m64"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49482.396674.patch
Type: text/x-patch
Size: 2104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211230/3f1e37a1/attachment.bin>
More information about the cfe-commits
mailing list