From 3fdaddbe2e4db061618c112a604dc9f96b8a4391 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 28 Mar 2022 13:29:15 +0100 Subject: [PATCH 1/5] Comment out all workflows except py37-windows-64 --- .github/workflows/test.yml | 130 ++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f62dba8cb9c7..a9ad3732543c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,76 +21,76 @@ jobs: fail-fast: false matrix: include: - - name: Test suite with py37-windows-32 - python: '3.7' - arch: x86 - os: windows-latest - toxenv: py37 + # - name: Test suite with py37-windows-32 + # python: '3.7' + # arch: x86 + # os: windows-latest + # toxenv: py37 - name: Test suite with py37-windows-64 python: '3.7' arch: x64 os: windows-latest toxenv: py37 - - name: Test suite with py37-ubuntu - python: '3.7' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 2" - - name: Test suite with py38-ubuntu - python: '3.8' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 2" - - name: Test suite with py36-ubuntu, mypyc-compiled - python: '3.6' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 2" - test_mypyc: true - - name: Test suite with py39-ubuntu, mypyc-compiled - python: '3.9' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 2" - test_mypyc: true - - name: Test suite with py310-ubuntu - python: '3.10' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 2" - - name: mypyc runtime tests with py36-macos - python: '3.6' - arch: x64 - os: macos-latest - toxenv: py - tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py" - - name: mypyc runtime tests with py36-debug-build-ubuntu - python: '3.6.8' - arch: x64 - os: ubuntu-latest - toxenv: py36 - tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py" - debug_build: true - - name: Type check our own code (py37-ubuntu) - python: '3.7' - arch: x64 - os: ubuntu-latest - toxenv: type - - name: Type check our own code (py37-windows-64) - python: '3.7' - arch: x64 - os: windows-latest - toxenv: type - - name: Code style with flake8 - python: '3.7' - arch: x64 - os: ubuntu-latest - toxenv: lint + # - name: Test suite with py37-ubuntu + # python: '3.7' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 2" + # - name: Test suite with py38-ubuntu + # python: '3.8' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 2" + # - name: Test suite with py36-ubuntu, mypyc-compiled + # python: '3.6' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 2" + # test_mypyc: true + # - name: Test suite with py39-ubuntu, mypyc-compiled + # python: '3.9' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 2" + # test_mypyc: true + # - name: Test suite with py310-ubuntu + # python: '3.10' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 2" + # - name: mypyc runtime tests with py36-macos + # python: '3.6' + # arch: x64 + # os: macos-latest + # toxenv: py + # tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py" + # - name: mypyc runtime tests with py36-debug-build-ubuntu + # python: '3.6.8' + # arch: x64 + # os: ubuntu-latest + # toxenv: py36 + # tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py" + # debug_build: true + # - name: Type check our own code (py37-ubuntu) + # python: '3.7' + # arch: x64 + # os: ubuntu-latest + # toxenv: type + # - name: Type check our own code (py37-windows-64) + # python: '3.7' + # arch: x64 + # os: windows-latest + # toxenv: type + # - name: Code style with flake8 + # python: '3.7' + # arch: x64 + # os: ubuntu-latest + # toxenv: lint name: ${{ matrix.name }} steps: From c88b2a97bd8a96bec032e5c1b63cc3858aaa7a81 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 28 Mar 2022 13:32:40 +0100 Subject: [PATCH 2/5] Only run a single test case --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 44334688b0ad..91eecbccfe8b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ description = run the test driver with {basepython} setenv = cov: COVERAGE_FILE={toxworkdir}/.coverage.{envname} passenv = PYTEST_XDIST_WORKER_COUNT PROGRAMDATA PROGRAMFILES(X86) deps = -rtest-requirements.txt -commands = python -m pytest {posargs} +commands = python -m pytest {posargs} -k testRunDataclass cov: python -m pytest {posargs: --cov mypy --cov-config setup.cfg} From ad243dd37c8f2754119964b83d95bcba1b545e1a Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 28 Mar 2022 13:34:44 +0100 Subject: [PATCH 3/5] Skip mypy_primer for now --- .github/workflows/mypy_primer.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index e65d918228b4..989a198b8db2 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -12,6 +12,7 @@ on: - 'mypy/stubgen.py' - 'mypy/stubgenc.py' - 'mypy/test/**' + - '**' jobs: mypy_primer: From f85dcc490dc09cf399b731f8b45c3ce24728f4e3 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 28 Mar 2022 13:46:40 +0100 Subject: [PATCH 4/5] Add some debug prints --- mypyc/test/test_run.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py index a5e356ea56a6..f2f25f1edee7 100644 --- a/mypyc/test/test_run.py +++ b/mypyc/test/test_run.py @@ -263,6 +263,9 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) -> # Assert that an output file got created suffix = 'pyd' if sys.platform == 'win32' else 'so' + print('[cwd] ', os.getcwd()) + print('[files] ', os.listdir('.')) + print('[glob] ', glob.glob('**/*native*', recursive=True)) assert glob.glob('native.*.{}'.format(suffix)) driver_path = 'driver.py' From 618f09f6bfcd95987213137ff4f020945c6a84a7 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Mon, 28 Mar 2022 13:51:14 +0100 Subject: [PATCH 5/5] Allow native.pyd in Windows --- mypyc/test/test_run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py index f2f25f1edee7..6df1f7eb7fae 100644 --- a/mypyc/test/test_run.py +++ b/mypyc/test/test_run.py @@ -266,7 +266,7 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) -> print('[cwd] ', os.getcwd()) print('[files] ', os.listdir('.')) print('[glob] ', glob.glob('**/*native*', recursive=True)) - assert glob.glob('native.*.{}'.format(suffix)) + assert glob.glob('native.*.{}'.format(suffix)) or glob.glob('native.{}'.format(suffix)) driver_path = 'driver.py' if not os.path.isfile(driver_path):