Fix skip message for missing emulators

Этот коммит содержится в:
Elliott Sales de Andrade 2022-08-08 01:53:48 -04:00 коммит произвёл Ron Evans
родитель f34a0d44ca
коммит e70dfa4dd6

Просмотреть файл

@ -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)