Suffix _testsuite is optional for phpunit
authorFrederic Massart <fred@moodle.com>
Wed, 11 Nov 2015 04:23:54 +0000 (12:23 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 16 Nov 2015 08:31:14 +0000 (16:31 +0800)
mdk/commands/phpunit.py

index a87f6c0..d1ab6dc 100644 (file)
@@ -148,11 +148,16 @@ class PhpunitCommand(Command):
 
             PU.init(force=args.force, prefix=prefix)
 
+            # Automatically add the suffix _testsuite.
+            testsuite = args.testsuite
+            if testsuite and not testsuite.endswith('_testsuite'):
+                testsuite += '_testsuite'
+
             kwargs = {
                 'coverage': args.coverage,
                 'filter': args.filter,
                 'testcase': args.testcase,
-                'testsuite': args.testsuite,
+                'testsuite': testsuite,
                 'unittest': args.unittest
             }