github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/integration/generic-tests/main_test.go (about) 1 // Copyright 2020 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package integration 6 7 import ( 8 "log" 9 "os" 10 "testing" 11 ) 12 13 func TestMain(m *testing.M) { 14 if len(os.Getenv("UROOT_KERNEL")) == 0 { 15 log.Fatalf("Failed to run tests: no kernel provide: source integration/GET_KERNEL_QEMU to get a kernel") 16 } 17 if len(os.Getenv("UROOT_QEMU")) == 0 { 18 log.Fatalf("Failed to run tests: no QEMU binary provided: source integration/GET_KERNEL_QEMU to get a qemu") 19 } 20 21 log.Printf("Starting generic tests...") 22 23 os.Exit(m.Run()) 24 }