From a4e1c1a91f02346706b9c40d4180d0d0356e78cf Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Thu, 4 Jul 2024 13:35:09 +0200 Subject: [PATCH 1/2] docker version upgraded --- conans/requirements_dev.txt | 2 +- conans/requirements_runner.txt | 2 +- test/integration/command/runner_test.py | 42 ++++++++++++------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/conans/requirements_dev.txt b/conans/requirements_dev.txt index c81ee6c559c..4e26ce16c55 100644 --- a/conans/requirements_dev.txt +++ b/conans/requirements_dev.txt @@ -6,5 +6,5 @@ WebTest>=2.0.18, <2.1.0 bottle PyJWT pluginbase -docker>=5.0.0, <6.0.0 +docker setuptools \ No newline at end of file diff --git a/conans/requirements_runner.txt b/conans/requirements_runner.txt index ac5f6f5065e..1de3054de20 100644 --- a/conans/requirements_runner.txt +++ b/conans/requirements_runner.txt @@ -1,2 +1,2 @@ paramiko -docker>=5.0.0, <6.0.0 +docker>=7.1.0 diff --git a/test/integration/command/runner_test.py b/test/integration/command/runner_test.py index d27001414f3..11333021e08 100644 --- a/test/integration/command/runner_test.py +++ b/test/integration/command/runner_test.py @@ -36,7 +36,7 @@ def dockerfile_path(name=None): return path -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared(): """ Tests the ``conan create . `` @@ -73,13 +73,13 @@ def test_create_docker_runner_cache_shared(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host -pr:b build") + client.run("create . -pr:h host -pr:b build -vvv") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared_profile_from_cache(): """ Tests the ``conan create . `` @@ -116,13 +116,13 @@ def test_create_docker_runner_cache_shared_profile_from_cache(): client.save({"default_host": profile_host, "default_build": profile_build}, path=client.cache.profiles_path) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h default_host -pr:b default_build") + client.run("create . -pr:h default_host -pr:b default_build -vvv") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared_profile_folder(): """ Tests the ``conan create . `` @@ -160,12 +160,12 @@ def test_create_docker_runner_cache_shared_profile_folder(): client.save({"build": profile_build}) client.save({"docker_default": profile_host}, path = os.path.join(client.cache_folder, "profiles")) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h docker_default -pr:b build") + client.run("create . -pr:h docker_default -pr:b build -vvv") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_dockerfile_folder_path(): """ Tests the ``conan create . `` @@ -220,14 +220,14 @@ def test_create_docker_runner_dockerfile_folder_path(): client.save({"host_copy": profile_host_copy, "host_clean": profile_host_clean, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_copy -pr:b build") + client.run("create . -pr:h host_copy -pr:b build -vvv") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe metadata" in client.out assert "Removing container" in client.out - client.run("create . -pr:h host_clean -pr:b build") + client.run("create . -pr:h host_clean -pr:b build -vvv") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out @@ -235,7 +235,7 @@ def test_create_docker_runner_dockerfile_folder_path(): assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_profile_default_folder(): """ Tests the ``conan create . `` @@ -271,7 +271,7 @@ def test_create_docker_runner_profile_default_folder(): client.save({"host_from_profile": profile_host}, path = os.path.join(client.cache_folder, "profiles")) client.save({"build_from_profile": profile_build}, path = os.path.join(client.cache_folder, "profiles")) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_from_profile -pr:b build_from_profile") + client.run("create . -pr:h host_from_profile -pr:b build_from_profile -vvv") assert "Container conan-runner-docker running" in client.out assert "Restore: pkg/0.2" in client.out @@ -280,7 +280,7 @@ def test_create_docker_runner_profile_default_folder(): assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_dockerfile_file_path(): """ Tests the ``conan create . `` @@ -315,7 +315,7 @@ def test_create_docker_runner_dockerfile_file_path(): """) client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host -pr:b build") + client.run("create . -pr:h host -pr:b build -vvv") assert "Container conan-runner-docker running" in client.out assert "Restore: pkg/0.2" in client.out @@ -324,7 +324,7 @@ def test_create_docker_runner_dockerfile_file_path(): assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") @pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)]) @pytest.mark.tool("ninja") def test_create_docker_runner_with_ninja(build_type, shared): @@ -385,11 +385,11 @@ def package(self): client.save({"profile": profile}) settings = "-s os=Linux -s arch=x86_64 -s build_type={} -o hello/*:shared={}".format(build_type, shared) # create should also work - client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings)) + client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings -vvv)) assert 'cmake -G "Ninja"' in client.out assert "main: {}!".format(build_type) in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_from_configfile(): """ Tests the ``conan create . `` @@ -434,7 +434,7 @@ def test_create_docker_runner_from_configfile(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h 'host' -pr:b 'build'") + client.run("create . -pr:h 'host' -pr:b 'build' -vvv") assert "Container my-custom-conan-runner-container running" in client.out assert "Restore: pkg/0.2" in client.out @@ -443,7 +443,7 @@ def test_create_docker_runner_from_configfile(): assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_from_configfile_with_args(): """ Tests the ``conan create . `` @@ -490,7 +490,7 @@ def test_create_docker_runner_from_configfile_with_args(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h 'host' -pr:b 'build'") + client.run("create . -pr:h 'host' -pr:b 'build' -vvv") assert "test/integration/command/dockerfiles/Dockerfile_args" in client.out assert "Restore: pkg/0.2" in client.out @@ -499,7 +499,7 @@ def test_create_docker_runner_from_configfile_with_args(): assert "Removing container" in client.out -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_default_build_profile(): """ Tests the ``conan create . `` @@ -526,7 +526,7 @@ def test_create_docker_runner_default_build_profile(): client.save({"host_clean": profile_host}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_clean") + client.run("create . -pr:h host_clean -vvv") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out From 77391c70de50047c1d880f5160e2acceec2203d8 Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Wed, 10 Jul 2024 08:25:49 +0200 Subject: [PATCH 2/2] runner_test.py moved to functional --- .../command/dockerfiles/Dockerfile | 0 .../command/dockerfiles/Dockerfile_args | 0 .../command/dockerfiles/Dockerfile_ninja | 0 .../dockerfiles/Dockerfile_profile_detect | 0 .../command/dockerfiles/Dockerfile_test | 0 .../command/runner_test.py | 44 +++++++++---------- 6 files changed, 22 insertions(+), 22 deletions(-) rename test/{integration => functional}/command/dockerfiles/Dockerfile (100%) rename test/{integration => functional}/command/dockerfiles/Dockerfile_args (100%) rename test/{integration => functional}/command/dockerfiles/Dockerfile_ninja (100%) rename test/{integration => functional}/command/dockerfiles/Dockerfile_profile_detect (100%) rename test/{integration => functional}/command/dockerfiles/Dockerfile_test (100%) rename test/{integration => functional}/command/runner_test.py (90%) diff --git a/test/integration/command/dockerfiles/Dockerfile b/test/functional/command/dockerfiles/Dockerfile similarity index 100% rename from test/integration/command/dockerfiles/Dockerfile rename to test/functional/command/dockerfiles/Dockerfile diff --git a/test/integration/command/dockerfiles/Dockerfile_args b/test/functional/command/dockerfiles/Dockerfile_args similarity index 100% rename from test/integration/command/dockerfiles/Dockerfile_args rename to test/functional/command/dockerfiles/Dockerfile_args diff --git a/test/integration/command/dockerfiles/Dockerfile_ninja b/test/functional/command/dockerfiles/Dockerfile_ninja similarity index 100% rename from test/integration/command/dockerfiles/Dockerfile_ninja rename to test/functional/command/dockerfiles/Dockerfile_ninja diff --git a/test/integration/command/dockerfiles/Dockerfile_profile_detect b/test/functional/command/dockerfiles/Dockerfile_profile_detect similarity index 100% rename from test/integration/command/dockerfiles/Dockerfile_profile_detect rename to test/functional/command/dockerfiles/Dockerfile_profile_detect diff --git a/test/integration/command/dockerfiles/Dockerfile_test b/test/functional/command/dockerfiles/Dockerfile_test similarity index 100% rename from test/integration/command/dockerfiles/Dockerfile_test rename to test/functional/command/dockerfiles/Dockerfile_test diff --git a/test/integration/command/runner_test.py b/test/functional/command/runner_test.py similarity index 90% rename from test/integration/command/runner_test.py rename to test/functional/command/runner_test.py index 11333021e08..fb601288aeb 100644 --- a/test/integration/command/runner_test.py +++ b/test/functional/command/runner_test.py @@ -36,7 +36,7 @@ def dockerfile_path(name=None): return path -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared(): """ Tests the ``conan create . `` @@ -73,13 +73,13 @@ def test_create_docker_runner_cache_shared(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host -pr:b build -vvv") + client.run("create . -pr:h host -pr:b build") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared_profile_from_cache(): """ Tests the ``conan create . `` @@ -116,13 +116,13 @@ def test_create_docker_runner_cache_shared_profile_from_cache(): client.save({"default_host": profile_host, "default_build": profile_build}, path=client.cache.profiles_path) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h default_host -pr:b default_build -vvv") + client.run("create . -pr:h default_host -pr:b default_build") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_cache_shared_profile_folder(): """ Tests the ``conan create . `` @@ -160,12 +160,12 @@ def test_create_docker_runner_cache_shared_profile_folder(): client.save({"build": profile_build}) client.save({"docker_default": profile_host}, path = os.path.join(client.cache_folder, "profiles")) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h docker_default -pr:b build -vvv") + client.run("create . -pr:h docker_default -pr:b build") assert "[100%] Built target example" in client.out assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_dockerfile_folder_path(): """ Tests the ``conan create . `` @@ -220,14 +220,14 @@ def test_create_docker_runner_dockerfile_folder_path(): client.save({"host_copy": profile_host_copy, "host_clean": profile_host_clean, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_copy -pr:b build -vvv") + client.run("create . -pr:h host_copy -pr:b build") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe metadata" in client.out assert "Removing container" in client.out - client.run("create . -pr:h host_clean -pr:b build -vvv") + client.run("create . -pr:h host_clean -pr:b build") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out @@ -235,7 +235,7 @@ def test_create_docker_runner_dockerfile_folder_path(): assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_profile_default_folder(): """ Tests the ``conan create . `` @@ -271,7 +271,7 @@ def test_create_docker_runner_profile_default_folder(): client.save({"host_from_profile": profile_host}, path = os.path.join(client.cache_folder, "profiles")) client.save({"build_from_profile": profile_build}, path = os.path.join(client.cache_folder, "profiles")) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_from_profile -pr:b build_from_profile -vvv") + client.run("create . -pr:h host_from_profile -pr:b build_from_profile") assert "Container conan-runner-docker running" in client.out assert "Restore: pkg/0.2" in client.out @@ -280,7 +280,7 @@ def test_create_docker_runner_profile_default_folder(): assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_dockerfile_file_path(): """ Tests the ``conan create . `` @@ -315,7 +315,7 @@ def test_create_docker_runner_dockerfile_file_path(): """) client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host -pr:b build -vvv") + client.run("create . -pr:h host -pr:b build") assert "Container conan-runner-docker running" in client.out assert "Restore: pkg/0.2" in client.out @@ -324,7 +324,7 @@ def test_create_docker_runner_dockerfile_file_path(): assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") @pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)]) @pytest.mark.tool("ninja") def test_create_docker_runner_with_ninja(build_type, shared): @@ -385,11 +385,11 @@ def package(self): client.save({"profile": profile}) settings = "-s os=Linux -s arch=x86_64 -s build_type={} -o hello/*:shared={}".format(build_type, shared) # create should also work - client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings -vvv)) + client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings)) assert 'cmake -G "Ninja"' in client.out assert "main: {}!".format(build_type) in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_from_configfile(): """ Tests the ``conan create . `` @@ -434,7 +434,7 @@ def test_create_docker_runner_from_configfile(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h 'host' -pr:b 'build' -vvv") + client.run("create . -pr:h 'host' -pr:b 'build'") assert "Container my-custom-conan-runner-container running" in client.out assert "Restore: pkg/0.2" in client.out @@ -443,7 +443,7 @@ def test_create_docker_runner_from_configfile(): assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_from_configfile_with_args(): """ Tests the ``conan create . `` @@ -490,16 +490,16 @@ def test_create_docker_runner_from_configfile_with_args(): client.save({"host": profile_host, "build": profile_build}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h 'host' -pr:b 'build' -vvv") + client.run("create . -pr:h 'host' -pr:b 'build'") - assert "test/integration/command/dockerfiles/Dockerfile_args" in client.out + assert "command/dockerfiles/Dockerfile_args" in client.out assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe metadata" in client.out assert "Removing container" in client.out -# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") +@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") def test_create_docker_runner_default_build_profile(): """ Tests the ``conan create . `` @@ -526,7 +526,7 @@ def test_create_docker_runner_default_build_profile(): client.save({"host_clean": profile_host}) client.run("new cmake_lib -d name=pkg -d version=0.2") - client.run("create . -pr:h host_clean -vvv") + client.run("create . -pr:h host_clean") assert "Restore: pkg/0.2" in client.out assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out