Files
archived-touchHLE/tests/README.md
abnormalmaps 9666ff6746 Support building Objective C in TestApp
Supports building Objective-C code inside TestApp by using the
common3.0-sdk.

Change-Id: I684e2892f750c03818dd2bc35f0d108e61611e15
2025-09-18 12:22:40 +02:00

2.0 KiB

Integration tests

This directory contains integration tests written in Objective-C. They're compiled to an ARMv6 Mach-O binary and packaged into a bundle (TestApp.app) so that they can be run in the emulator like a normal iPhone OS app. The code in integration.rs lets them be run by cargo test (which also runs unit tests written in Rust).

Building

Compiler Setup

Clang is required to build the TestApp binary, and should be placed (or symlinked) at tests/TestApp_build/llvm/bin/clang. While modern versions of clang may work fine, only clang 12 (listed below) is tested and used in CI.

Extract LLVM to tests/llvm, so that tests/TestApp_build/llvm/bin/clang (with .exe suffix, on Windows) is the path to Clang.

Linker setup

A custom SDK with headers and a multiplatform version of Apple's ld is required to build the TestApp binary. To install it, download the latest release (or follow the instructions inside the repository to compile it), then extract/place/symlink the resultant directories as shown below. (On Windows, you may find it easier to use the precompiled binaries, since compiling requires mingw).

The overall structure of the tests directory should look like the following:

- tests
  - integration.rs
  - llvm
    - bin
      - clang
  - common-3.0.sdk
    - usr
      - lib
        - (sdk libraries)
      - include
        - (sdk headers)
      - bin
        - ld(.exe)
        - lipo(.exe)
  - TestApp_source
  - TestApp.app
  - libc_stub