From ee5fc063526ca87069cefcd1b93707a48bfacbab Mon Sep 17 00:00:00 2001 From: John Freeman Date: Tue, 16 Jan 2024 16:01:30 -0600 Subject: [PATCH] Fix Cupcake builder --- tests/conftest.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index c856a62..c3e25b6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,20 +6,6 @@ root = pathlib.Path(__file__).parents[1] -try: - os.symlink( - root / '00-upstream', - root / '02-add-subdirectory/external/00-upstream', - ) -except FileExistsError: - pass -except OSError: - import shutil - shutil.copytree( - root / '00-upstream', - root / '02-add-subdirectory/external/00-upstream', - ) - GENERATOR = [ x.strip() for x in os.getenv('GENERATOR', 'Unix Makefiles,Ninja').split(',') @@ -112,7 +98,7 @@ def install(self, params, source_dir): '--shared' if params['shared'] else '--static', '--prefix', params['install_dir'], ], check=True) - yield build_dir + yield (source_dir, build_dir) def test(self, params, source_dir, build_dir): subprocess.run([ @@ -140,6 +126,19 @@ def one(builder, params, zero): @pytest.fixture(scope='module') def two(builder, params): + try: + os.symlink( + root / '00-upstream', + root / '02-add-subdirectory/external/00-upstream', + ) + except FileExistsError: + pass + except OSError: + import shutil + shutil.copytree( + root / '00-upstream', + root / '02-add-subdirectory/external/00-upstream', + ) yield from builder.install(params, '02-add-subdirectory') @pytest.fixture(scope='module')