Commit d061eb6f authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature/27-fail-a' into 'dev'

Feature/27 --fail-a

See merge request !13
parents 0043cc59 268eef99
Pipeline #71710 passed with stages
in 12 seconds
......@@ -6,3 +6,11 @@ r:Summary.*failed:1
$ Report failing test
r:Summary.*TODO-but-ok:1
./should demo/cal.should
!EXIT_CODE: 0
$ With --fail-a, fails
./should --fail-a demo/cal.should
!EXIT_CODE: 1
......@@ -279,6 +279,7 @@ output.add_argument('--xml', action='append_const', dest='output', const=OUT_XML
output.add_argument('-v', '--verbose', action='count', help='increase verbosity', default=1)
output.add_argument('-q', '--quiet', action='store_const', dest='verbose', const=0, help='verbosity to zero')
output.add_argument('--fail-a', action='store_true', help="fail on passing 'a' tests")
output.add_argument("-h", "--help", action="help", help="show this help message and exit")
output.add_argument('--version', action='version',
version='%(prog)s {version}'.format(version=__version__))
......@@ -1141,6 +1142,10 @@ if __name__ == '__main__':
((MOD_ALLOW in test.modifiers) <= (not args.no_a)) and
((MOD_ALLOW in test.modifiers) >= args.only_a)
)
if args.fail_a:
args.mod += ['A']
# Launch tests
fs = FileSet(args.file, timeout = args.timeout, modifiers=''.join(args.mod if args.mod else []))
status = fs.test(variables = variables, cd = args.cd, cd_same = args.cd_same, output = args.output, verbose = args.verbose, only = only)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment