Skip to content

Commit

Permalink
Merge pull request #1285 from qstokkink/testbranch
Browse files Browse the repository at this point in the history
Fix run_all_tests for Mac
  • Loading branch information
qstokkink committed Mar 6, 2024
2 parents fc87f48 + 6a5fc60 commit f77fa8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-comment-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

set_failure_status:
if: ${{failure() && github.event.issue.pull_request && startsWith(github.event.comment.body, 'validate') }}
needs: [set_pending_status, pr_commented]
needs: [set_pending_status, pr_commented, validate_attestation_tutorial, validate_identity_tutorial, validate_documentation]
runs-on: ubuntu-latest
steps:
- name: Set commit failed status
Expand All @@ -89,7 +89,7 @@ jobs:

set_success_status:
if: ${{!failure() && github.event.issue.pull_request && startsWith(github.event.comment.body, 'validate') }}
needs: [set_pending_status, pr_commented]
needs: [set_pending_status, pr_commented, validate_attestation_tutorial, validate_identity_tutorial, validate_documentation]
runs-on: ubuntu-latest
steps:
- name: Set commit success status
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
cache: 'pip'
- run: python -m pip install -r requirements.txt
- name: Run unit tests
run: |
pip install pytest pytest-xdist
pytest -n auto ipv8
run: python run_all_tests.py -a
5 changes: 3 additions & 2 deletions run_all_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def windows_missing_libsodium() -> bool:
# Try to find it in the local directory. This is where we'll download it anyway.
os.add_dll_directory(os.path.dirname(__file__) or os.path.abspath('.'))
try:
import libnacl # noqa: F401, F811
import libnacl # noqa: F401
return False
except OSError:
return True
Expand Down Expand Up @@ -331,7 +331,8 @@ def windows_missing_libsodium() -> bool:
print(f"Launching in {process_count} processes ... awaiting results ... \033[s", end="", flush=True) # noqa: T201

with ProgrammerDistractor(not args.noanimation) as programmer_distractor:
with ProcessPoolExecutor(max_workers=process_count) as executor:
with ProcessPoolExecutor(max_workers=process_count,
mp_context=multiprocessing.get_context("spawn")) as executor:
result = executor.map(task_test, test_class_names, chunksize=len(test_class_names) // process_count + 1)
for process_output_handle in result:
failed, tests_run, time_taken, event_log, print_output = process_output_handle
Expand Down

0 comments on commit f77fa8a

Please sign in to comment.