workercommands.py 574 B

123456789101112131415161718192021222324252627282930
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. """
  4. Commands for telling a worker to load tests or run tests.
  5. @since: 12.3
  6. """
  7. from twisted.protocols.amp import Boolean, Command, Unicode
  8. NativeString = Unicode
  9. class Run(Command):
  10. """
  11. Run a test.
  12. """
  13. arguments = [(b"testCase", NativeString())]
  14. response = [(b"success", Boolean())]
  15. class Start(Command):
  16. """
  17. Set up the worker process, giving the running directory.
  18. """
  19. arguments = [(b"directory", NativeString())]
  20. response = [(b"success", Boolean())]