2018-06-15 19:17:32 +00:00
|
|
|
#!/bin/bash -e
|
2018-06-15 18:21:33 +00:00
|
|
|
|
2018-06-15 19:40:50 +00:00
|
|
|
TAHOE_LAFS_TOX_ENVIRONMENT=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
TAHOE_LAFS_TOX_ARGS=$1
|
2018-06-15 20:02:49 +00:00
|
|
|
shift || :
|
2018-06-15 19:40:50 +00:00
|
|
|
|
2018-06-15 18:21:33 +00:00
|
|
|
# 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
|
|
|
|
# files being unreadable).
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# owned by root.
|
2018-06-15 19:40:50 +00:00
|
|
|
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}
|