mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
Fix skip message for missing emulators
This commit is contained in:
committed by
Ron Evans
parent
f34a0d44ca
commit
e70dfa4dd6
+3
-2
@@ -259,10 +259,11 @@ func emuCheck(t *testing.T, options compileopts.Options) {
|
|||||||
t.Fatal("failed to load target spec:", err)
|
t.Fatal("failed to load target spec:", err)
|
||||||
}
|
}
|
||||||
if spec.Emulator != "" {
|
if spec.Emulator != "" {
|
||||||
_, err := exec.LookPath(strings.SplitN(spec.Emulator, " ", 2)[0])
|
emulatorCommand := strings.SplitN(spec.Emulator, " ", 2)[0]
|
||||||
|
_, err := exec.LookPath(emulatorCommand)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, exec.ErrNotFound) {
|
if errors.Is(err, exec.ErrNotFound) {
|
||||||
t.Skipf("emulator not installed: %q", spec.Emulator[0])
|
t.Skipf("emulator not installed: %q", emulatorCommand)
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Errorf("searching for emulator: %v", err)
|
t.Errorf("searching for emulator: %v", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user