Skip to content

Commit

Permalink
Added switch
Browse files Browse the repository at this point in the history
  • Loading branch information
algojack committed Aug 9, 2021
1 parent a2ab69f commit 2dba35f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 42 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: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
steps:
- prepare_go
- generic_integration:
Expand All @@ -387,7 +387,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
steps:
- prepare_go
- generic_integration:
Expand All @@ -399,7 +399,7 @@ jobs:
image: ubuntu-2004:202104-01
resource_class: large
environment:
E2E_SUBS: "ONLY"
E2E_SUBS_SCRIPTS: "ONLY"
steps:
- prepare_go
- generic_integration:
Expand All @@ -411,7 +411,7 @@ jobs:
image: ubuntu-2004:202104-01
resource_class: large
environment:
E2E_SUBS: "ONLY"
E2E_SUBS_SCRIPTS: "ONLY"
steps:
- prepare_go
- generic_integration:
Expand Down Expand Up @@ -459,7 +459,7 @@ jobs:
resource_class: arm.medium
parallelism: 4
environment:
E2E_SUBS: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
steps:
- checkout
- prepare_go
Expand All @@ -473,7 +473,7 @@ jobs:
resource_class: arm.medium
parallelism: 4
environment:
E2E_SUBS: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
steps:
- checkout
- prepare_go
Expand All @@ -486,7 +486,7 @@ jobs:
image: ubuntu-2004:202101-01
resource_class: arm.large
environment:
E2E_SUBS: "ONLY"
E2E_SUBS_SCRIPTS: "ONLY"
steps:
- checkout
- prepare_go
Expand All @@ -499,7 +499,7 @@ jobs:
image: ubuntu-2004:202101-01
resource_class: arm.large
environment:
E2E_SUBS: "ONLY"
E2E_SUBS_SCRIPTS: "ONLY"
steps:
- checkout
- prepare_go
Expand Down Expand Up @@ -558,7 +558,7 @@ jobs:
resource_class: medium
parallelism: 4
environment:
E2E_SUBS: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
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: "SKIP"
E2E_SUBS_SCRIPTS: "SKIP"
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"
E2E_SUBS_SCRIPTS: "ONLY"
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"
E2E_SUBS_SCRIPTS: "ONLY"
HOMEBREW_NO_AUTO_UPDATE: "true"
steps:
#- run: git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
Expand Down
66 changes: 36 additions & 30 deletions test/scripts/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,37 +100,43 @@ export GOPATH=$(go env GOPATH)
# Change current directory to test/scripts so we can just use ./test.sh to exec.
cd "${SCRIPT_PATH}"

if [ "${E2E_SUBS}" != "SKIP" ]; then

./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"

"${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"

deactivate

fi # if $E2E_SUBS != "SKIP"
e2e_subs_scripts()
{
./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"

"${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"

deactivate
}

if [ "${E2E_SUBS}" = "ONLY" ]; then
exit 0
fi
case $E2E_SUBS_SCRIPTS in
SKIP)
;;
ONLY)
exit 0
;;
*)
e2e_subs_scripts
;;
esac

# 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.
Expand Down

0 comments on commit 2dba35f

Please sign in to comment.