github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/pkg/gpio/gpio_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  //go:build !race
     6  // +build !race
     7  
     8  package gpio
     9  
    10  import (
    11  	"testing"
    12  
    13  	"github.com/mvdan/u-root-coreutils/pkg/qemu"
    14  	"github.com/mvdan/u-root-coreutils/pkg/vmtest"
    15  )
    16  
    17  func TestIntegration(t *testing.T) {
    18  	vmtest.GolangTest(t, []string{"github.com/mvdan/u-root-coreutils/pkg/gpio"}, &vmtest.Options{
    19  		QEMUOpts: qemu.Options{
    20  			// Make GPIOs nums 10 to 20 available through the
    21  			// mockup driver.
    22  			KernelArgs: "gpio-mockup.gpio_mockup_ranges=10,20",
    23  		},
    24  	})
    25  }