Parameterize venv and source paths more
This commit is contained in:
parent
f5765acdb8
commit
904a175be4
|
@ -89,6 +89,8 @@ jobs:
|
||||||
name: "Setup virtualenv"
|
name: "Setup virtualenv"
|
||||||
command: |
|
command: |
|
||||||
sudo --set-home -u nobody /tmp/project/.circleci/setup-virtualenv.sh \
|
sudo --set-home -u nobody /tmp/project/.circleci/setup-virtualenv.sh \
|
||||||
|
"/tmp/venv" \
|
||||||
|
"/tmp/project" \
|
||||||
"${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
"${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
||||||
"${TAHOE_LAFS_TOX_ARGS}"
|
"${TAHOE_LAFS_TOX_ARGS}"
|
||||||
|
|
||||||
|
@ -96,6 +98,8 @@ jobs:
|
||||||
name: "Run test suite"
|
name: "Run test suite"
|
||||||
command: |
|
command: |
|
||||||
/tmp/project/.circleci/run-tests.sh \
|
/tmp/project/.circleci/run-tests.sh \
|
||||||
|
"/tmp/venv" \
|
||||||
|
"/tmp/project" \
|
||||||
"${ARTIFACTS_OUTPUT_PATH}" \
|
"${ARTIFACTS_OUTPUT_PATH}" \
|
||||||
"${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
"${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
||||||
"${TAHOE_LAFS_TOX_ARGS}"
|
"${TAHOE_LAFS_TOX_ARGS}"
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# The filesystem location of the root of a virtualenv we can use to get/build
|
||||||
|
# wheels.
|
||||||
|
BOOTSTRAP_VENV="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
# The filesystem location of the root of the project source. We need this to
|
||||||
|
# know what wheels to get/build, of course.
|
||||||
|
PROJECT_ROOT="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
ARTIFACTS=$1
|
ARTIFACTS=$1
|
||||||
shift
|
shift
|
||||||
|
@ -40,8 +53,8 @@ sudo \
|
||||||
PIP_NO_INDEX="1" \
|
PIP_NO_INDEX="1" \
|
||||||
--set-home \
|
--set-home \
|
||||||
--user nobody \
|
--user nobody \
|
||||||
/tmp/tests/bin/tox \
|
${BOOTSTRAP_VENV}/bin/tox \
|
||||||
-c /tmp/project/tox.ini \
|
-c ${PROJECT_ROOT}/tox.ini \
|
||||||
--workdir /tmp/tahoe-lafs.tox \
|
--workdir /tmp/tahoe-lafs.tox \
|
||||||
-e "${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
-e "${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
||||||
${TAHOE_LAFS_TOX_ARGS}
|
${TAHOE_LAFS_TOX_ARGS}
|
||||||
|
@ -49,5 +62,5 @@ sudo \
|
||||||
if [ -n "${ARTIFACTS}" ]; then
|
if [ -n "${ARTIFACTS}" ]; then
|
||||||
# Create a junitxml results area.
|
# Create a junitxml results area.
|
||||||
mkdir -p "$(dirname "${JUNITXML}")"
|
mkdir -p "$(dirname "${JUNITXML}")"
|
||||||
/tmp/tests/bin/subunit2junitxml < "${SUBUNIT2}" > "${JUNITXML}"
|
${BOOTSTRAP_VENV}/bin/subunit2junitxml < "${SUBUNIT2}" > "${JUNITXML}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# The filesystem location of the root of a virtualenv we can use to get/build
|
||||||
|
# wheels.
|
||||||
|
BOOTSTRAP_VENV="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
# The filesystem location of the root of the project source. We need this to
|
||||||
|
# know what wheels to get/build, of course.
|
||||||
|
PROJECT_ROOT="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
TAHOE_LAFS_TOX_ENVIRONMENT=$1
|
TAHOE_LAFS_TOX_ENVIRONMENT=$1
|
||||||
shift
|
shift
|
||||||
|
@ -7,8 +20,8 @@ TAHOE_LAFS_TOX_ARGS=$1
|
||||||
shift || :
|
shift || :
|
||||||
|
|
||||||
# Get everything else installed in it, too.
|
# Get everything else installed in it, too.
|
||||||
/tmp/tests/bin/tox \
|
"${BOOTSTRAP_VENV}"/bin/tox \
|
||||||
-c /tmp/project/tox.ini \
|
-c "${PROJECT_ROOT}"/tox.ini \
|
||||||
--workdir /tmp/tahoe-lafs.tox \
|
--workdir /tmp/tahoe-lafs.tox \
|
||||||
--notest \
|
--notest \
|
||||||
-e "${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
-e "${TAHOE_LAFS_TOX_ENVIRONMENT}" \
|
||||||
|
|
Loading…
Reference in New Issue