|
7 | 7 | from conan.test.assets.sources import gen_function_h, gen_function_cpp |
8 | 8 |
|
9 | 9 |
|
10 | | -def docker_skip(test_image=None): |
| 10 | +def docker_skip(test_image='ubuntu:22.04'): |
11 | 11 | try: |
12 | 12 | try: |
13 | 13 | docker_client = docker.from_env() |
@@ -37,7 +37,7 @@ def dockerfile_path(name=None): |
37 | 37 |
|
38 | 38 |
|
39 | 39 | @pytest.mark.docker_runner |
40 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 40 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
41 | 41 | def test_create_docker_runner_cache_shared(): |
42 | 42 | """ |
43 | 43 | Tests the ``conan create . `` |
@@ -81,7 +81,7 @@ def test_create_docker_runner_cache_shared(): |
81 | 81 |
|
82 | 82 |
|
83 | 83 | @pytest.mark.docker_runner |
84 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 84 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
85 | 85 | def test_create_docker_runner_cache_shared_profile_from_cache(): |
86 | 86 | """ |
87 | 87 | Tests the ``conan create . `` |
@@ -125,7 +125,7 @@ def test_create_docker_runner_cache_shared_profile_from_cache(): |
125 | 125 |
|
126 | 126 |
|
127 | 127 | @pytest.mark.docker_runner |
128 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 128 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
129 | 129 | def test_create_docker_runner_cache_shared_profile_folder(): |
130 | 130 | """ |
131 | 131 | Tests the ``conan create . `` |
@@ -169,7 +169,7 @@ def test_create_docker_runner_cache_shared_profile_folder(): |
169 | 169 | assert "Removing container" in client.out |
170 | 170 |
|
171 | 171 | @pytest.mark.docker_runner |
172 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 172 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
173 | 173 | def test_create_docker_runner_dockerfile_folder_path(): |
174 | 174 | """ |
175 | 175 | Tests the ``conan create . `` |
@@ -240,7 +240,7 @@ def test_create_docker_runner_dockerfile_folder_path(): |
240 | 240 |
|
241 | 241 |
|
242 | 242 | @pytest.mark.docker_runner |
243 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 243 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
244 | 244 | def test_create_docker_runner_profile_default_folder(): |
245 | 245 | """ |
246 | 246 | Tests the ``conan create . `` |
@@ -286,7 +286,7 @@ def test_create_docker_runner_profile_default_folder(): |
286 | 286 |
|
287 | 287 |
|
288 | 288 | @pytest.mark.docker_runner |
289 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 289 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
290 | 290 | def test_create_docker_runner_dockerfile_file_path(): |
291 | 291 | """ |
292 | 292 | Tests the ``conan create . `` |
@@ -331,7 +331,7 @@ def test_create_docker_runner_dockerfile_file_path(): |
331 | 331 |
|
332 | 332 |
|
333 | 333 | @pytest.mark.docker_runner |
334 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 334 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
335 | 335 | @pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)]) |
336 | 336 | def test_create_docker_runner_with_ninja(build_type, shared): |
337 | 337 | conanfile = textwrap.dedent(""" |
@@ -396,7 +396,7 @@ def package(self): |
396 | 396 | assert "main: {}!".format(build_type) in client.out |
397 | 397 |
|
398 | 398 | @pytest.mark.docker_runner |
399 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 399 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
400 | 400 | def test_create_docker_runner_from_configfile(): |
401 | 401 | """ |
402 | 402 | Tests the ``conan create . `` |
@@ -451,7 +451,7 @@ def test_create_docker_runner_from_configfile(): |
451 | 451 |
|
452 | 452 |
|
453 | 453 | @pytest.mark.docker_runner |
454 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 454 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
455 | 455 | def test_create_docker_runner_from_configfile_with_args(): |
456 | 456 | """ |
457 | 457 | Tests the ``conan create . `` |
@@ -515,7 +515,7 @@ def test_create_docker_runner_from_configfile_with_args(): |
515 | 515 | docker_client.networks.get("my-network").remove() |
516 | 516 |
|
517 | 517 | @pytest.mark.docker_runner |
518 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 518 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
519 | 519 | def test_create_docker_runner_default_build_profile(): |
520 | 520 | """ |
521 | 521 | Tests the ``conan create . `` |
@@ -552,7 +552,7 @@ def test_create_docker_runner_default_build_profile(): |
552 | 552 |
|
553 | 553 |
|
554 | 554 | @pytest.mark.docker_runner |
555 | | -@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running") |
| 555 | +@pytest.mark.skipif(docker_skip(), reason="Only docker running") |
556 | 556 | def test_create_docker_runner_in_subfolder(): |
557 | 557 | client = TestClient() |
558 | 558 | conanfile = textwrap.dedent(""" |
|
0 commit comments