Skip to content

Tests: Fix Framework tests for multiarch on older macos

The Unix file command output is slightly different on older and newer versions of macOS. Here's two samples comparing the output for a universal binary, taken from some failed test outputs:

Older macOS:

/.../Framework.framework/Versions/A/Framework: Mach-O universal binary with 2 architectures
/.../Framework.framework/Versions/A/Framework (for architecture i386):	Mach-O dynamically linked shared library i386
/.../Framework.framework/Versions/A/Framework (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64

Newer macOS:

/.../Framework.framework/Versions/A/Framework: Mach-O universal binary with 2 architectures: [i386:Mach-O dynamically linked shared library i386] [x86_64:Mach-O 64-bit dynamically linked shared library x86_64]
/.../Framework.framework/Versions/A/Framework (for architecture i386):	Mach-O dynamically linked shared library i386
/.../Framework.framework/Versions/A/Framework (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64

Some of the RunCMake.Framework tests were assuming newer macOS output. These tests matched on the first line in the above samples. The change here matches on the subsequent lines instead, which is the same for both old and new versions.

A policy warning was also cleaned up to reduce the noise in the output when tests failed. CMP0012 can now be assumed to be NEW since CMake 3.4 is set as the minimum required by these tests.

Merge request reports