tstest/integration/vms: verbosify nixos logs to fs, disable unstable (#2294)
This puts nix build logs on the filesystem so that we can debug them later. This also disables nixos unstable until https://github.com/NixOS/nixpkgs/issues/128783 is fixed. Signed-off-by: Christine Dodrill <xe@tailscale.com>
This commit is contained in:

committed by
GitHub

parent
6b9f8208f4
commit
5813da885c
@ -8,9 +8,11 @@ package vms
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"text/template"
|
||||
|
||||
@ -190,7 +192,15 @@ func makeNixOSImage(t *testing.T, d Distro, cdir string, bins *integration.Binar
|
||||
cmd.Stdout = logger.FuncWriter(t.Logf)
|
||||
cmd.Stderr = logger.FuncWriter(t.Logf)
|
||||
} else {
|
||||
t.Log("building nixos image...")
|
||||
fname := fmt.Sprintf("nix-build-%s-%s", os.Getenv("GITHUB_RUN_NUMBER"), strings.Replace(t.Name(), "/", "-", -1))
|
||||
t.Logf("writing nix logs to %s", fname)
|
||||
fout, err := os.Create(fname)
|
||||
if err != nil {
|
||||
t.Fatalf("can't make log file for nix build: %v", err)
|
||||
}
|
||||
cmd.Stdout = fout
|
||||
cmd.Stderr = fout
|
||||
defer fout.Close()
|
||||
}
|
||||
cmd.Env = append(os.Environ(), "NIX_PATH=nixpkgs="+d.url)
|
||||
cmd.Dir = outpath
|
||||
|
Reference in New Issue
Block a user