Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-readtapi / extract.test
blob175efcda2d7cba14f620a9627db39667139c9dc6
1 ; RUN: rm -rf %t
2 ; RUN: split-file %s %t 
3 ; RUN: llvm-readtapi -arch x86_64 -extract %t/libfat.tbd -compact -o %t/libslim.tbd 2>&1 | FileCheck --allow-empty %s
4 ; RUN: llvm-readtapi --compare %t/libslim.tbd %t/libslim_expected.tbd 2>&1 | FileCheck --allow-empty %s
6 ; RUN: llvm-readtapi -arch armv7s --extract %t/libfat2.tbd 2>&1 | FileCheck %s --check-prefix OUTPUT 
8 ; CHECK-NOT: error
9 ; CHECK-NOT: warning
11 ; OUTPUT: {
12 ; OUTPUT-NEXT:  "main_library": {
13 ; OUTPUT-NEXT:    "install_names": [
14 ; OUTPUT-NEXT:      {
15 ; OUTPUT-NEXT:        "name": "/usr/lib/libfat.dylib"
16 ; OUTPUT-NEXT:      }
17 ; OUTPUT-NEXT:    ],
18 ; OUTPUT-NEXT:    "target_info": [
19 ; OUTPUT-NEXT:      {
20 ; OUTPUT-NEXT:        "target": "armv7s-ios"
21 ; OUTPUT-NEXT:      }
22 ; OUTPUT-NEXT:    ]
23 ; OUTPUT-NEXT:  },
24 ; OUTPUT-NEXT:  "tapi_tbd_version": 5
25 ; OUTPUT-NEXT: }
27 //--- libfat.tbd
29   "libraries": [
30     {
31       "exported_symbols": [
32         {
33           "data": {
34             "global": [
35               "_sym1"
36             ]
37           },
38           "targets": [
39             "x86_64-macos"
40           ]
41         },
42         {
43           "data": {
44             "global": [
45               "_sym2"
46             ]
47           },
48           "targets": [
49             "x86_64h-macos"
50           ]
51         }
52       ],
53       "install_names": [
54         {
55           "name": "/usr/lib/internal/libfat.dylib"
56         }
57       ],
58       "parent_umbrellas": [
59         {
60           "umbrella": "fat"
61         }
62       ],
63       "target_info": [
64         {
65           "target": "x86_64-macos"
66         },
67         {
68           "target": "x86_64h-macos"
69         }
70       ]
71     }
72   ],
73   "main_library": {
74     "install_names": [
75       {
76         "name": "/usr/lib/libfat.dylib"
77       }
78     ],
79     "reexported_libraries": [
80       {
81         "names": [
82           "/usr/lib/internal/libfat.dylib"
83         ]
84       }
85     ],
86     "target_info": [
87       {
88         "target": "x86_64-macos"
89       },
90       {
91         "target": "x86_64h-macos"
92       }
93     ]
94   },
95   "tapi_tbd_version": 5
98 //--- libfat2.tbd
100   "libraries": [
101     {
102       "exported_symbols": [
103         {
104           "data": {
105             "global": [
106               "_sym1"
107             ]
108           }
109         }
110       ],
111       "install_names": [
112         {
113           "name": "/usr/lib/internal/libfat.dylib"
114         }
115       ],
116       "target_info": [
117         {
118           "target": "arm64-ios"
119         }
120       ]
121     }
122   ],
123   "main_library": {
124     "install_names": [
125       {
126         "name": "/usr/lib/libfat.dylib"
127       }
128     ],
129     "reexported_libraries": [
130       {
131         "names": [
132           "/usr/lib/internal/libfat.dylib"
133         ],
134         "targets": [
135           "arm64-ios"
136         ]
137       }
138     ],
139     "target_info": [
140       {
141         "target": "armv7s-ios"
142       },
143       {
144         "target": "arm64-ios"
145       }
146     ]
147   },
148   "tapi_tbd_version": 5
151 //--- libslim_expected.tbd
153   "libraries": [
154     {
155       "exported_symbols": [
156         {
157           "data": {
158             "global": [
159               "_sym1"
160             ]
161           }
162         }
163       ],
164       "install_names": [
165         {
166           "name": "/usr/lib/internal/libfat.dylib"
167         }
168       ],
169       "parent_umbrellas": [
170         {
171           "umbrella": "fat"
172         }
173       ],
174       "target_info": [
175         {
176           "target": "x86_64-macos"
177         }
178       ]
179     }
180   ],
181   "main_library": {
182     "install_names": [
183       {
184         "name": "/usr/lib/libfat.dylib"
185       }
186     ],
187     "reexported_libraries": [
188       {
189         "names": [
190           "/usr/lib/internal/libfat.dylib"
191         ]
192       }
193     ],
194     "target_info": [
195       {
196         "target": "x86_64-macos"
197       }
198     ]
199   },
200   "tapi_tbd_version": 5