+
+class Trial(Command):
+ description = "run trial (use 'bin%stahoe debug trial' for the full set of trial options)" % (os.sep,)
+ # This is just a subset of the most useful options, for compatibility.
+ user_options = [ ("rterrors", "e", "Print out tracebacks as soon as they occur."),
+ ("reporter=", None, "The reporter to use for this test run."),
+ ("suite=", "s", "Specify the test suite."),
+ ("version-and-path", None, "Display version numbers and paths of Tahoe dependencies."),
+ ]
+
+ def initialize_options(self):
+ self.rterrors = False
+ self.reporter = None
+ self.suite = "allmydata"
+ self.version_and_path = False
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ args = [sys.executable, os.path.join('bin', 'tahoe')]
+ if self.version_and_path:
+ args.append('--version-and-path')
+ args += ['debug', 'trial']
+ if self.rterrors:
+ args.append('--rterrors')
+ if self.reporter:
+ args.append('--reporter=' + self.reporter)
+ if self.suite:
+ args.append(self.suite)
+ rc = subprocess.call(args)
+ sys.exit(rc)
+
+