summaryrefslogtreecommitdiff
path: root/test/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-10 21:47:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-10 21:47:16 +0000
commit6911911e614c1da1957af5518a15c5605657b4e2 (patch)
treefa2f83f1bb63b389504c7487a21cc4f4e31bf6b0 /test/Object
parentf03fb232671b6a7d0deed602a702e25d3305acc9 (diff)
downloadllvm-6911911e614c1da1957af5518a15c5605657b4e2.tar.gz
llvm-6911911e614c1da1957af5518a15c5605657b4e2.tar.bz2
llvm-6911911e614c1da1957af5518a15c5605657b4e2.tar.xz
Move tests from test/Archive to test/Object.
There is no lib/Archive anymore and some archive tests were in test/Archive and others in test/Object. Since archive is just one of the formats supported by lib/Object, test/Object is probably the best location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object')
-rw-r--r--test/Object/Inputs/GNU.abin0 -> 4210 bytes
-rw-r--r--test/Object/Inputs/IsNAN.obin0 -> 2280 bytes
-rw-r--r--test/Object/Inputs/MacOSX.abin0 -> 4166 bytes
-rw-r--r--test/Object/Inputs/SVR4.abin0 -> 4214 bytes
-rw-r--r--test/Object/Inputs/evenlen1
-rw-r--r--test/Object/Inputs/oddlen1
-rw-r--r--test/Object/Inputs/very_long_bytecode_file_name.bcbin0 -> 1465 bytes
-rw-r--r--test/Object/Inputs/xpg4.abin0 -> 4214 bytes
-rw-r--r--test/Object/check_binary_output.ll4
-rw-r--r--test/Object/directory.ll12
-rw-r--r--test/Object/extract.ll16
-rw-r--r--test/Object/toc_GNU.ll8
-rw-r--r--test/Object/toc_MacOSX.ll9
-rw-r--r--test/Object/toc_SVR4.ll9
-rw-r--r--test/Object/toc_xpg4.ll9
15 files changed, 69 insertions, 0 deletions
diff --git a/test/Object/Inputs/GNU.a b/test/Object/Inputs/GNU.a
new file mode 100644
index 0000000000..4c09881eb3
--- /dev/null
+++ b/test/Object/Inputs/GNU.a
Binary files differ
diff --git a/test/Object/Inputs/IsNAN.o b/test/Object/Inputs/IsNAN.o
new file mode 100644
index 0000000000..7b3a12a69d
--- /dev/null
+++ b/test/Object/Inputs/IsNAN.o
Binary files differ
diff --git a/test/Object/Inputs/MacOSX.a b/test/Object/Inputs/MacOSX.a
new file mode 100644
index 0000000000..8ba1e6d30e
--- /dev/null
+++ b/test/Object/Inputs/MacOSX.a
Binary files differ
diff --git a/test/Object/Inputs/SVR4.a b/test/Object/Inputs/SVR4.a
new file mode 100644
index 0000000000..3947813ac6
--- /dev/null
+++ b/test/Object/Inputs/SVR4.a
Binary files differ
diff --git a/test/Object/Inputs/evenlen b/test/Object/Inputs/evenlen
new file mode 100644
index 0000000000..59ee8d552e
--- /dev/null
+++ b/test/Object/Inputs/evenlen
@@ -0,0 +1 @@
+evenlen
diff --git a/test/Object/Inputs/oddlen b/test/Object/Inputs/oddlen
new file mode 100644
index 0000000000..8cf5bd181b
--- /dev/null
+++ b/test/Object/Inputs/oddlen
@@ -0,0 +1 @@
+oddlen
diff --git a/test/Object/Inputs/very_long_bytecode_file_name.bc b/test/Object/Inputs/very_long_bytecode_file_name.bc
new file mode 100644
index 0000000000..f7fce24902
--- /dev/null
+++ b/test/Object/Inputs/very_long_bytecode_file_name.bc
Binary files differ
diff --git a/test/Object/Inputs/xpg4.a b/test/Object/Inputs/xpg4.a
new file mode 100644
index 0000000000..b2bdb51188
--- /dev/null
+++ b/test/Object/Inputs/xpg4.a
Binary files differ
diff --git a/test/Object/check_binary_output.ll b/test/Object/check_binary_output.ll
new file mode 100644
index 0000000000..567f18e65b
--- /dev/null
+++ b/test/Object/check_binary_output.ll
@@ -0,0 +1,4 @@
+; This is not an assembly file, this is just to run the test.
+; The test verifies that llvm-ar produces a binary output.
+
+;RUN: llvm-ar p %p/Inputs/GNU.a very_long_bytecode_file_name.bc | cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
diff --git a/test/Object/directory.ll b/test/Object/directory.ll
new file mode 100644
index 0000000000..336d218fd0
--- /dev/null
+++ b/test/Object/directory.ll
@@ -0,0 +1,12 @@
+;RUN: not llvm-ar r %T/test.a . 2>&1 | FileCheck %s
+;CHECK: . Is a directory
+
+;RUN: rm -f %T/test.a
+;RUN: touch %T/a-very-long-file-name
+;RUN: llvm-ar r %T/test.a %s %T/a-very-long-file-name
+;RUN: llvm-ar r %T/test.a %T/a-very-long-file-name
+;RUN: llvm-ar t %T/test.a | sort | FileCheck -check-prefix=MEMBERS %s
+;MEMBERS-NOT: /
+;MEMBERS: a-very-long-file-name
+;MEMBERS: directory.ll
+;MEMBERS-NOT: a-very-long-file-name
diff --git a/test/Object/extract.ll b/test/Object/extract.ll
new file mode 100644
index 0000000000..ab2bcc624b
--- /dev/null
+++ b/test/Object/extract.ll
@@ -0,0 +1,16 @@
+; This isn't really an assembly file, its just here to run the test.
+
+; This test just makes sure that llvm-ar can extract bytecode members
+; from various style archives.
+
+; RUN: llvm-ar p %p/Inputs/GNU.a very_long_bytecode_file_name.bc | \
+; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
+
+; RUN: llvm-ar p %p/Inputs/MacOSX.a very_long_bytecode_file_name.bc | \
+; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
+
+; RUN: llvm-ar p %p/Inputs/SVR4.a very_long_bytecode_file_name.bc | \
+; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
+
+; RUN: llvm-ar p %p/Inputs/xpg4.a very_long_bytecode_file_name.bc |\
+; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
diff --git a/test/Object/toc_GNU.ll b/test/Object/toc_GNU.ll
new file mode 100644
index 0000000000..510b7ed141
--- /dev/null
+++ b/test/Object/toc_GNU.ll
@@ -0,0 +1,8 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;GNU style archives
+;RUN: llvm-ar t %p/Inputs/GNU.a | FileCheck %s
+;CHECK: evenlen
+;CHECK-NEXT: oddlen
+;CHECK-NEXT: very_long_bytecode_file_name.bc
+;CHECK-NEXT: IsNAN.o
diff --git a/test/Object/toc_MacOSX.ll b/test/Object/toc_MacOSX.ll
new file mode 100644
index 0000000000..3b8166c5e6
--- /dev/null
+++ b/test/Object/toc_MacOSX.ll
@@ -0,0 +1,9 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;MacOSX style archives
+;RUN: llvm-ar t %p/Inputs/MacOSX.a | FileCheck %s
+;CHECK: __.SYMDEF SORTED
+;CHECK-NEXT: evenlen
+;CHECK-NEXT: oddlen
+;CHECK-NEXT: very_long_bytecode_file_name.bc
+;CHECK-NEXT: IsNAN.o
diff --git a/test/Object/toc_SVR4.ll b/test/Object/toc_SVR4.ll
new file mode 100644
index 0000000000..ecad5c8f0c
--- /dev/null
+++ b/test/Object/toc_SVR4.ll
@@ -0,0 +1,9 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;SVR4 style archives
+;This archive was created on Solaris with /usr/ccs/bin/ar
+;RUN: llvm-ar t %p/Inputs/SVR4.a | FileCheck %s
+;CHECK: evenlen
+;CHECK-NEXT: oddlen
+;CHECK-NEXT: very_long_bytecode_file_name.bc
+;CHECK-NEXT: IsNAN.o
diff --git a/test/Object/toc_xpg4.ll b/test/Object/toc_xpg4.ll
new file mode 100644
index 0000000000..7af982da6d
--- /dev/null
+++ b/test/Object/toc_xpg4.ll
@@ -0,0 +1,9 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;xpg4 style archives
+;This archive was created on Solaris with /usr/xpg4/bin/ar
+;RUN: llvm-ar t %p/Inputs/xpg4.a | FileCheck %s
+CHECK: evenlen
+CHECK-NEXT: oddlen
+CHECK-NEXT: very_long_bytecode_file_name.bc
+CHECK-NEXT: IsNAN.o