github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/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 provided") 16 } 17 if len(os.Getenv("UROOT_QEMU")) == 0 { 18 log.Fatalf("Failed to run tests: no QEMU binary provided") 19 } 20 21 log.Printf("Starting generic tests...") 22 23 os.Exit(m.Run()) 24 }