58 lines · plain
1# Tapi's awareness of symlinks relies on POSIX level apis not available on windows.2; REQUIRES: system-darwin3 4; RUN: rm -rf %t5; RUN: split-file %s %t6; RUN: mkdir -p %t/sysroot/usr/lib/7; RUN: mkdir -p %t/sysroot/System/Library/Frameworks/System.framework8; RUN: yaml2obj %S/Inputs/libSystem.1.yaml -o %t/sysroot/usr/lib/libSystem.1.dylib9; RUN: cd %t/sysroot/usr/lib10# Set relative symlink.11; RUN: ln -s libSystem.1.dylib libSystem.dylib12# Set broken but accepted symlink.13; RUN: ln -s /usr/lib/libSystem.1.dylib %t/sysroot/System/Library/Frameworks/System.framework/System14# Set absolute symlink.15; RUN: ln -s %t/sysroot/usr/lib/libSystem.dylib libfoo.dylib16; RUN: cd %t17; RUN: llvm-readtapi -stubify %t/sysroot 2>&1 | FileCheck -allow-empty %s18; RUN: llvm-readtapi -compare %t/sysroot/usr/lib/libfoo.tbd %t/expected_system.tbd 2>&1 | FileCheck -allow-empty %s19; RUN: file %t/sysroot/System/Library/Frameworks/System.framework/System.tbd 2>&1 | FileCheck -allow-empty %s20 21# Warn on invalid symlink.22; RUN: ln -s %t/sysroot/usr/libSystem.dylib %t/sysroot/usr/lib/libbroken.dylib23; RUN: llvm-readtapi -stubify %t/sysroot 2>&1 | FileCheck %s --check-prefix BROKEN_SYMLINK 24 25; CHECK-NOT: error: 26; CHECK-NOT: warning: 27 28; BROKEN_SYMLINK: ignoring broken symlink: {{.*}}/usr/lib/libbroken.dylib29 30;--- expected_system.tbd31{32 "main_library": {33 "flags": [34 {35 "attributes": [36 "not_app_extension_safe"37 ]38 }39 ],40 "install_names": [41 {42 "name": "/usr/lib/libSystem.1.dylib"43 }44 ],45 "target_info": [46 {47 "min_deployment": "10.14",48 "target": "x86_64-macos"49 },50 {51 "min_deployment": "12",52 "target": "x86_64-maccatalyst"53 }54 ]55 },56 "tapi_tbd_version": 557}58