blob: 69d5ff107b4f9418f6b73b7a67d1022031929cc4 [file] [log] [blame]
Rafael Espindola3b5475c2013-07-10 21:47:16 +00001; This isn't really an assembly file, its just here to run the test.
2
3; This test just makes sure that llvm-ar can extract bytecode members
4; from various style archives.
5
Rafael Espindola54dbca52013-07-11 13:13:09 +00006; RUN: cd %T
7
8; RUN: rm -f very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +00009; RUN: llvm-ar p %p/Inputs/GNU.a very_long_bytecode_file_name.bc | \
10; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
Rafael Espindola54dbca52013-07-11 13:13:09 +000011; RUN: llvm-ar x %p/Inputs/GNU.a very_long_bytecode_file_name.bc
12; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \
13; RUN: very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000014
Rafael Espindola54dbca52013-07-11 13:13:09 +000015; RUN: rm -f very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000016; RUN: llvm-ar p %p/Inputs/MacOSX.a very_long_bytecode_file_name.bc | \
17; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
Rafael Espindola54dbca52013-07-11 13:13:09 +000018; RUN: llvm-ar x %p/Inputs/MacOSX.a very_long_bytecode_file_name.bc
19; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \
20; RUN: very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000021
Rafael Espindola54dbca52013-07-11 13:13:09 +000022; RUN: rm -f very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000023; RUN: llvm-ar p %p/Inputs/SVR4.a very_long_bytecode_file_name.bc | \
24; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
Rafael Espindola54dbca52013-07-11 13:13:09 +000025; RUN: llvm-ar x %p/Inputs/SVR4.a very_long_bytecode_file_name.bc
26; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \
27; RUN: very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000028
Rafael Espindola54dbca52013-07-11 13:13:09 +000029; RUN: rm -f very_long_bytecode_file_name.bc
Rafael Espindola3b5475c2013-07-10 21:47:16 +000030; RUN: llvm-ar p %p/Inputs/xpg4.a very_long_bytecode_file_name.bc |\
31; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc -
Rafael Espindola54dbca52013-07-11 13:13:09 +000032; RUN: llvm-ar x %p/Inputs/xpg4.a very_long_bytecode_file_name.bc
33; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \
34; RUN: very_long_bytecode_file_name.bc
Rafael Espindola3e7249f2013-07-12 18:51:25 +000035
36
37; Test that the 'o' option is working by extracting a file, putting it in o
38; new archive and checking that date.
39; RUN: rm -f very_long_bytecode_file_name.bc
40; RUN: llvm-ar xo %p/Inputs/GNU.a very_long_bytecode_file_name.bc
Bill Wendling2f98bac2014-01-16 07:08:22 +000041; RUN: rm -f %t.a
Rafael Espindola6a8e86f2015-07-13 20:38:09 +000042; RUN: llvm-ar rcU %t.a very_long_bytecode_file_name.bc
Rafael Espindola3e7249f2013-07-12 18:51:25 +000043; RUN: env TZ=GMT llvm-ar tv %t.a | FileCheck %s
44
Chandler Carruth0ef74f52014-04-28 01:24:32 +000045CHECK: 1465 2004-11-19 03:01:31.000000000 very_long_bytecode_file_name.bc