test: add container support
This commit is contained in:
parent
e99b7edb8e
commit
fcc67da9f4
5 changed files with 129 additions and 1 deletions
|
|
@ -25,6 +25,14 @@
|
|||
# This starts the testing VM and drops you into a Python REPL where you can
|
||||
# manually execute the tests from ./tests.py
|
||||
#
|
||||
# Run a test scenario in a container
|
||||
# sudo ./run-tests.sh [--scenario <scenario>] container
|
||||
#
|
||||
# This is useful for quick experiments; containers start much faster than VMs.
|
||||
# Running the Python test suite in containers is not yet supported.
|
||||
# For now, creating NixOS containers requires root permissions.
|
||||
# See ./lib/make-container.sh for a complete documentation.
|
||||
#
|
||||
# To add custom scenarios, set the environment variable `scenarioOverridesFile`.
|
||||
|
||||
set -eo pipefail
|
||||
|
|
@ -108,6 +116,10 @@ debug() {
|
|||
run --interactive
|
||||
}
|
||||
|
||||
container() {
|
||||
. "$testDir/lib/make-container.sh" "$@"
|
||||
}
|
||||
|
||||
# Run the test by building the test derivation
|
||||
buildTest() {
|
||||
if [[ $outLinkPrefix ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue