From: Rafael Espindola Date: Wed, 10 Jul 2013 21:47:16 +0000 (+0000) Subject: Move tests from test/Archive to test/Object. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6911911e614c1da1957af5518a15c5605657b4e2;p=oota-llvm.git 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 --- diff --git a/test/Archive/GNU.a b/test/Archive/GNU.a deleted file mode 100644 index 4c09881eb39..00000000000 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 index 7b3a12a69d7..00000000000 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 index 8ba1e6d30e3..00000000000 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 index 6021f4c0ae4..00000000000 --- a/test/Archive/README.txt +++ /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 index 3947813ac60..00000000000 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 index 60ab5caac45..00000000000 --- a/test/Archive/check_binary_output.ll +++ /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 index 336d218fd0f..00000000000 --- a/test/Archive/directory.ll +++ /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 index 59ee8d552e3..00000000000 --- a/test/Archive/evenlen +++ /dev/null @@ -1 +0,0 @@ -evenlen diff --git a/test/Archive/extract.ll b/test/Archive/extract.ll deleted file mode 100644 index 5c0f508319b..00000000000 --- a/test/Archive/extract.ll +++ /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 index 19eebc0ac7a..00000000000 --- a/test/Archive/lit.local.cfg +++ /dev/null @@ -1 +0,0 @@ -config.suffixes = ['.ll', '.c', '.cpp'] diff --git a/test/Archive/oddlen b/test/Archive/oddlen deleted file mode 100644 index 8cf5bd181b1..00000000000 --- a/test/Archive/oddlen +++ /dev/null @@ -1 +0,0 @@ -oddlen diff --git a/test/Archive/toc_GNU.ll b/test/Archive/toc_GNU.ll deleted file mode 100644 index 9ed7d8eb8cb..00000000000 --- a/test/Archive/toc_GNU.ll +++ /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 index 6dbc9d2ea4a..00000000000 --- a/test/Archive/toc_MacOSX.ll +++ /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 index d447b921999..00000000000 --- a/test/Archive/toc_SVR4.ll +++ /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 index fd875eebdaa..00000000000 --- a/test/Archive/toc_xpg4.ll +++ /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 index f7fce249020..00000000000 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 index b2bdb51188f..00000000000 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 index 00000000000..4c09881eb39 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 index 00000000000..7b3a12a69d7 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 index 00000000000..8ba1e6d30e3 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 index 00000000000..3947813ac60 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 index 00000000000..59ee8d552e3 --- /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 00000000000..8cf5bd181b1 --- /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 00000000000..f7fce249020 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 index 00000000000..b2bdb51188f 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 index 00000000000..567f18e65ba --- /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 00000000000..336d218fd0f --- /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 00000000000..ab2bcc624bf --- /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 00000000000..510b7ed1418 --- /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 00000000000..3b8166c5e60 --- /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 00000000000..ecad5c8f0cc --- /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 00000000000..7af982da6da --- /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