Skip to content

Commit

Permalink
Fix tests on macOS 10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Nov 14, 2024
1 parent ca864ca commit d12d339
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/block2/src/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ mod tests {
#[cfg(all(target_arch = "aarch64", target_vendor = "apple"))]
"*37@?0(ThisOrThat=Si)8{ThisAndThat=QjDAB}12",
#[cfg(all(target_arch = "x86", target_vendor = "apple"))]
"*45@?0(ThisOrThat=Si)4{ThisAndThat=QjDAB}8",
"*49@?0(ThisOrThat=Si)4{ThisAndThat=QjDAB}8",
#[cfg(all(target_arch = "x86", not(target_vendor = "apple")))]
"*41@?0(ThisOrThat=Si)4{ThisAndThat=QjDAB}8",
#[cfg(target_arch = "arm")]
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/extern/encode_utils.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
ENCODING(STRUCT_WITH_ARRAYS, struct with_arrays);

struct with_block {
void (^a)(void);
id b;
void __unsafe_unretained (^a)(void);
__unsafe_unretained id b;
void (*c)(void);
};
ENCODING_NO_ATOMIC(STRUCT_WITH_BLOCK, struct with_block); \
Expand Down
6 changes: 3 additions & 3 deletions helper-scripts/test-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ set -euxo pipefail
export CARGO_TARGET_DIR=$HOME/Desktop/objc2-target
export MACOSX_DEPLOYMENT_TARGET=10.12
export CRATES='--package=block2 --package=objc2 --package=objc2-encode --package=objc2-proc-macros --package=tests'
export FRAMEWORKS_MACOS_10_13='--package=objc2-app-kit --package=objc2-automator --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-core-data --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-external-accessory --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-osa-kit --package=objc2-quartz-core --package=objc2-service-management --package=objc2-store-kit --package=objc2-web-kit'
export FRAMEWORKS_MACOS_10_12='--package=objc2-accounts --package=objc2-app-kit --package=objc2-automator --package=objc2-av-kit --package=objc2-cloud-kit --package=objc2-contacts --package=objc2-contacts-ui --package=objc2-core-bluetooth --package=objc2-core-data --package=objc2-core-image --package=objc2-core-location --package=objc2-core-wlan --package=objc2-event-kit --package=objc2-exception-handling --package=objc2-finder-sync --package=objc2-foundation --package=objc2-game-controller --package=objc2-game-kit --package=objc2-input-method-kit --package=objc2-local-authentication --package=objc2-map-kit --package=objc2-media-player --package=objc2-metal --package=objc2-metal-kit --package=objc2-multipeer-connectivity --package=objc2-network-extension --package=objc2-osa-kit --package=objc2-photos-ui --package=objc2-quartz-core --package=objc2-screen-saver --package=objc2-service-management --package=objc2-social --package=objc2-store-kit --package=objc2-web-kit'
export FRAMEWORKS_IOS_9='--package=objc2-foundation --package=objc2-metal'

# Test on macOS 32bit
export SDKROOT=$HOME/Desktop/MacOSX10.13.sdk
cargo test $CRATES
cargo test $CRATES --features=unstable-static-class,unstable-static-sel
cargo test $CRATES $FRAMEWORKS_MACOS_10_13 --features=block2,exception,catch-all,all
cargo test $CRATES $FRAMEWORKS_MACOS_10_12 --features=block2,exception,catch-all,all
cargo test $CRATES --release
cargo test -Zbuild-std --target=i686-apple-darwin $CRATES
cargo test -Zbuild-std --target=i686-apple-darwin $CRATES $FRAMEWORKS_MACOS_10_13 --features=block2,exception,catch-all,all
cargo test -Zbuild-std --target=i686-apple-darwin $CRATES $FRAMEWORKS_MACOS_10_12 --features=block2,exception,catch-all,all
cargo test -Zbuild-std --target=i686-apple-darwin $CRATES --release
unset SDKROOT

Expand Down

0 comments on commit d12d339

Please sign in to comment.