diff options
author | Andres Freund <andres@anarazel.de> | 2023-12-01 16:53:17 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-12-13 00:44:59 +0200 |
commit | f6f46173c48196f99f1daaf21affba0f44aef962 (patch) | |
tree | 6e9f4dfccfeb6e0c3a8710729ac0d695f59bdaa9 /unittests | |
parent | c168687439170afdf767f27e032e71b76f4d4f37 (diff) | |
download | meson-f6f46173c48196f99f1daaf21affba0f44aef962.zip meson-f6f46173c48196f99f1daaf21affba0f44aef962.tar.gz meson-f6f46173c48196f99f1daaf21affba0f44aef962.tar.bz2 |
macos: Fix test_pkgconfig_parse_libs() test on arm
The unit test infrastructure hardcodes the architecture as x86_64. On
macos, the test_pkgconfig_parse_libs() test creates a few libraries
for testing using clang. This leads to the test failing on arm based
macs, as darwin_get_object_archs() will skip over these libraries,
which then leads to the test failing because of using -l instead of
referencing the libraries by their full path.
I am not at all sure this is the best approach.
I am also somewhat confused why nobody else has encountered this? CI
apparently just runs on x86_64 macs?
CC: @tristan957
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/internaltests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/internaltests.py b/unittests/internaltests.py index 66bf458..3dc0fe7 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -618,7 +618,8 @@ class InternalTests(unittest.TestCase): out = name.with_suffix('.o') with src.open('w', encoding='utf-8') as f: f.write('int meson_foobar (void) { return 0; }') - subprocess.check_call(['clang', '-c', str(src), '-o', str(out)]) + # use of x86_64 is hardcoded in run_tests.py:get_fake_env() + subprocess.check_call(['clang', '-c', str(src), '-o', str(out), '-arch', 'x86_64']) subprocess.check_call(['ar', 'csr', str(name), str(out)]) with tempfile.TemporaryDirectory() as tmpdir: |