debug nixos build
Signed-off-by: Christine Dodrill <xe@tailscale.com>
This commit is contained in:
parent
6f3a5802a6
commit
a5a95b6759
|
@ -1,9 +1,9 @@
|
||||||
name: "integration-vms"
|
name: "integration-vms"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# # NOTE(Xe): uncomment this region when testing the test
|
# NOTE(Xe): uncomment this region when testing the test
|
||||||
# pull_request:
|
pull_request:
|
||||||
# branches: [ main ]
|
branches: [ main ]
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
release:
|
release:
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Download VM Images
|
- name: Download VM Images
|
||||||
run: go test ./tstest/integration/vms -run-vm-tests -run=Download -timeout=60m
|
run: go test ./tstest/integration/vms -run-vm-tests -run=Download -timeout=60m -v -verbose-nix-output -distro-regex nixos
|
||||||
env:
|
env:
|
||||||
XDG_CACHE_HOME: "/var/lib/ghrunner/cache"
|
XDG_CACHE_HOME: "/var/lib/ghrunner/cache"
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,11 @@ package vms
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
|
@ -191,6 +193,14 @@ func makeNixOSImage(t *testing.T, d Distro, cdir string, bins *integration.Binar
|
||||||
cmd.Stderr = logger.FuncWriter(t.Logf)
|
cmd.Stderr = logger.FuncWriter(t.Logf)
|
||||||
} else {
|
} else {
|
||||||
t.Log("building nixos image...")
|
t.Log("building nixos image...")
|
||||||
|
fout, err = os.Create("/var/lib/ghrunner/nix-out-" + strings.Replace(t.Name(), "/", "-", -1))
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
defer fout.Close()
|
||||||
|
cmd.Stdout = fout
|
||||||
|
cmd.Stderr = fout
|
||||||
}
|
}
|
||||||
cmd.Env = append(os.Environ(), "NIX_PATH=nixpkgs="+d.url)
|
cmd.Env = append(os.Environ(), "NIX_PATH=nixpkgs="+d.url)
|
||||||
cmd.Dir = outpath
|
cmd.Dir = outpath
|
||||||
|
|
Loading…
Reference in New Issue