File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euxo pipefail
4+
5+ if [ -L /nix ]; then
6+ echo " fake nix detected, removing"
7+ rm /nix
8+ echo " installing real nix"
9+ sh <( curl --proto ' =https' --tlsv1.2 -sSf -L https://nixos.org/nix/install) --no-daemon
10+ elif [ -d /nix ]; then
11+ echo " real nix detected, nothing to do"
12+ elif [ -a /nix ]; then
13+ echo " /nix exists but is neither directory no symlink, unsure what is happening"
14+ exit 99
15+ else
16+ echo " installing real nix"
17+ sh <( curl --proto ' =https' --tlsv1.2 -sSf -L https://nixos.org/nix/install) --no-daemon
18+ fi
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euxo pipefail
4+
5+ # This script must be run from within a nix shell
6+
7+ # Step 1: check npins
8+
9+ npins verify
10+
11+ # Step 2: build dataplane
12+
13+ mkdir -p results
14+ nix build -f default.nix dataplane-tar --out-link results/dataplane.tar
15+
16+ # Step 3: import dataplane
17+
18+ docker import results/dataplane.tar dataplane:debug
19+
20+ # Step 4: cargo build
21+
22+ cargo build
23+
24+ # Step 5: cargo nextest run
25+
26+ # (one test is xfail)
27+
28+ cargo nextest run || true
29+
30+ # Step 6: cargo test run
31+
32+ # (one test is xfail)
33+
34+ cargo test || true
35+
36+ # Step 7: build test archive
37+
38+ nix build -f default.nix tests.all --out-link results/tests.all
39+ # (one test is xfail)
40+
41+ cargo nextest run --archive-file results/tests.all/* .tar.zst --workspace-remap " $( pwd) " || true
42+
43+ # Step 8: build individual tests archive
44+
45+ nix build -f default.nix tests.pkg --out-link results/tests.pkg --max-jobs 4
46+
47+ for pkg in results/tests.pkg/* /* .tar.zst; do
48+ # (one test is xfail)
49+ cargo nextest run --archive-file " ${pkg} " --workspace-remap " $( pwd) " || true
50+ done
You can’t perform that action at this time.
0 commit comments