Browse code

Removed old methods used for finding binaries, etc

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Steve Kuznetsov authored on 2016/11/08 01:01:20
Showing 4 changed files
... ...
@@ -1082,19 +1082,6 @@ function os::build::get-bin-output-path() {
1082 1082
 }
1083 1083
 readonly -f os::build::get-bin-output-path
1084 1084
 
1085
-# os::build::find-binary locates a locally built binary for the current
1086
-# platform and returns the path to the binary.  The base path to search
1087
-# from will default to the current working directory but can be
1088
-# overridden via the optional second argument.
1089
-function os::build::find-binary() {
1090
-  local bin="$1"
1091
-  local os_root="${2:-}"
1092
-
1093
-  local path=$( (ls -t $(os::build::get-bin-output-path "${os_root}")/${bin}) 2>/dev/null || true | head -1 )
1094
-  echo "$path"
1095
-}
1096
-readonly -f os::build::find-binary
1097
-
1098 1085
 # os::build::environment::create creates a docker container with the default variables.
1099 1086
 # arguments are passed directly to the container, OS_BUILD_ENV_GOLANG, OS_BUILD_ENV_IMAGE,
1100 1087
 # and OS_RELEASE_DOCKER_ARGS can be used to customize the container. The docker socket
... ...
@@ -25,13 +25,3 @@ function os::golang::verify_go_version() {
25 25
 	fi
26 26
 }
27 27
 readonly -f os::golang::verify_go_version
28
-
29
-# os::golang::verify_golint_version ensure the golint tool exists.
30
-function os::golang::verify_golint_version() {
31
-	if ! which golint &>/dev/null; then
32
-		os::log::error "Unable to detect 'golint' package."
33
-		os::log::error "To install it, run: 'go get github.com/golang/lint/golint'."
34
-		return 1
35
-	fi
36
-}
37
-readonly -f os::golang::verify_golint_version
... ...
@@ -109,27 +109,6 @@ function os::util::format_seconds() {
109 109
 }
110 110
 readonly -f os::util::format_seconds
111 111
 
112
-# os::util::find-go-binary locates a go install binary in GOPATH directories
113
-# Globals:
114
-#  - 1: GOPATH
115
-# Arguments:
116
-#  - 1: the go-binary to find
117
-# Return:
118
-#  None
119
-function os::util::find-go-binary() {
120
-  local binary_name="$1"
121
-
122
-  IFS=":"
123
-  for part in $GOPATH; do
124
-  	local binary="${part}/bin/${binary_name}"
125
-    if [[ -f "${binary}" && -x "${binary}" ]]; then
126
-      echo "${binary}"
127
-      break
128
-    fi
129
-  done
130
-}
131
-readonly -f os::util::find-go-binary
132
-
133 112
 # os::util::sed attempts to make our Bash scripts agnostic to the platform
134 113
 # on which they run `sed` by glossing over a discrepancy in flag use in GNU.
135 114
 #
... ...
@@ -2,29 +2,6 @@
2 2
 
3 3
 # Provides simple utility functions
4 4
 
5
-# ensure_iptables_or_die tests if the testing machine has iptables available
6
-# and in PATH. Also test whether current user has sudo privileges.
7
-function ensure_iptables_or_die() {
8
-	if [[ -z "$(which iptables)" ]]; then
9
-		echo "IPTables not found - the end-to-end test requires a system with iptables for Kubernetes services."
10
-		exit 1
11
-	fi
12
-
13
-	set +e
14
-
15
-	iptables --list > /dev/null 2>&1
16
-	if [ $? -ne 0 ]; then
17
-		sudo iptables --list > /dev/null 2>&1
18
-		if [ $? -ne 0 ]; then
19
-			echo "You do not have iptables or sudo privileges. Kubernetes services will not work without iptables access.	See https://github.com/kubernetes/kubernetes/issues/1859.	Try 'sudo hack/test-end-to-end.sh'."
20
-			exit 1
21
-		fi
22
-	fi
23
-
24
-	set -e
25
-}
26
-readonly -f ensure_iptables_or_die
27
-
28 5
 # kill_all_processes function will kill all
29 6
 # all processes created by the test script.
30 7
 function kill_all_processes() {
... ...
@@ -85,12 +62,6 @@ readonly -f truncate_large_logs
85 85
 # start of common functions for extended test group's run.sh scripts
86 86
 ######
87 87
 
88
-# exit run if ginkgo not installed
89
-function ensure_ginkgo_or_die() {
90
-	which ginkgo &>/dev/null || (echo 'Run: "go get github.com/onsi/ginkgo/ginkgo"' && exit 1)
91
-}
92
-readonly -f ensure_ginkgo_or_die
93
-
94 88
 # cleanup_openshift saves container logs, saves resources, and kills all processes and containers
95 89
 function cleanup_openshift() {
96 90
 	LOG_DIR="${LOG_DIR:-${BASETMPDIR}/logs}"