From 279f6a5a191c299fca825aa151ac16eeb9077fc0 Mon Sep 17 00:00:00 2001 From: abhipth Date: Fri, 1 Apr 2022 19:19:31 -0700 Subject: [PATCH 1/2] fix path failure --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 52114f896e..4fea61c6a3 100644 --- a/Makefile +++ b/Makefile @@ -297,7 +297,7 @@ ekscharts-sync-release: build-test-binaries: mkdir -p ${MAKEFILE_PATH}build - find ${MAKEFILE_PATH} -name '*suite_test.go' -type f | xargs dirname | xargs ginkgo build + find . -name '*suite_test.go' -type f | xargs dirname | xargs ginkgo build find ${MAKEFILE_PATH} -name "*.test" -print0 | xargs -0 -I {} mv {} ${MAKEFILE_PATH}build upload-resources-to-github: From 0174bc7aa2ad6dbd8c093f12b833f69c6410bdfd Mon Sep 17 00:00:00 2001 From: abhipth Date: Mon, 4 Apr 2022 11:13:08 -0700 Subject: [PATCH 2/2] seperate makefile for test --- Makefile | 5 ----- scripts/run-canary-test.sh | 2 +- scripts/run-ipv6-canary-test.sh | 2 +- test/Makefile | 21 +++++++++++++++++++++ 4 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 test/Makefile diff --git a/Makefile b/Makefile index 4fea61c6a3..375f29c630 100644 --- a/Makefile +++ b/Makefile @@ -295,11 +295,6 @@ ekscharts-sync: ekscharts-sync-release: ${MAKEFILE_PATH}/scripts/sync-to-eks-charts.sh -b ${HELM_CHART_NAME} -r ${REPO_FULL_NAME} -n -y -build-test-binaries: - mkdir -p ${MAKEFILE_PATH}build - find . -name '*suite_test.go' -type f | xargs dirname | xargs ginkgo build - find ${MAKEFILE_PATH} -name "*.test" -print0 | xargs -0 -I {} mv {} ${MAKEFILE_PATH}build - upload-resources-to-github: ${MAKEFILE_PATH}/scripts/upload-resources-to-github.sh diff --git a/scripts/run-canary-test.sh b/scripts/run-canary-test.sh index 3ba0ee7d35..427a9df3b3 100755 --- a/scripts/run-canary-test.sh +++ b/scripts/run-canary-test.sh @@ -6,7 +6,7 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -GINKGO_TEST_BUILD="$SCRIPT_DIR/../build" +GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build" source "$SCRIPT_DIR"/lib/add-on.sh source "$SCRIPT_DIR"/lib/cluster.sh diff --git a/scripts/run-ipv6-canary-test.sh b/scripts/run-ipv6-canary-test.sh index ff5f13973d..2a228e6096 100755 --- a/scripts/run-ipv6-canary-test.sh +++ b/scripts/run-ipv6-canary-test.sh @@ -6,7 +6,7 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -GINKGO_TEST_BUILD="$SCRIPT_DIR/../build" +GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build" source "$SCRIPT_DIR"/lib/add-on.sh source "$SCRIPT_DIR"/lib/cluster.sh diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000000..88978fd068 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,21 @@ +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +# ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +MAKEFILE_PATH = $(dir $(realpath -s $(firstword $(MAKEFILE_LIST)))) + +export GOPROXY = direct + +build-test-binaries: + mkdir -p ${MAKEFILE_PATH}build + find . -name '*suite_test.go' -type f | xargs dirname | xargs ginkgo build + find ${MAKEFILE_PATH} -name "*.test" -print0 | xargs -0 -I {} mv {} ${MAKEFILE_PATH}build \ No newline at end of file