1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
## Test the CREATE MRI command.
# RUN: rm -rf %t && mkdir -p %t/path/ && split-file %s %t
# RUN: cd %t
# RUN: llvm-ar -M < create.mri
# RUN: llvm-ar -M < thin.mri
## Test use of CREATE with no archive name.
# RUN: not llvm-ar -M < none.mri 2>&1 | FileCheck --check-prefix=NONE %s
# RUN: not llvm-ar -M < thin-none.mri 2>&1 | FileCheck --check-prefix=NONE %s
# RUN: not llvm-ar -M < none-add.mri 2>&1 | FileCheck --check-prefix=NONE %s
# RUN: not llvm-ar -M < thin-none-add.mri 2>&1 | FileCheck --check-prefix=NONE %s
# NONE: error: script line 1: missing archive name
## Test use of paths with CREATE.
# RUN: llvm-ar -M < path.mri
# RUN: ls path/path.a
# RUN: llvm-ar -M < thin-path.mri
# RUN: ls path/thin-path.a
## Test bad paths with CREATE.
# RUN: not llvm-ar -M < bad.mri 2>&1 | FileCheck --check-prefix=BAD -DMSG=%errc_ENOENT %s
# RUN: not llvm-ar -M < thin-bad.mri 2>&1 | FileCheck --check-prefix=BAD -DMSG=%errc_ENOENT %s
# BAD: error: bad/bad.a: [[MSG]]
## Test duplicate use of CREATE.
# RUN: not llvm-ar -M < create2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
# RUN: not llvm-ar -M < thin2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
# RUN: not llvm-ar -M < mix1.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
# RUN: not llvm-ar -M < mix2.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=2
# RUN: not llvm-ar -M < save.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=3
# RUN: not llvm-ar -M < thin-save.mri 2>&1 | FileCheck --check-prefix=MULTIPLE %s -DLINE=3
# MULTIPLE: error: script line [[LINE]]: editing multiple archives not supported
#--- create.mri
CREATE create.a
SAVE
#--- thin.mri
CREATETHIN thin.a
SAVE thin.mri
#--- none.mri
CREATE
SAVE
#--- thin-none.mri
CREATETHIN
SAVE
#--- foo.txt
FOO
#--- none-add.mri
CREATE
ADDMOD foo.txt
SAVE
#--- thin-none-add.mri
CREATETHIN
ADDMOD foo.txt
SAVE
#--- path.mri
CREATE path/path.a
SAVE
#--- thin-path.mri
CREATETHIN path/thin-path.a
SAVE
#--- bad.mri
CREATE bad/bad.a
SAVE
#--- thin-bad.mri
CREATETHIN bad/bad.a
SAVE
#--- create2.mri
CREATE create1.a
CREATE create2.a
SAVE
#--- thin2.mri
CREATETHIN thin1.a
CREATETHIN thin2.a
SAVE
#--- mix1.mri
CREATE mix1.a
CREATETHIN mixthin1.a
SAVE
#--- mix2.mri
CREATETHIN mixthin2.a
CREATE mix2.a
SAVE
#--- save.mri
CREATE create1.a
SAVE
CREATE create2.a
SAVE
#--- thin-save.mri
CREATETHIN create1.a
SAVE
CREATETHIN create2.a
SAVE
|