add test 'pkgsUnstable'

Included in 'basic' tests.
Function 'doBuild' is needed by the following commit.
This commit is contained in:
Erik Arvstedt 2020-12-11 13:26:09 +01:00
parent 95bc1237e2
commit a82f0f5f48
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 31 additions and 9 deletions

13
test/pkgs-unstable.nix Normal file
View File

@ -0,0 +1,13 @@
let
pinned = import ../pkgs/nixpkgs-pinned.nix;
pkgs = import pinned.nixpkgs-unstable {};
nbPkgs = import ../pkgs { inherit pkgs; };
pkgsUnstable = with nbPkgs; [
electrs
elementsd
hwi
joinmarket
lightning-loop
];
in
pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable)

View File

@ -132,14 +132,20 @@ container() {
. "$scriptDir/lib/make-container.sh" "$@"
}
doBuild() {
name=$1
shift
if [[ $outLinkPrefix ]]; then
outLink="--out-link $outLinkPrefix-$name"
else
outLink=--no-out-link
fi
nix-build $outLink "$@"
}
# Run the test by building the test derivation
buildTest() {
if [[ $outLinkPrefix ]]; then
buildArgs="--out-link $outLinkPrefix-$scenario"
else
buildArgs=--no-out-link
fi
vmTestNixExpr | nix-build $buildArgs "$@" -
vmTestNixExpr | doBuild $scenario $outLinkArg "$@" -
}
# On continuous integration nodes there are few other processes running alongside the
@ -172,6 +178,10 @@ vmTestNixExpr() {
EOF
}
pkgsUnstable() {
doBuild pkgs-unstable "$scriptDir/pkgs-unstable.nix"
}
# A basic subset of tests to keep the total runtime within
# manageable bounds (<4 min on desktop systems).
# These are also run on the CI server.
@ -179,14 +189,13 @@ basic() {
scenario=default buildTest "$@"
scenario=netns buildTest "$@"
scenario=netnsRegtest buildTest "$@"
pkgsUnstable
}
all() {
scenario=default buildTest "$@"
scenario=netns buildTest "$@"
basic
scenario=full buildTest "$@"
scenario=regtest buildTest "$@"
scenario=netnsRegtest buildTest "$@"
}
# An alias for buildTest