mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 11:58:41 +00:00
- Add kata-runtime - Add unit test - Add Makefile to build cli Fixes: #33 Signed-off-by: Julio Montes <julio.montes@intel.com> Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com> Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
24 lines
616 B
Bash
Executable File
24 lines
616 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) 2018 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
go_packages=.
|
|
|
|
candidates=`go list -f '{{.Dir}}/*.go' $go_packages`
|
|
for f in $candidates; do
|
|
filename=`basename $f`
|
|
# skip exit.go where, the only file we should call os.Exit() from.
|
|
[[ $filename == "exit.go" ]] && continue
|
|
# skip exit_test.go
|
|
[[ $filename == "exit_test.go" ]] && continue
|
|
# skip main_test.go
|
|
[[ $filename == "main_test.go" ]] && continue
|
|
files="$f $files"
|
|
done
|
|
|
|
if egrep -n '\<os\.Exit\>' $files; then
|
|
echo "Direct calls to os.Exit() are forbidden, please use exit() so atexit() works"
|
|
exit 1
|
|
fi
|