Merge pull request #2481 from Bevisy/main-1494

Makefile: update `make go-test` call
This commit is contained in:
Fupan Li
2021-12-24 09:57:06 +08:00
committed by GitHub
3 changed files with 4 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
#!/bin/bash
# #
# Copyright (c) 2020 Intel Corporation # Copyright (c) 2020 Intel Corporation
# #

View File

@@ -588,14 +588,12 @@ test: install-hook go-test
install-hook: install-hook:
make -C virtcontainers hook make -C virtcontainers hook
ifeq ($(shell id -u), 0)
echo "installing mock hook" echo "installing mock hook"
make -C virtcontainers install sudo -E make -C virtcontainers install
endif
go-test: $(GENERATED_FILES) go-test: $(GENERATED_FILES)
go clean -testcache go clean -testcache
go test -v -mod=vendor ./... $(QUIET_TEST)../../ci/go-test.sh
fast-test: $(GENERATED_FILES) fast-test: $(GENERATED_FILES)
go clean -testcache go clean -testcache

View File

@@ -36,6 +36,7 @@ func (tty *ttyIO) close() {
if tty.Stdin != nil { if tty.Stdin != nil {
tty.Stdin.Close() tty.Stdin.Close()
tty.Stdin = nil
} }
cf := func(w io.Writer) { cf := func(w io.Writer) {
if w == nil { if w == nil {
@@ -111,7 +112,6 @@ func ioCopy(exitch, stdinCloser chan struct{}, tty *ttyIO, stdinPipe io.WriteClo
if tty.Stdin != nil { if tty.Stdin != nil {
// close stdin to make the other routine stop // close stdin to make the other routine stop
tty.Stdin.Close() tty.Stdin.Close()
tty.Stdin = nil
} }
}() }()
} }