aboutsummaryrefslogtreecommitdiff
path: root/releng/release-tests.sh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-09 22:50:51 +0200
committereldritch horrors <pennae@lix.systems>2024-07-09 22:50:51 +0200
commitf5aa5b6815e6cd9194c7dec03651066e4cab5783 (patch)
tree1185f99aba182611b28c00623df04aa503f1afc7 /releng/release-tests.sh
parent4d8c66ec6fee1f476c495297c48e3167fd6378ed (diff)
releng: add releaseTests flake output, test script
this is supposed to be a set of outputs we want to always succeed for releases. sadly we can't add nixos installer tests using lix to these because the nixos test framework does not allow overriding nix in the installer test suites due to unfortunate oversights in the framework. Change-Id: I815520181ccca70a47205d38ba27e73529347f04
Diffstat (limited to 'releng/release-tests.sh')
-rwxr-xr-xreleng/release-tests.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/releng/release-tests.sh b/releng/release-tests.sh
new file mode 100755
index 000000000..c0a9b2e33
--- /dev/null
+++ b/releng/release-tests.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+shopt -s inherit_errexit failglob
+
+nixpkgss=(
+ "$(nix eval --impure --raw --expr '(import ./flake.nix).inputs.nixpkgs.url')"
+ "github:NixOS/nixpkgs/nixos-unstable-small"
+)
+jobs=(
+ $(nix eval \
+ --json --apply '
+ let f = n: t:
+ if builtins.isAttrs t
+ then (if t.type or "" == "derivation"
+ then [ n ]
+ else builtins.concatMap (m: f "${n}.${m}" t.${m}) (builtins.attrNames t))
+ else [];
+ in f ".#.releaseTests"
+ ' \
+ '.#.releaseTests' \
+ | jq -r '.[]'
+ )
+)
+
+for override in "${nixpkgss}"
+do
+ (
+ set -x
+ nix build \
+ --log-format multiline \
+ --no-link \
+ --override-input nixpkgs "$override" \
+ "${jobs[@]}"
+ )
+done