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