diff --git a/.ci/__init__.py b/.ci/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/.ci/bump_dev_version.py b/.ci/bump_dev_version.py deleted file mode 100644 index e3f802833ea..00000000000 --- a/.ci/bump_dev_version.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -import time - - -def replace_in_file(file_path, search, replace): - with open(file_path, "r") as handle: - content = handle.read() - if search not in content: - raise Exception("Incorrect development version in conans/__init__.py") - content = content.replace(search, replace) - content = content.encode("utf-8") - with open(file_path, "wb") as handle: - handle.write(content) - -def bump_dev(): - vfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../conans/__init__.py") - snapshot = "%s" % int(time.time()) - replace_in_file(vfile, "-dev'", "-dev%s'" % snapshot) - - -if __name__ == "__main__": - bump_dev() diff --git a/.ci/jenkins/testsv2.jenkins b/.ci/jenkins/testsv2.jenkins deleted file mode 100644 index 01bc871790c..00000000000 --- a/.ci/jenkins/testsv2.jenkins +++ /dev/null @@ -1,184 +0,0 @@ -def branchName = env.BRANCH_NAME -def jobName = env.JOB_NAME - -void cancelPrevious() { - stage("Cancelling previous") { - def buildNumber = env.BUILD_NUMBER as int - if (buildNumber > 1) milestone(buildNumber - 1) - milestone(buildNumber) - } -} - -String getTempFolder(String nodeName) { - if (nodeName == "Windows") { return "C:/J/t_v2/" } - return "/tmp/" -} - -List getConfigurations(String moduleName, String branchName, String jobName) { - def configs = [] - - String LinuxNode - if (moduleName == "test/unittests" || moduleName == "test/integration") { - LinuxNode = "LinuxUnittests" - } else if (moduleName == "test/functional") { - LinuxNode = "LinuxFunctional" - } - - configs.add([node: LinuxNode, pyvers: ["PY312"]]) - - if (branchName =~ /(^PR-.*)/) { - configs.add([node: LinuxNode, pyvers: ["PY38"]]) - configs.add([node: "Windows", pyvers: ["PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY38"]]) - } - else if (jobName == "ConanNightlyv2" || branchName =~ /^release.*/) { - configs.add([node: LinuxNode, pyvers: ["PY36", "PY38"]]) - configs.add([node: "Windows", pyvers: ["PY36", "PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY36", "PY38"]]) - } - else if (branchName == "develop2") { - configs.add([node: LinuxNode, pyvers: ["PY36", "PY38"]]) - configs.add([node: "Windows", pyvers: ["PY36", "PY38"]]) - configs.add([node: "M2Macos", pyvers: ["PY36", "PY38"]]) - } - return configs -} - -boolean shouldTestServer(String moduleName) { - // run conan_server --help after running functional tests - if (moduleName == "test/functional") { - return true - } - return false -} - -private Closure runTests(String nodeName, String pythonVersion, String module) { - def ret = { - node(nodeName) { - stage("${nodeName} - ${pythonVersion}") { - def scmVars = checkout scm - def commit = scmVars["GIT_COMMIT"].substring(0, 4) - def workDir = getTempFolder(nodeName) + "${commit}/${pythonVersion}/" - def venvName = "env_${env.BUILD_NUMBER}_${pythonVersion}_${commit}" - def pipArguments = "--no-cache-dir --timeout 30" - def pipInstalls = "python -m pip install -r conans/requirements.txt ${pipArguments} && " + - "python -m pip install -r conans/requirements_server.txt ${pipArguments} && " + - "python -m pip install -r conans/requirements_dev.txt ${pipArguments} && " + - "python -m pip install meson ${pipArguments} && " - def conanToolInstall = "python -m pip install . && conan --version && conan --help && python --version && " - def launchTests = "python -m pytest ${module} -n=4 --durations=20 -rs" - if (shouldTestServer(module)) { - def rm = (nodeName == "Windows") ? "del" : "rm" - def mv = (nodeName == "Windows") ? "move" : "mv" - def conanServerToolInstall = "${rm} setup.py && ${mv} setup_server.py setup.py && python -m pip install . && conan_server --help" - launchTests = launchTests + ' && ' + conanServerToolInstall - } - if (nodeName.indexOf("Linux") >= 0) { - try { - // we only test scons in Linux - pipInstalls = pipInstalls + "python -m pip install scons ${pipArguments} && " - def sourcedir = "/home/conan/" - def pyenvdir = "${sourcedir}.pyenv" - def launchCommand = "export PYENV_ROOT=${pyenvdir} && " + - "export PATH=\"${pyenvdir}/versions/\$${pythonVersion}/bin:${pyenvdir}/bin:\$PATH\" && " + - "pyenv global \$${pythonVersion} && " + - pipInstalls + - conanToolInstall + - launchTests - sh(script: launchCommand) - } finally {} - } else if (nodeName == "M2Macos") { - def localDir = "/Users/jenkins" - withEnv(["CONAN_TEST_FOLDER=${workDir}", "PY27=2.7.18", "PY36=3.6.15", "PY38=3.8.12", "PY39=3.9.10", - "PYENV_ROOT=${localDir}/.pyenv", "PATH+EXTRA=${localDir}/.pyenv/shims:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin"]) { - try { - sh(script: "mkdir -p ${workDir}") - def pythonLocation = "${localDir}/.pyenv/versions/\$${pythonVersion}/bin/python" - def configVenv = "${pythonLocation} -m virtualenv --python ${pythonLocation} ${workDir}${venvName} && " + - "source ${workDir}${venvName}/bin/activate && python --version && " - def launchCommand = configVenv + pipInstalls + conanToolInstall + launchTests - sh(script: launchCommand) - } finally { - sh(script: "rm -rf ${workDir}") - } - } - } else if (nodeName == "Windows") { - withEnv(["CONAN_TEST_FOLDER=${workDir}", "CONAN_BASH_PATH=c:/tools/msys64/usr/bin/bash", - "PY27=Python27", "PY36=Python36", "PY38=Python38-64"]) { - try { - bat(script: "if not exist \"${workDir}\" mkdir \"${workDir}\"") - def pythonLocation = "C:/%${pythonVersion}%/python.exe" - def configVenv = "virtualenv --python ${pythonLocation} ${workDir}${venvName} && " + - "${workDir}${venvName}/Scripts/activate && python --version && " - def launchCommand = configVenv + pipInstalls + conanToolInstall + launchTests - bat(script: launchCommand) - } finally { - bat(script: "rd /s /q \"${workDir}\"") - } - } - } - cleanWs() - } - } - } - return ret -} - -void runTestsModule(String moduleName, String branchName, String jobName) { - def configs = getConfigurations(moduleName, branchName, jobName) - def paralellRuns = [:] - configs.each { config -> - def testKind = moduleName.split("/").last() - config["pyvers"].each { pyver -> - paralellRuns["${testKind} - ${config['node']} - ${pyver}"] = runTests(config["node"], pyver, moduleName) - } - } - parallel(paralellRuns) -} - -def testModules = ["test/unittests", "test/integration", "test/functional"] - -void deployToPypiTest() { - node("LinuxFunctional") { - try { - def scmVars = checkout scm - checkout scm - stage("Deploy conan to pypitesting") { - withCredentials([usernamePassword(credentialsId: 'PYPITEST_CONAN_CREDENTIALS', usernameVariable: 'TWINE_USERNAME', passwordVariable: 'TWINE_PASSWORD')]) { - def deployConan = "python -m pip install twine && " + - "python .ci/bump_dev_version.py && " + - "rm -rf dist/ && python setup.py sdist && " + - "python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*" - sh(script: deployConan) - } - } - stage("Deploy conan-server to pypitesting") { - withCredentials([usernamePassword(credentialsId: 'PYPITEST_CONAN_SERVER_CREDENTIALS', usernameVariable: 'TWINE_USERNAME', passwordVariable: 'TWINE_PASSWORD')]) { - def deployServer = "rm -rf dist/ rm setup.py && mv setup_server.py setup.py && python setup.py sdist && " + - "python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/*" - sh(script: deployServer) - } - } - } finally {} - } -} - -try { - cancelPrevious() - - testModules.each { moduleName -> - runTestsModule(moduleName, branchName, jobName) - } - - if (branchName == "develop2") { - deployToPypiTest() - } -} -catch(e){ - if (branchName == "develop2") { - def subject = "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'" - def summary = "${subject} (${env.BUILD_URL}), Conan Branch: ${branchName}" - slackSend (color: '#FF0000', message: summary) - } - throw e -} diff --git a/.github/workflows/osx-tests.yml b/.github/workflows/osx-tests.yml new file mode 100644 index 00000000000..07ea6c0e67b --- /dev/null +++ b/.github/workflows/osx-tests.yml @@ -0,0 +1,140 @@ +name: OSX Tests + +on: + push: + branches: + - develop2 + - release/* + pull_request: + branches: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + testing: + strategy: + fail-fast: true + matrix: + python-version: ['3.8', '3.12', '3.13'] + test-type: [unittests, integration, functional] + + runs-on: macos-14 + + name: Conan (${{ matrix.test-type }}) (${{ matrix.python-version }}) + + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip packages + id: cache-pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('conans/requirements*.txt') }} + + - name: Install Python requirements + run: | + pip install --upgrade pip + pip install -r conans/requirements.txt + pip install -r conans/requirements_server.txt + pip install -r conans/requirements_dev.txt + pip install meson + + - name: Uninstall default CMake + run: brew uninstall cmake || true + + - name: Cache Homebrew packages + id: cache-brew + uses: actions/cache@v4 + with: + path: ~/Library/Caches/Homebrew + key: ${{ runner.os }}-brew + + - name: Install homebrew dependencies + if: matrix.test-type == 'functional' + run: | + brew install xcodegen make libtool zlib autoconf automake ninja + + - name: Cache CMake and Bazel installations + if: matrix.test-type == 'functional' + id: cache-tools + uses: actions/cache@v4 + with: + path: | + ~/Applications/CMake/3.15.7 + ~/Applications/CMake/3.19.7 + ~/Applications/CMake/3.23.5 + ~/Applications/bazel/6.3.2 + ~/Applications/bazel/7.1.2 + key: ${{ runner.os }}-conan-tools-cache + + - name: Build CMake old versions not available for ARM + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + run: | + set -e + CMAKE_BUILD_VERSIONS=("3.15.7") + for version in "${CMAKE_BUILD_VERSIONS[@]}"; do + echo "Compiling CMake version ${version} from source for ARM..." + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}.tar.gz + tar -xzf cmake-${version}.tar.gz + cd cmake-${version} + mkdir build && cd build + ../bootstrap --prefix=${HOME}/Applications/CMake/${version} -- -DCMAKE_USE_OPENSSL=ON + make -j$(sysctl -n hw.ncpu) + make install + ${HOME}/Applications/CMake/${version}/bin/cmake --version + cd ../../ + rm -rf cmake-${version} cmake-${version}.tar.gz + done + + - name: Install universal CMake versions + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + run: | + set -e + CMAKE_PRECOMP_VERSIONS=("3.19.7" "3.23.5") + for version in "${CMAKE_PRECOMP_VERSIONS[@]}"; do + echo "Downloading and installing precompiled universal CMake version ${version}..." + wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz + tar -xzf cmake-${version}-macos-universal.tar.gz \ + --exclude=CMake.app/Contents/bin/cmake-gui \ + --exclude=CMake.app/Contents/doc/cmake \ + --exclude=CMake.app/Contents/share/cmake-${version%.*}/Help \ + --exclude=CMake.app/Contents/share/vim + mkdir -p ${HOME}/Applications/CMake/${version} + cp -fR cmake-${version}-macos-universal/CMake.app/Contents/* ${HOME}/Applications/CMake/${version} + ${HOME}/Applications/CMake/${version}/bin/cmake --version + rm -rf cmake-${version}-macos-universal + rm cmake-${version}-macos-universal.tar.gz + done + + - name: Install Bazel versions + if: matrix.test-type == 'functional' && steps.cache-tools.outputs.cache-hit != 'true' + run: | + set -e + for version in 6.3.2 7.1.2; do + mkdir -p ${HOME}/Applications/bazel/${version} + wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64 + chmod +x ${HOME}/Applications/bazel/${version}/bazel + done + + - name: Run Tests + run: | + if [ "${{ matrix.test-type }}" == "unittests" ]; then + pytest test/unittests --durations=20 -n auto + elif [ "${{ matrix.test-type }}" == "integration" ]; then + pytest test/integration --durations=20 -n auto + elif [ "${{ matrix.test-type }}" == "functional" ]; then + export PATH=${HOME}/Applications/CMake/3.15.7/bin:$PATH:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin + cmake --version + pytest test/functional --durations=20 -n auto + fi diff --git a/test/conftest.py b/test/conftest.py index b9bc9ff5887..9d464ecdb31 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -68,27 +68,25 @@ "default": "3.15", "3.15": { "path": {'Windows': 'C:/cmake/cmake-3.15.7-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.15.7/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.15.7/bin', 'Linux': '/usr/share/cmake-3.15.7/bin'} }, "3.16": { "path": {'Windows': 'C:/cmake/cmake-3.16.9-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.16.9/bin', 'Linux': '/usr/share/cmake-3.16.9/bin'} }, "3.17": { "path": {'Windows': 'C:/cmake/cmake-3.17.5-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.17.5/bin', 'Linux': '/usr/share/cmake-3.17.5/bin'} }, "3.19": { "path": {'Windows': 'C:/cmake/cmake-3.19.7-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.19.7/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.19.7/bin', 'Linux': '/usr/share/cmake-3.19.7/bin'} }, "3.23": { "path": {'Windows': 'C:/cmake/cmake-3.23.1-win64-x64/bin', - 'Darwin': '/Users/jenkins/cmake/cmake-3.23.1/bin', + 'Darwin': '/Users/runner/Applications/CMake/3.23.5/bin', 'Linux': "/usr/share/cmake-3.23.5/bin"} }, "3.28": { @@ -158,10 +156,10 @@ "default": "6.3.2", "6.3.2": {"path": {'Linux': '/usr/share/bazel-6.3.2/bin', 'Windows': 'C:/bazel-6.3.2/bin', - 'Darwin': '/Users/jenkins/bazel-6.3.2/bin'}}, - "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2/bin', + 'Darwin': '/Users/runner/Applications/bazel/6.3.2'}}, + "7.1.2": {"path": {'Linux': '/usr/share/bazel-7.1.2', 'Windows': 'C:/bazel-7.1.2/bin', - 'Darwin': '/Users/jenkins/bazel-7.1.2/bin'}}, + 'Darwin': '/Users/runner/Applications/bazel/7.1.2'}}, }, 'premake': { "exe": "premake5", @@ -178,7 +176,7 @@ "exe": "ndk-build", "default": "system", "system": { - "path": {'Darwin': f'{homebrew_root}/share/android-ndk'} + "path": {'Darwin': os.getenv("ANDROID_NDK")} } }, "qbs": {"disabled": True}, diff --git a/test/functional/layout/test_editable_cmake.py b/test/functional/layout/test_editable_cmake.py index 02da2d79672..3489be109c7 100644 --- a/test/functional/layout/test_editable_cmake.py +++ b/test/functional/layout/test_editable_cmake.py @@ -91,7 +91,7 @@ def test_editable_cmake_linux(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_editable_cmake_osx(generator): editable_cmake(generator) @@ -154,6 +154,6 @@ def test_editable_cmake_linux_exe(generator): @pytest.mark.skipif(platform.system() != "Darwin", reason="Requires Macos") @pytest.mark.parametrize("generator", [None, "Ninja", "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_editable_cmake_osx_exe(generator): editable_cmake_exe(generator) diff --git a/test/functional/toolchains/apple/test_xcodetoolchain.py b/test/functional/toolchains/apple/test_xcodetoolchain.py index c45614553d3..cdbbe7a8998 100644 --- a/test/functional/toolchains/apple/test_xcodetoolchain.py +++ b/test/functional/toolchains/apple/test_xcodetoolchain.py @@ -80,7 +80,7 @@ def package_info(self): client.run_command("xcodegen generate") - sdk_version = "11.3" + sdk_version = "14.5" settings = "-s arch=x86_64 -s os.sdk_version={} -s compiler.cppstd={} " \ "-s compiler.libcxx=libc++ -s os.version={} " \ "-c tools.build.cross_building:can_run=True " \ @@ -93,4 +93,4 @@ def package_info(self): assert "minos {}".format(min_version) in client.out assert "sdk {}".format(sdk_version) in client.out assert "libc++" in client.out - assert " -fstack-protector-strong -" in client.out + assert " -fstack-protector-strong" in client.out diff --git a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py index 7472636a36e..f1cc092bac2 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_apple_frameworks.py @@ -41,8 +41,10 @@ def build(self): """) +# needs at least 3.23.3 because of error with "empty identity" +# https://stackoverflow.com/questions/72746725/xcode-14-beta-cmake-not-able-to-resolve-cmake-c-compiler-and-cmake-cxx-compiler @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_apple_framework_xcode(client): app_cmakelists = textwrap.dedent(""" cmake_minimum_required(VERSION 3.15) diff --git a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py index 71fe86d706a..31e55502a20 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py @@ -561,7 +561,8 @@ def package_info(self): assert 'set(ZLIB_FIND_MODE "")' in contents -@pytest.mark.tool("cmake", "3.19") +# needs at least 3.23.3 because of error with "empty identity" +@pytest.mark.tool("cmake", "3.23") def test_error_missing_build_type(matrix_client): # https://github.com/conan-io/conan/issues/11168 client = matrix_client diff --git a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py index d7d7ce901f1..cc7bf134173 100644 --- a/test/functional/toolchains/cmake/cmakedeps/test_link_order.py +++ b/test/functional/toolchains/cmake/cmakedeps/test_link_order.py @@ -331,8 +331,9 @@ def _run_and_get_lib_order(t, generator): return libs +# needs at least 3.23.3 because of error with "empty identity" @pytest.mark.parametrize("generator", [None, "Xcode"]) -@pytest.mark.tool("cmake", "3.19") +@pytest.mark.tool("cmake", "3.23") def test_cmake_deps(client, generator): if generator == "Xcode" and platform.system() != "Darwin": pytest.skip("Xcode is needed") diff --git a/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py b/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py index 3906fa918ca..0cfc20661eb 100644 --- a/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py +++ b/test/functional/toolchains/cmake/test_cmake_toolchain_xcode_flags.py @@ -58,6 +58,7 @@ def test_cmake_apple_bitcode_arc_and_visibility_flags_enabled(op_system, os_vers @pytest.mark.skipif(platform.system() != "Darwin", reason="Only OSX") +@pytest.mark.tool("cmake", "3.19") @pytest.mark.parametrize("op_system,os_version,sdk,arch", [ ("watchOS", "8.1", "watchos", "armv7k"), ("tvOS", "13.2", "appletvos", "armv8") diff --git a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py index 9cfd841a815..cc14237219c 100644 --- a/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py +++ b/test/functional/toolchains/gnu/autotools/test_apple_toolchain.py @@ -92,12 +92,12 @@ def test_catalyst(arch): include(default) [settings] os = Macos - os.version = 14.0 + os.version = 14.6 os.subsystem = catalyst os.subsystem.ios_version = 16.1 arch = {arch} [buildenv] - DEVELOPER_DIR=/Applications/conan/xcode/15.1 + DEVELOPER_DIR=/Applications/Xcode_15.4.app/Contents/Developer """).format(arch=arch) t = TestClient() diff --git a/test/functional/toolchains/gnu/test_v2_autotools_template.py b/test/functional/toolchains/gnu/test_v2_autotools_template.py index afd56049d6b..f56d77ce5c3 100644 --- a/test/functional/toolchains/gnu/test_v2_autotools_template.py +++ b/test/functional/toolchains/gnu/test_v2_autotools_template.py @@ -118,8 +118,10 @@ def test_autotools_relocatable_libs_darwin(): assert "hello/0.1: Hello World Release!" in client.out +# FIXME: investigate this test @pytest.mark.skipif(platform.system() not in ["Darwin"], reason="Requires Autotools") @pytest.mark.tool("autotools") +@pytest.mark.xfail(reason="This test is failing for newer MacOS versions, but used to pass in the ci") def test_autotools_relocatable_libs_darwin_downloaded(): client = TestClient(default_server_user=True, path_with_spaces=False) client2 = TestClient(servers=client.servers, path_with_spaces=False) @@ -139,7 +141,7 @@ class GreetConan(ConanFile): version = "1.0" settings = "os", "compiler", "build_type", "arch" exports_sources = "configure.ac", "Makefile.am", "main.cpp" - generators = "AutotoolsDeps", "AutotoolsToolchain" + generators = "AutotoolsDeps", "AutotoolsToolchain", "VirtualRunEnv" def requirements(self): self.requires("hello/0.1") @@ -181,7 +183,12 @@ def build(self): client2.run("install . -o hello/*:shared=True -r default") client2.run("build . -o hello/*:shared=True -r default") + # for some reason this is failing for newer macos + # although -Wl,-rpath -Wl, if passed to set the rpath when building + # it fails with LC_RPATH's not found client2.run_command("build-release/greet") + # activating the environment should not be needed as the rpath is set when linking greet + #client2.run_command(". build-release/conan/conanrun.sh && build-release/greet") assert "Hello World Release!" in client2.out diff --git a/test/functional/toolchains/meson/_base.py b/test/functional/toolchains/meson/_base.py index df22c417a51..4d2d8c5a896 100644 --- a/test/functional/toolchains/meson/_base.py +++ b/test/functional/toolchains/meson/_base.py @@ -23,7 +23,7 @@ def _check_binary(self): if platform.system() == "Darwin": self.assertIn(f"main {arch_macro['gcc'][host_arch]} defined", self.t.out) self.assertIn("main __apple_build_version__", self.t.out) - self.assertIn("main __clang_major__13", self.t.out) + self.assertIn("main __clang_major__15", self.t.out) # TODO: check why __clang_minor__ seems to be not defined in XCode 12 # commented while migrating to XCode12 CI # self.assertIn("main __clang_minor__0", self.t.out) diff --git a/test/functional/tools_versions_test.py b/test/functional/tools_versions_test.py index 6e2947e380d..91617ae3449 100644 --- a/test/functional/tools_versions_test.py +++ b/test/functional/tools_versions_test.py @@ -16,13 +16,15 @@ def test_default_cmake(self): client.run_command('cmake --version') default_cmake_version = tools_locations["cmake"]["default"] assert "cmake version {}".format(default_cmake_version) in client.out - + + @pytest.mark.skipif(platform.system() == "Darwin", reason="3.16 not installed in MacOS") @pytest.mark.tool("cmake", "3.16") def test_custom_cmake_3_16(self): client = TestClient() client.run_command('cmake --version') assert "cmake version 3.16" in client.out + @pytest.mark.skipif(platform.system() == "Darwin", reason="3.17 not installed in MacOS") @pytest.mark.tool("cmake", "3.17") def test_custom_cmake_3_17(self): client = TestClient()