--diff by default, new --no-diff option
This commit is contained in:
parent
cd699f4a8e
commit
3c83c52c70
@ -597,7 +597,8 @@ module Cmdtest
|
|||||||
pr.add("", "--version", "show version")
|
pr.add("", "--version", "show version")
|
||||||
pr.add("-q", "--quiet", "be more quiet")
|
pr.add("-q", "--quiet", "be more quiet")
|
||||||
pr.add("-v", "--verbose", "be more verbose")
|
pr.add("-v", "--verbose", "be more verbose")
|
||||||
pr.add("", "--diff", "experimental diff output")
|
pr.add("", "--diff", "diff output (default)")
|
||||||
|
pr.add("", "--no-diff", "old non-diff output")
|
||||||
pr.add("", "--fast", "run fast without waiting for unique mtime:s")
|
pr.add("", "--fast", "run fast without waiting for unique mtime:s")
|
||||||
pr.add("-j", "--parallel", "build in parallel", type: Integer, default: 1, metavar: "N")
|
pr.add("-j", "--parallel", "build in parallel", type: Integer, default: 1, metavar: "N")
|
||||||
pr.add("", "--test", "only run named test", type: [String])
|
pr.add("", "--test", "only run named test", type: [String])
|
||||||
@ -609,6 +610,15 @@ module Cmdtest
|
|||||||
pr.addpos("arg", "testfile or pattern", nargs: 0..999)
|
pr.addpos("arg", "testfile or pattern", nargs: 0..999)
|
||||||
|
|
||||||
opts = pr.parse_args(ARGV, patterns: [], ruby_s: Util.windows?)
|
opts = pr.parse_args(ARGV, patterns: [], ruby_s: Util.windows?)
|
||||||
|
|
||||||
|
# default '--diff', reversed by --no-diff
|
||||||
|
if opts.diff and opts.no_diff
|
||||||
|
puts "ERROR: both --diff and --no-diff specified"
|
||||||
|
exit(1)
|
||||||
|
elsif ! opts.no_diff
|
||||||
|
opts.diff = true
|
||||||
|
end
|
||||||
|
|
||||||
if opts.help
|
if opts.help
|
||||||
pr.print_usage()
|
pr.print_usage()
|
||||||
exit(0)
|
exit(0)
|
||||||
|
@ -43,7 +43,7 @@ module SelftestUtils
|
|||||||
|
|
||||||
def cmd_cmdtest(*args)
|
def cmd_cmdtest(*args)
|
||||||
cmdtest = "#{TOP}/bin/cmdtest.rb"
|
cmdtest = "#{TOP}/bin/cmdtest.rb"
|
||||||
command = "ruby %s --quiet" % _quote(cmdtest)
|
command = "ruby %s --quiet --no-diff" % _quote(cmdtest)
|
||||||
cmd(command, *args) do
|
cmd(command, *args) do
|
||||||
comment "running local cmdtest"
|
comment "running local cmdtest"
|
||||||
yield
|
yield
|
||||||
|
Loading…
x
Reference in New Issue
Block a user