diff options
Diffstat (limited to 'tests/projects/objc/iosapp_framework_rpath/test.lua')
| -rw-r--r-- | tests/projects/objc/iosapp_framework_rpath/test.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/projects/objc/iosapp_framework_rpath/test.lua b/tests/projects/objc/iosapp_framework_rpath/test.lua new file mode 100644 index 000000000..efc69dbea --- /dev/null +++ b/tests/projects/objc/iosapp_framework_rpath/test.lua @@ -0,0 +1,30 @@ +import("utils.binary.rpath") + +function main(t) + if not is_host("macosx") then + return t:skip("wrong host platform") + end + + os.execv("xmake", {"f", "-p", "iphoneos", "-a", "arm64", "--appledev=simulator", "-c"}) + os.execv("xmake", {"-vD"}) + local appfile = "build/iphoneos/arm64/release/demo.app/demo" + local rpaths = rpath.list(appfile) + local found_ios = false + local found_macos = false + if rpaths then + for _, p in ipairs(rpaths) do + if p == "@executable_path/Frameworks" then + found_ios = true + end + if p == "@executable_path/../Frameworks" then + found_macos = true + end + end + end + if not found_ios then + raise("missing iOS framework rpath @executable_path/Frameworks") + end + if found_macos then + raise("found macOS-style framework rpath in iOS app") + end +end |
