Move tests from test/Archive to test/Object.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 10 Jul 2013 21:47:16 +0000 (21:47 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 10 Jul 2013 21:47:16 +0000 (21:47 +0000)
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

32 files changed:
test/Archive/GNU.a [deleted file]
test/Archive/IsNAN.o [deleted file]
test/Archive/MacOSX.a [deleted file]
test/Archive/README.txt [deleted file]
test/Archive/SVR4.a [deleted file]
test/Archive/check_binary_output.ll [deleted file]
test/Archive/directory.ll [deleted file]
test/Archive/evenlen [deleted file]
test/Archive/extract.ll [deleted file]
test/Archive/lit.local.cfg [deleted file]
test/Archive/oddlen [deleted file]
test/Archive/toc_GNU.ll [deleted file]
test/Archive/toc_MacOSX.ll [deleted file]
test/Archive/toc_SVR4.ll [deleted file]
test/Archive/toc_xpg4.ll [deleted file]
test/Archive/very_long_bytecode_file_name.bc [deleted file]
test/Archive/xpg4.a [deleted file]
test/Object/Inputs/GNU.a [new file with mode: 0644]
test/Object/Inputs/IsNAN.o [new file with mode: 0644]
test/Object/Inputs/MacOSX.a [new file with mode: 0644]
test/Object/Inputs/SVR4.a [new file with mode: 0644]
test/Object/Inputs/evenlen [new file with mode: 0644]
test/Object/Inputs/oddlen [new file with mode: 0644]
test/Object/Inputs/very_long_bytecode_file_name.bc [new file with mode: 0644]
test/Object/Inputs/xpg4.a [new file with mode: 0644]
test/Object/check_binary_output.ll [new file with mode: 0644]
test/Object/directory.ll [new file with mode: 0644]
test/Object/extract.ll [new file with mode: 0644]
test/Object/toc_GNU.ll [new file with mode: 0644]
test/Object/toc_MacOSX.ll [new file with mode: 0644]
test/Object/toc_SVR4.ll [new file with mode: 0644]
test/Object/toc_xpg4.ll [new file with mode: 0644]

diff --git a/test/Archive/GNU.a b/test/Archive/GNU.a
deleted file mode 100644 (file)
index 4c09881..0000000
Binary files a/test/Archive/GNU.a and /dev/null differ
diff --git a/test/Archive/IsNAN.o b/test/Archive/IsNAN.o
deleted file mode 100644 (file)
index 7b3a12a..0000000
Binary files a/test/Archive/IsNAN.o and /dev/null differ
diff --git a/test/Archive/MacOSX.a b/test/Archive/MacOSX.a
deleted file mode 100644 (file)
index 8ba1e6d..0000000
Binary files a/test/Archive/MacOSX.a and /dev/null differ
diff --git a/test/Archive/README.txt b/test/Archive/README.txt
deleted file mode 100644 (file)
index 6021f4c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-test/Regression/Archive
-=======================
-
-This directory contains various tests of llvm-ar and to ensure
-compatibility reading other ar(1) formats. It also provides a basic
-functionality test for these tools.
-
-There are four archives accompanying these tests: 
-
-GNU.a    - constructed on Linux with GNU ar
-MacOSX.a - constructed on Mac OS X with its native BSD4.4 ar
-SVR4.a   - constructed on Solaris with /usr/ccs/bin/ar
-xpg4.a   - constructed on Solaris with /usr/xpg4/bin/ar
-
-Each type of test is run on each of these archive files.  These archives each 
-contain four members:
-
-oddlen - a member with an odd lengthed name and content
-evenlen - a member with an even lengthed name and content
-IsNAN.o - a Linux native binary
-very_long_bytecode_file_name.bc - LLVM bytecode file with really long name
-
-These files test different aspects of the archiver that should cause failures
-in llvm-ar if regressions are introduced.
diff --git a/test/Archive/SVR4.a b/test/Archive/SVR4.a
deleted file mode 100644 (file)
index 3947813..0000000
Binary files a/test/Archive/SVR4.a and /dev/null differ
diff --git a/test/Archive/check_binary_output.ll b/test/Archive/check_binary_output.ll
deleted file mode 100644 (file)
index 60ab5ca..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-; 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/GNU.a very_long_bytecode_file_name.bc | cmp -s %p/very_long_bytecode_file_name.bc -
diff --git a/test/Archive/directory.ll b/test/Archive/directory.ll
deleted file mode 100644 (file)
index 336d218..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-;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/Archive/evenlen b/test/Archive/evenlen
deleted file mode 100644 (file)
index 59ee8d5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-evenlen
diff --git a/test/Archive/extract.ll b/test/Archive/extract.ll
deleted file mode 100644 (file)
index 5c0f508..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-; 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/GNU.a very_long_bytecode_file_name.bc | \
-; RUN:   cmp -s %p/very_long_bytecode_file_name.bc -
-
-; RUN: llvm-ar p %p/MacOSX.a very_long_bytecode_file_name.bc | \
-; RUN:   cmp -s %p/very_long_bytecode_file_name.bc -
-
-; RUN: llvm-ar p %p/SVR4.a very_long_bytecode_file_name.bc | \
-; RUN:   cmp -s %p/very_long_bytecode_file_name.bc -
-
-; RUN: llvm-ar p %p/xpg4.a very_long_bytecode_file_name.bc |\
-; RUN:   cmp -s %p/very_long_bytecode_file_name.bc -
diff --git a/test/Archive/lit.local.cfg b/test/Archive/lit.local.cfg
deleted file mode 100644 (file)
index 19eebc0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.ll', '.c', '.cpp']
diff --git a/test/Archive/oddlen b/test/Archive/oddlen
deleted file mode 100644 (file)
index 8cf5bd1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-oddlen
diff --git a/test/Archive/toc_GNU.ll b/test/Archive/toc_GNU.ll
deleted file mode 100644 (file)
index 9ed7d8e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-;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/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/Archive/toc_MacOSX.ll b/test/Archive/toc_MacOSX.ll
deleted file mode 100644 (file)
index 6dbc9d2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-;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/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/Archive/toc_SVR4.ll b/test/Archive/toc_SVR4.ll
deleted file mode 100644 (file)
index d447b92..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-;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
-;RUN: llvm-ar t %p/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/Archive/toc_xpg4.ll b/test/Archive/toc_xpg4.ll
deleted file mode 100644 (file)
index fd875ee..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-;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
-;RUN: llvm-ar t %p/xpg4.a | FileCheck %s
-CHECK:      evenlen
-CHECK-NEXT: oddlen
-CHECK-NEXT: very_long_bytecode_file_name.bc
-CHECK-NEXT: IsNAN.o
diff --git a/test/Archive/very_long_bytecode_file_name.bc b/test/Archive/very_long_bytecode_file_name.bc
deleted file mode 100644 (file)
index f7fce24..0000000
Binary files a/test/Archive/very_long_bytecode_file_name.bc and /dev/null differ
diff --git a/test/Archive/xpg4.a b/test/Archive/xpg4.a
deleted file mode 100644 (file)
index b2bdb51..0000000
Binary files a/test/Archive/xpg4.a and /dev/null differ
diff --git a/test/Object/Inputs/GNU.a b/test/Object/Inputs/GNU.a
new file mode 100644 (file)
index 0000000..4c09881
Binary files /dev/null and b/test/Object/Inputs/GNU.a differ
diff --git a/test/Object/Inputs/IsNAN.o b/test/Object/Inputs/IsNAN.o
new file mode 100644 (file)
index 0000000..7b3a12a
Binary files /dev/null and b/test/Object/Inputs/IsNAN.o differ
diff --git a/test/Object/Inputs/MacOSX.a b/test/Object/Inputs/MacOSX.a
new file mode 100644 (file)
index 0000000..8ba1e6d
Binary files /dev/null and b/test/Object/Inputs/MacOSX.a differ
diff --git a/test/Object/Inputs/SVR4.a b/test/Object/Inputs/SVR4.a
new file mode 100644 (file)
index 0000000..3947813
Binary files /dev/null and b/test/Object/Inputs/SVR4.a differ
diff --git a/test/Object/Inputs/evenlen b/test/Object/Inputs/evenlen
new file mode 100644 (file)
index 0000000..59ee8d5
--- /dev/null
@@ -0,0 +1 @@
+evenlen
diff --git a/test/Object/Inputs/oddlen b/test/Object/Inputs/oddlen
new file mode 100644 (file)
index 0000000..8cf5bd1
--- /dev/null
@@ -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 (file)
index 0000000..f7fce24
Binary files /dev/null and b/test/Object/Inputs/very_long_bytecode_file_name.bc differ
diff --git a/test/Object/Inputs/xpg4.a b/test/Object/Inputs/xpg4.a
new file mode 100644 (file)
index 0000000..b2bdb51
Binary files /dev/null and b/test/Object/Inputs/xpg4.a differ
diff --git a/test/Object/check_binary_output.ll b/test/Object/check_binary_output.ll
new file mode 100644 (file)
index 0000000..567f18e
--- /dev/null
@@ -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 (file)
index 0000000..336d218
--- /dev/null
@@ -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 (file)
index 0000000..ab2bcc6
--- /dev/null
@@ -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 (file)
index 0000000..510b7ed
--- /dev/null
@@ -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 (file)
index 0000000..3b8166c
--- /dev/null
@@ -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 (file)
index 0000000..ecad5c8
--- /dev/null
@@ -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 (file)
index 0000000..7af982d
--- /dev/null
@@ -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