Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate SKIP_E2E_SUBS and E2E_SUBS_ONLY #2705

Merged
merged 3 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
SKIP_E2E_SUBS: "true"
E2E_TEST_FILTER: "GO"
steps:
- prepare_go
- generic_integration:
Expand All @@ -387,7 +387,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
SKIP_E2E_SUBS: "true"
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_ONLY: "true"
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_ONLY: "true"
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:
SKIP_E2E_SUBS: "true"
E2E_TEST_FILTER: "GO"
steps:
- checkout
- prepare_go
Expand All @@ -473,7 +473,7 @@ jobs:
resource_class: arm.medium
parallelism: 4
environment:
SKIP_E2E_SUBS: "true"
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_ONLY: "true"
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_ONLY: "true"
E2E_TEST_FILTER: "SCRIPTS"
steps:
- checkout
- prepare_go
Expand Down Expand Up @@ -558,7 +558,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
SKIP_E2E_SUBS: "true"
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:
SKIP_E2E_SUBS: "true"
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_ONLY: "true"
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_ONLY: "true"
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
75 changes: 36 additions & 39 deletions test/scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,53 +100,50 @@ export GOPATH=$(go env GOPATH)
# Change current directory to test/scripts so we can just use ./test.sh to exec.
cd "${SCRIPT_PATH}"

if [ "${SKIP_E2E_SUBS}" = "" ]; then
if [ -z $E2E_TEST_FILTER || $E2E_TEST_FILTER="SCRIPTS" ]; then

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

python3 -m venv "${TEMPDIR}/ve"
. "${TEMPDIR}/ve/bin/activate"
"${TEMPDIR}/ve/bin/pip3" install --upgrade pip
"${TEMPDIR}/ve/bin/pip3" install --upgrade py-algorand-sdk cryptography
duration "e2e client setup"
python3 -m venv "${TEMPDIR}/ve"
. "${TEMPDIR}/ve/bin/activate"
"${TEMPDIR}/ve/bin/pip3" install --upgrade pip
"${TEMPDIR}/ve/bin/pip3" install --upgrade py-algorand-sdk cryptography
duration "e2e client setup"

"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} "$SRCROOT"/test/scripts/e2e_subs/*.sh
duration "parallel client runner"
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} "$SRCROOT"/test/scripts/e2e_subs/*.sh
duration "parallel client runner"

for vdir in "$SRCROOT"/test/scripts/e2e_subs/v??; do
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} --version "$(basename "$vdir")" "$vdir"/*.sh
done
duration "vdir client runners"

for script in "$SRCROOT"/test/scripts/e2e_subs/serial/*; do
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} $script
done
duration "serial client runners"
for vdir in "$SRCROOT"/test/scripts/e2e_subs/v??; do
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} --version "$(basename "$vdir")" "$vdir"/*.sh
done
duration "vdir client runners"

deactivate
for script in "$SRCROOT"/test/scripts/e2e_subs/serial/*; do
"${TEMPDIR}/ve/bin/python3" e2e_client_runner.py ${RUN_KMD_WITH_UNSAFE_SCRYPT} $script
done
duration "serial client runners"

fi # if $SKIP_E2E_SUBS = ""
deactivate
fi # if E2E_TEST_FILTER = "" or = "SCRIPTS"

if [ "${E2E_SUBS_ONLY}" != "" ]; then
exit 0
fi
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}

# 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"