mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
try passing positional args instead
This commit is contained in:
parent
7d74e042a3
commit
9abb323d31
@ -3,6 +3,9 @@
|
|||||||
PROJECT=$1
|
PROJECT=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
EXTRA_PACKAGES=$1
|
||||||
|
shift
|
||||||
|
|
||||||
# Avoid the /nonexistent home directory in nobody's /etc/passwd entry.
|
# Avoid the /nonexistent home directory in nobody's /etc/passwd entry.
|
||||||
usermod --home /tmp/nobody nobody
|
usermod --home /tmp/nobody nobody
|
||||||
|
|
||||||
|
@ -227,17 +227,17 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
<<: *BOOTSTRAP_TEST_ENVIRONMENT
|
<<: *BOOTSTRAP_TEST_ENVIRONMENT
|
||||||
command: |
|
command: |
|
||||||
sudo --preserve-env ~/project/.circleci/bootstrap-test-environment.sh ~/project
|
sudo ~/project/.circleci/bootstrap-test-environment.sh ~/project "${EXTRA_PACKAGES}"
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
<<: *SETUP_VIRTUALENV
|
<<: *SETUP_VIRTUALENV
|
||||||
command: |
|
command: |
|
||||||
sudo --preserve-env /tmp/project/.circleci/setup-virtualenv.sh
|
sudo /tmp/project/.circleci/setup-virtualenv.sh "${TAHOE_LAFS_TOX_ENVIRONMENT}" ${TAHOE_LAFS_TOX_ARGS}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
<<: *RUN_TESTS
|
<<: *RUN_TESTS
|
||||||
command: |
|
command: |
|
||||||
sudo --preserve-env /tmp/project/.circleci/run-tests.sh
|
sudo /tmp/project/.circleci/run-tests.sh "${TAHOE_LAFS_TOX_ENVIRONMENT}" ${TAHOE_LAFS_TOX_ARGS}
|
||||||
|
|
||||||
- store_artifacts: *STORE_TEST_LOG
|
- store_artifacts: *STORE_TEST_LOG
|
||||||
- store_artifacts: *STORE_OTHER_ARTIFACTS
|
- store_artifacts: *STORE_OTHER_ARTIFACTS
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
TAHOE_LAFS_TOX_ENVIRONMENT=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
TAHOE_LAFS_TOX_ARGS=$1
|
||||||
|
shift
|
||||||
|
|
||||||
# Run the test suite as a non-root user. This is the expected usage some
|
# Run the test suite as a non-root user. This is the expected usage some
|
||||||
# small areas of the test suite assume non-root privileges (such as unreadable
|
# small areas of the test suite assume non-root privileges (such as unreadable
|
||||||
# files being unreadable).
|
# files being unreadable).
|
||||||
@ -7,4 +13,4 @@
|
|||||||
# Also run with /tmp as a workdir because the non-root user won't be able to
|
# Also run with /tmp as a workdir because the non-root user won't be able to
|
||||||
# create the tox working filesystem state in the source checkout because it is
|
# create the tox working filesystem state in the source checkout because it is
|
||||||
# owned by root.
|
# owned by root.
|
||||||
sudo --set-home -u nobody /tmp/tests/bin/tox -c /tmp/project/tox.ini --workdir /tmp -e ${TAHOE_LAFS_TOX_ENVIRONMENT}
|
sudo --set-home -u nobody /tmp/tests/bin/tox -c /tmp/project/tox.ini --workdir /tmp -e "${TAHOE_LAFS_TOX_ENVIRONMENT}" ${TAHOE_LAFS_TOX_ARGS}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
TAHOE_LAFS_TOX_ENVIRONMENT=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
TAHOE_LAFS_TOX_ARGS=$1
|
||||||
|
shift
|
||||||
|
|
||||||
# Set up the virtualenv as a non-root user so we can run the test suite as a
|
# Set up the virtualenv as a non-root user so we can run the test suite as a
|
||||||
# non-root user. See below.
|
# non-root user. See below.
|
||||||
sudo --set-home -u nobody virtualenv --python python2.7 /tmp/tests
|
sudo --set-home -u nobody virtualenv --python python2.7 /tmp/tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user