From 44c21249162cfc99cae68228bef25f6f157ea4ed Mon Sep 17 00:00:00 2001 From: Sarthak Khattar Date: Wed, 11 Aug 2021 19:06:29 +0530 Subject: [PATCH 1/2] updated test scripts to run tests from one-level higher --- scripts/run-python-tests.sh | 4 ++-- tools/pysa_integration_tests/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run-python-tests.sh b/scripts/run-python-tests.sh index 6de49f7c331..e924934f8e2 100755 --- a/scripts/run-python-tests.sh +++ b/scripts/run-python-tests.sh @@ -7,10 +7,10 @@ set -e SCRIPTS_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd "${SCRIPTS_DIRECTORY}/.." +cd "${SCRIPTS_DIRECTORY}/../.." echo ' Enumerating test files:' -files=$(find client -name '*_test.py' ! -name 'watchman_test.py') +files=$(find 'pyre-check/client' -name '*_test.py' ! -name 'watchman_test.py') echo "${files}" if [[ -z "${files}" ]]; then echo 'No test files found, exiting.' diff --git a/tools/pysa_integration_tests/utils.py b/tools/pysa_integration_tests/utils.py index e659d319a31..8c04955effb 100644 --- a/tools/pysa_integration_tests/utils.py +++ b/tools/pysa_integration_tests/utils.py @@ -155,7 +155,7 @@ def run_pysa_integration_test( if run_from_source: command = [ "python", - "-m" "client.pyre", + "-m" "pyre-check.client.pyre", "--noninteractive", "analyze", ] From 32ddb5b3c72e5459bf26792d40a00ddef1b0886e Mon Sep 17 00:00:00 2001 From: Sarthak Khattar Date: Tue, 24 Aug 2021 22:38:49 +0530 Subject: [PATCH 2/2] update PYTHONPATH --- .github/workflows/pysa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pysa.yml b/.github/workflows/pysa.yml index 72253a8db7c..c61fbdfbc5a 100644 --- a/.github/workflows/pysa.yml +++ b/.github/workflows/pysa.yml @@ -40,7 +40,7 @@ jobs: unzip -qq ./stubs/typeshed/typeshed.zip -d ./typeshed/ ./scripts/setup.sh --local --no-tests make -C source - echo "PYTHONPATH=$GITHUB_WORKSPACE:$PYTHONPATH" >> $GITHUB_ENV + echo "PYTHONPATH=$GITHUB_WORKSPACE/..:$PYTHONPATH" >> $GITHUB_ENV echo "pythonLocation=$GITHUB_WORKSPACE:$pythonLocation" >> $GITHUB_ENV echo "PYRE_BINARY=$GITHUB_WORKSPACE/source/_build/default/main.exe" >> $GITHUB_ENV echo "PYRE_TYPESHED=$GITHUB_WORKSPACE/typeshed/typeshed-master/" >> $GITHUB_ENV