find the project

This commit is contained in:
Jean-Paul Calderone 2018-06-15 15:14:55 -04:00
parent 182d6aec94
commit 9ad7257614
2 changed files with 14 additions and 7 deletions

View File

@ -1,11 +1,14 @@
#!/bin/bash -eo pipefail
PROJECT=$1
shift
# Avoid the /nonexistent home directory in nobody's /etc/passwd entry.
usermod --home /tmp/nobody nobody
# Grant read access to nobody, the user which will eventually try to test this
# checkout.
mv /root/project /tmp/project
mv "${PROJECT}" /tmp/project
# Python build/install toolchain wants to write to the source checkout, too.
chown --recursive nobody:nogroup /tmp/project

View File

@ -62,21 +62,23 @@ jobs:
- run: &BOOTSTRAP_TEST_ENVIRONMENT
name: "Bootstrap test environment"
command: |
~/project/.circleci/bootstrap-test-environment.sh
~/project/.circleci/bootstrap-test-environment.sh ~/project
- run: &SETUP_VIRTUALENV
name: "Setup virtualenv"
# pip cannot install packages if the working directory is not
# readable.
working_directory: "/tmp"
command: "~/project/.circleci/setup-virtualenv.sh"
command: |
~/project/.circleci/setup-virtualenv.sh
- run: &RUN_TESTS
name: "Run test suite"
# Something about when it re-uses an existing environment blows up
# if the working directory is not readable.
working_directory: "/tmp"
command: "~/project/.circleci/setup-virtualenv.sh"
command: |
~/project/.circleci/setup-virtualenv.sh
- store_artifacts: &STORE_TEST_LOG
# Despite passing --workdir /tmp to tox above, it still runs trial
@ -222,15 +224,17 @@ jobs:
- run:
<<: *BOOTSTRAP_TEST_ENVIRONMENT
command: |
sudo ~/project/.circleci/bootstrap-test-environment.sh
sudo ~/project/.circleci/bootstrap-test-environment.sh ~/project
- run:
<<: *SETUP_VIRTUALENV
command: "sudo ~/project/.circleci/setup-virtualenv.sh"
command: |
sudo ~/project/.circleci/setup-virtualenv.sh
- run:
<<: *RUN_TESTS
command: "sudo ~/project/.circleci/setup-virtualenv.sh"
command: |
sudo ~/project/.circleci/setup-virtualenv.sh
- store_artifacts: *STORE_TEST_LOG
- store_artifacts: *STORE_OTHER_ARTIFACTS