Skip to content

Commit

Permalink
Wrapped last part in IF
Browse files Browse the repository at this point in the history
  • Loading branch information
algojack committed Aug 11, 2021
1 parent 2dba35f commit 63a0c09
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 40 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
steps:
- prepare_go
- generic_integration:
Expand All @@ -387,7 +387,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
steps:
- prepare_go
- generic_integration:
Expand All @@ -399,7 +399,7 @@ jobs:
image: ubuntu-2004:202104-01
resource_class: large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
steps:
- prepare_go
- generic_integration:
Expand All @@ -411,7 +411,7 @@ jobs:
image: ubuntu-2004:202104-01
resource_class: large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
steps:
- prepare_go
- generic_integration:
Expand Down Expand Up @@ -459,7 +459,7 @@ jobs:
resource_class: arm.medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
steps:
- checkout
- prepare_go
Expand All @@ -473,7 +473,7 @@ jobs:
resource_class: arm.medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
steps:
- checkout
- prepare_go
Expand All @@ -486,7 +486,7 @@ jobs:
image: ubuntu-2004:202101-01
resource_class: arm.large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
steps:
- checkout
- prepare_go
Expand All @@ -499,7 +499,7 @@ jobs:
image: ubuntu-2004:202101-01
resource_class: arm.large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
steps:
- checkout
- prepare_go
Expand Down Expand Up @@ -558,7 +558,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
HOMEBREW_NO_AUTO_UPDATE: "true"
steps:
#- run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
Expand All @@ -574,7 +574,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS_SCRIPTS: "SKIP"
E2E_TEST_FILTER: "GO"
HOMEBREW_NO_AUTO_UPDATE: "true"
steps:
#- run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
Expand All @@ -589,7 +589,7 @@ jobs:
xcode: 12.0.1
resource_class: large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
HOMEBREW_NO_AUTO_UPDATE: "true"
steps:
#- run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
Expand All @@ -604,7 +604,7 @@ jobs:
xcode: 12.0.1
resource_class: large
environment:
E2E_SUBS_SCRIPTS: "ONLY"
E2E_TEST_FILTER: "SCRIPTS"
HOMEBREW_NO_AUTO_UPDATE: "true"
steps:
#- run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
Expand Down
47 changes: 19 additions & 28 deletions test/scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export GOPATH=$(go env GOPATH)
# Change current directory to test/scripts so we can just use ./test.sh to exec.
cd "${SCRIPT_PATH}"

e2e_subs_scripts()
{
if [ -z $E2E_TEST_FILTER || $E2E_TEST_FILTER="SCRIPTS" ]; then

./timeout 200 ./e2e_basic_start_stop.sh
duration "e2e_basic_start_stop.sh"

Expand All @@ -125,34 +125,25 @@ e2e_subs_scripts()
duration "serial client runners"

deactivate
}

case $E2E_SUBS_SCRIPTS in
SKIP)
;;
ONLY)
exit 0
;;
*)
e2e_subs_scripts
;;
esac
fi # if E2E_TEST_FILTER = "" or = "SCRIPTS"

# Export our root temp folder as 'TESTDIR' for tests to use as their root test folder
# This allows us to clean up everything with our rm -rf trap.
export TESTDIR=${TEMPDIR}
export TESTDATADIR=${SRCROOT}/test/testdata
export SRCROOT=${SRCROOT}
if [ -z $E2E_TEST_FILTER || $E2E_TEST_FILTER="GO" ]; then
# Export our root temp folder as 'TESTDIR' for tests to use as their root test folder
# This allows us to clean up everything with our rm -rf trap.
export TESTDIR=${TEMPDIR}
export TESTDATADIR=${SRCROOT}/test/testdata
export SRCROOT=${SRCROOT}

./e2e_go_tests.sh ${GO_TEST_ARGS}
duration "e2e_go_tests.sh"
./e2e_go_tests.sh ${GO_TEST_ARGS}
duration "e2e_go_tests.sh"

rm -rf "${TEMPDIR}"
rm -rf "${TEMPDIR}"

if ! ${NO_BUILD} ; then
rm -rf ${PKG_ROOT}
fi
if ! ${NO_BUILD} ; then
rm -rf ${PKG_ROOT}
fi

echo "----------------------------------------------------------------------"
echo " DONE: E2E"
echo "----------------------------------------------------------------------"
echo "----------------------------------------------------------------------"
echo " DONE: E2E"
echo "----------------------------------------------------------------------"
fi # if E2E_TEST_FILTER = "" or = "GO"

0 comments on commit 63a0c09

Please sign in to comment.