OSDN Git Service

llvm-isel-fuzzer: Add some basic tests
authorJustin Bogner <mail@justinbogner.com>
Sun, 3 Sep 2017 00:37:39 +0000 (00:37 +0000)
committerJustin Bogner <mail@justinbogner.com>
Sun, 3 Sep 2017 00:37:39 +0000 (00:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312427 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg
test/tools/llvm-isel-fuzzer/aarch64-empty-bc.ll [new file with mode: 0644]
test/tools/llvm-isel-fuzzer/aarch64-empty.ll [new file with mode: 0644]
test/tools/llvm-isel-fuzzer/missing-triple.ll [new file with mode: 0644]
test/tools/llvm-isel-fuzzer/x86-empty-bc.ll [new file with mode: 0644]
test/tools/llvm-isel-fuzzer/x86-empty.ll [new file with mode: 0644]

index cc27705..7d298f6 100644 (file)
@@ -294,6 +294,7 @@ for pattern in [r"\bbugpoint\b(?!-)",
                 r"\bllvm-dsymutil\b",
                 r"\bllvm-dwarfdump\b",
                 r"\bllvm-extract\b",
+                r"\bllvm-isel-fuzzer\b",
                 r"\bllvm-lib\b",
                 r"\bllvm-link\b",
                 r"\bllvm-lto\b",
diff --git a/test/tools/llvm-isel-fuzzer/aarch64-empty-bc.ll b/test/tools/llvm-isel-fuzzer/aarch64-empty-bc.ll
new file mode 100644 (file)
index 0000000..1871199
--- /dev/null
@@ -0,0 +1,6 @@
+; REQUIRES: aarch64-registered-target
+
+; RUN: opt -o %t %s
+; RUN: llvm-isel-fuzzer %t -ignore_remaining_args=1 -mtriple aarch64 2>&1 | FileCheck %s
+
+; CHECK: Running
diff --git a/test/tools/llvm-isel-fuzzer/aarch64-empty.ll b/test/tools/llvm-isel-fuzzer/aarch64-empty.ll
new file mode 100644 (file)
index 0000000..9d8c891
--- /dev/null
@@ -0,0 +1,6 @@
+; REQUIRES: aarch64-registered-target
+
+; RUN: echo > %t
+; RUN: llvm-isel-fuzzer %t -ignore_remaining_args=1 -mtriple aarch64 2>&1 | FileCheck %s
+
+; CHECK: Running
diff --git a/test/tools/llvm-isel-fuzzer/missing-triple.ll b/test/tools/llvm-isel-fuzzer/missing-triple.ll
new file mode 100644 (file)
index 0000000..558d77f
--- /dev/null
@@ -0,0 +1,4 @@
+; RUN: opt -o %t %s
+; RUN: not llvm-isel-fuzzer %t 2>&1 | FileCheck %s
+
+; CHECK: -mtriple must be specified
diff --git a/test/tools/llvm-isel-fuzzer/x86-empty-bc.ll b/test/tools/llvm-isel-fuzzer/x86-empty-bc.ll
new file mode 100644 (file)
index 0000000..d6d2b7f
--- /dev/null
@@ -0,0 +1,6 @@
+; REQUIRES: x86-registered-target
+
+; RUN: opt -o %t %s
+; RUN: llvm-isel-fuzzer %t -ignore_remaining_args=1 -mtriple x86_64 2>&1 | FileCheck %s
+
+; CHECK: Running
diff --git a/test/tools/llvm-isel-fuzzer/x86-empty.ll b/test/tools/llvm-isel-fuzzer/x86-empty.ll
new file mode 100644 (file)
index 0000000..35833e2
--- /dev/null
@@ -0,0 +1,6 @@
+; REQUIRES: x86-registered-target
+
+; RUN: echo > %t
+; RUN: llvm-isel-fuzzer %t -ignore_remaining_args=1 -mtriple x86_64 2>&1 | FileCheck %s
+
+; CHECK: Running