Skip to content

Commit

Permalink
Move common.sh from test/externalTests to scripts/externalTests
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Apr 28, 2023
1 parent 778d6f4 commit 28a9592
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 62 deletions.
34 changes: 0 additions & 34 deletions scripts/common/shell_command.py

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion test/externalTests/bleeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/brink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/chainlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/colony.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/elementfi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/ens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/euler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/gnosis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/gp2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/perpetual-pools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/pool-together.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/prb-math.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/solc-js/solc-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

SOLJSON="$1"
VERSION="$2"
Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/trident.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/uniswap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/yield-liquidator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
set -e

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
2 changes: 1 addition & 1 deletion test/externalTests/zeppelin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set -e
export NODE_OPTIONS="--max-old-space-size=4096"

source scripts/common.sh
source test/externalTests/common.sh
source scripts/externalTests/common.sh

REPO_ROOT=$(realpath "$(dirname "$0")/../..")

Expand Down
13 changes: 2 additions & 11 deletions test/external_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@
import os
from pathlib import Path
import sys

# Our scripts/ is not a proper Python package so we need to modify PYTHONPATH to import from it
# pragma pylint: disable=import-error,wrong-import-position
SCRIPTS_DIR = Path(__file__).parents[1] / "scripts"
sys.path.insert(0, str(SCRIPTS_DIR))

from common.shell_command import run_cmd
import subprocess

EXTERNAL_TESTS_DIR = Path(__file__).parent / "externalTests"

Expand All @@ -39,13 +33,10 @@ class ExternalTestNotFound(Exception):


def detect_external_tests() -> dict:
# TODO: Remove `file_path.stem != "common"` when we complete the migration
# of the external tests to python, since there will be no more
# common.sh script in the externalTests folder.
return {
file_path.stem: file_path
for file_path in Path(EXTERNAL_TESTS_DIR).iterdir()
if file_path.is_file() and file_path.suffix == ".sh" and file_path.stem != "common"
if file_path.is_file() and file_path.suffix == ".sh"
}


Expand Down

0 comments on commit 28a9592

Please sign in to comment.