1; This test just makes sure that llvm-ar can extract bytecode members 2; from various style archives. 3 4; RUN: rm -rf %t && mkdir -p %t && cd %t 5 6; RUN: rm -f very_long_bytecode_file_name.bc 7; RUN: llvm-ar p %p/Inputs/GNU.a very_long_bytecode_file_name.bc | \ 8; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc - 9; RUN: llvm-ar x %p/Inputs/GNU.a very_long_bytecode_file_name.bc 10; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \ 11; RUN: very_long_bytecode_file_name.bc 12 13; RUN: rm -f very_long_bytecode_file_name.bc 14; RUN: llvm-ar p %p/Inputs/MacOSX.a very_long_bytecode_file_name.bc | \ 15; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc - 16; RUN: llvm-ar x %p/Inputs/MacOSX.a very_long_bytecode_file_name.bc 17; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \ 18; RUN: very_long_bytecode_file_name.bc 19 20; RUN: rm -f very_long_bytecode_file_name.bc 21; RUN: llvm-ar p %p/Inputs/SVR4.a very_long_bytecode_file_name.bc | \ 22; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc - 23; RUN: llvm-ar x %p/Inputs/SVR4.a very_long_bytecode_file_name.bc 24; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \ 25; RUN: very_long_bytecode_file_name.bc 26 27; RUN: rm -f very_long_bytecode_file_name.bc 28; RUN: llvm-ar p %p/Inputs/xpg4.a very_long_bytecode_file_name.bc |\ 29; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc - 30; RUN: llvm-ar x %p/Inputs/xpg4.a very_long_bytecode_file_name.bc 31; RUN: cmp -s %p/Inputs/very_long_bytecode_file_name.bc \ 32; RUN: very_long_bytecode_file_name.bc 33 34 35; Test that the 'o' option is working by extracting a file, putting it in o 36; new archive and checking that date. 37; RUN: rm -f very_long_bytecode_file_name.bc 38; RUN: llvm-ar xo %p/Inputs/GNU.a very_long_bytecode_file_name.bc 39; RUN: rm -f %t.a 40; RUN: llvm-ar --format=gnu rcU %t.a very_long_bytecode_file_name.bc 41; RUN: env TZ=GMT llvm-ar tv %t.a | FileCheck %s -check-prefix CHECK-GNU 42 43CHECK-GNU: 1465 Nov 19 03:01 2004 very_long_bytecode_file_name.bc 44 45; RUN: rm -f %t.a 46; RUN: llvm-ar --format=darwin rcU %t.a very_long_bytecode_file_name.bc 47; RUN: env TZ=GMT llvm-ar tv %t.a | FileCheck %s -check-prefix CHECK-DARWIN 48 49CHECK-DARWIN: 1472 Nov 19 03:01 2004 very_long_bytecode_file_name.bc 50 51RUN: not llvm-ar x %p/Inputs/GNU.a foo.o 2>&1 | FileCheck --check-prefix=NOTFOUND %s 52NOTFOUND: error: 'foo.o' was not found 53 54RUN: not llvm-ar x %p/Inputs/thin.a foo.o 2>&1 | FileCheck %s --check-prefix=THINEXTRACT 55THINEXTRACT: extracting from a thin archive is not supported 56 57RUN: llvm-ar p %p/Inputs/thin.a evenlen | FileCheck %s --check-prefix=EVENLEN 58EVENLEN: evenlen 59 60RUN: not llvm-ar p %p/Inputs/thin-path.a t/test2.o 2>&1 | FileCheck %s --check-prefix=MISSING 61MISSING: error: {{N|n}}o such file or directory 62