github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/pkg/mount/mount_integration_test.go (about) 1 // Copyright 2019 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 // +build !race 6 7 package mount 8 9 import ( 10 "testing" 11 12 "github.com/u-root/u-root/pkg/qemu" 13 "github.com/u-root/u-root/pkg/vmtest" 14 ) 15 16 func TestIntegration(t *testing.T) { 17 o := &vmtest.Options{ 18 QEMUOpts: qemu.Options{ 19 Devices: []qemu.Device{ 20 // CONFIG_ATA_PIIX is required for this option to work. 21 qemu.ArbitraryArgs{"-hda", "testdata/1MB.ext4_vfat"}, 22 qemu.ArbitraryArgs{"-hdb", "testdata/12Kzeros"}, 23 qemu.ArbitraryArgs{"-hdc", "testdata/gptdisk"}, 24 qemu.ArbitraryArgs{"-drive", "file=testdata/gptdisk2,if=none,id=NVME1"}, 25 qemu.ArbitraryArgs{"-device", "nvme,drive=NVME1,serial=nvme-1"}, 26 }, 27 }, 28 } 29 vmtest.GolangTest(t, []string{"github.com/u-root/u-root/pkg/mount"}, o) 30 }