From 1be1cfd763e5510796344bc7d1d8a30d364499f0 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Tue, 19 Oct 2021 17:06:27 +0200 Subject: [PATCH] Add additional repos to python path in func tests [noissue] --- .../github/.github/workflows/scripts/script.sh.j2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/github/.github/workflows/scripts/script.sh.j2 b/templates/github/.github/workflows/scripts/script.sh.j2 index fd3ee907..ae2dfe1b 100755 --- a/templates/github/.github/workflows/scripts/script.sh.j2 +++ b/templates/github/.github/workflows/scripts/script.sh.j2 @@ -107,11 +107,13 @@ cmd_prefix bash -c "django-admin makemigrations --check --dry-run" cmd_prefix bash -c "PULP_DATABASES__default__USER=postgres django-admin test --noinput /usr/local/lib/python{{ python_version }}/site-packages/{{ plugin_snake }}/tests/unit/" # Run functional tests -{%- if plugin_name == 'pulpcore' %} -export PYTHONPATH=$REPO_ROOT${PYTHONPATH:+:${PYTHONPATH}} -{%- else %} -export PYTHONPATH=$REPO_ROOT:$REPO_ROOT/../pulpcore${PYTHONPATH:+:${PYTHONPATH}} +{%- for repo in additional_repos %} +export PYTHONPATH=$REPO_ROOT/../{{repo.name}}${PYTHONPATH:+:${PYTHONPATH}} +{%- endfor %} +{%- if not plugin_name == 'pulpcore' %} +export PYTHONPATH=$REPO_ROOT/../pulpcore${PYTHONPATH:+:${PYTHONPATH}} {%- endif %} +export PYTHONPATH=$REPO_ROOT${PYTHONPATH:+:${PYTHONPATH}} {% if upgrade_range %} if [[ "$TEST" == "upgrade" ]]; then