Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • 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
Time tracking
Source branch: feat/zope-testrunner
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7