mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-12 13:22:28 +00:00
Makefile: update make go-test
call
1. use ci/go-test.sh to replace the direct call to go test 2. fix data race test 3. install hook whether it is root or not Fixes #1494 Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
This commit is contained in:
parent
1b28d7180f
commit
7304e52a59
@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2020 Intel Corporation
|
||||
#
|
||||
|
@ -602,14 +602,12 @@ test: install-hook go-test
|
||||
|
||||
install-hook:
|
||||
make -C virtcontainers hook
|
||||
ifeq ($(shell id -u), 0)
|
||||
echo "installing mock hook"
|
||||
make -C virtcontainers install
|
||||
endif
|
||||
sudo -E make -C virtcontainers install
|
||||
|
||||
go-test: $(GENERATED_FILES)
|
||||
go clean -testcache
|
||||
go test -v -mod=vendor ./...
|
||||
$(QUIET_TEST)../../ci/go-test.sh
|
||||
|
||||
fast-test: $(GENERATED_FILES)
|
||||
go clean -testcache
|
||||
|
@ -36,6 +36,7 @@ func (tty *ttyIO) close() {
|
||||
|
||||
if tty.Stdin != nil {
|
||||
tty.Stdin.Close()
|
||||
tty.Stdin = nil
|
||||
}
|
||||
cf := func(w io.Writer) {
|
||||
if w == nil {
|
||||
@ -111,7 +112,6 @@ func ioCopy(exitch, stdinCloser chan struct{}, tty *ttyIO, stdinPipe io.WriteClo
|
||||
if tty.Stdin != nil {
|
||||
// close stdin to make the other routine stop
|
||||
tty.Stdin.Close()
|
||||
tty.Stdin = nil
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user