tests: add example scripts
This commit is contained in:
parent
ff94985b8b
commit
3403795c86
@ -17,6 +17,8 @@ if [[ ! -v IN_NIX_SHELL ]]; then
|
|||||||
exec nix-shell --run "./${BASH_SOURCE[0]##*/} $*"
|
exec nix-shell --run "./${BASH_SOURCE[0]##*/} $*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd "${BASH_SOURCE[0]%/*}"
|
||||||
|
|
||||||
tmpDir=/tmp/nix-bitcoin-qemu-vm
|
tmpDir=/tmp/nix-bitcoin-qemu-vm
|
||||||
mkdir -p $tmpDir
|
mkdir -p $tmpDir
|
||||||
|
|
||||||
|
@ -202,13 +202,29 @@ basic() {
|
|||||||
pkgsUnstable
|
pkgsUnstable
|
||||||
}
|
}
|
||||||
|
|
||||||
all() {
|
# All tests that only consist of building a nix derivation.
|
||||||
|
# Their output is cached in /nix/store.
|
||||||
|
buildable() {
|
||||||
basic
|
basic
|
||||||
scenario=full buildTest "$@"
|
scenario=full buildTest "$@"
|
||||||
scenario=regtest buildTest "$@"
|
scenario=regtest buildTest "$@"
|
||||||
scenario=hardened buildTest "$@"
|
scenario=hardened buildTest "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
examples() {
|
||||||
|
script="
|
||||||
|
set -e
|
||||||
|
./deploy-container.sh
|
||||||
|
./deploy-qemu-vm.sh
|
||||||
|
"
|
||||||
|
(cd $scriptDir/../examples && nix-shell --run "$script")
|
||||||
|
}
|
||||||
|
|
||||||
|
all() {
|
||||||
|
buildable
|
||||||
|
examples
|
||||||
|
}
|
||||||
|
|
||||||
# An alias for buildTest
|
# An alias for buildTest
|
||||||
build() {
|
build() {
|
||||||
buildTest "$@"
|
buildTest "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user