Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1695

Open
Created Nov 20, 2024 by Jérome Perrin@jeromeOwner
  • Report abuse
Report abuse

WIP: run tests wit zope.testrunner

  • Overview 1
  • Commits 1
  • Changes 2

testing with to list tests

  cd software/erp5/test

  env PYTHONNOUSERSITE=1 \
      MAKEFLAGS=-j128 \
      SLAPOS_SR_TEST_NAME=erp5-py3 \
      SLAPOS_TEST_SKIP_SOFTWARE_REBUILD=1 \
      SLAPOS_TEST_VERBOSE=0 \
      SLAPOS_TEST_SKIP_SOFTWARE_CHECK=1 \
      SLAPOS_TEST_DEBUG=0 \
      PYTHONWARNINGS=ignore \
      zope-testrunner  --color -vD --path . --tests-pattern test --list-tests

and to run :

  env PYTHONNOUSERSITE=1 \
      MAKEFLAGS=-j128 \
      SLAPOS_SR_TEST_NAME=erp5-py3 \
      SLAPOS_TEST_SKIP_SOFTWARE_REBUILD=1 \
      SLAPOS_TEST_VERBOSE=0 \
      SLAPOS_TEST_SKIP_SOFTWARE_CHECK=1 \
      SLAPOS_TEST_DEBUG=0 \
      PYTHONWARNINGS=ignore \
      zope-testrunner  --color -vD --path . --tests-pattern test

problems:

  • zope.testrunner could support setupModule / setupClass directly (or at least the workaround could be put directly in slapos.core testing on the default SlapOSInstanceTestCase)
  • zope.testrunner -D trigger debuggers on expected failures (probably similar to https://github.com/zopefoundation/zope.testrunner/issues/141 )
  • hitting Ctrl+C seems "even worse" than default unit test -> we can probably register a signal handler in setupClass to stop slapos standalone subsystem ourselves.
  • nxdtest probably needs support for good reporting on test_result_module

zope.testrunner

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/zope-testrunner
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7