HBASE-11731 Add option to only run a subset of the shell tests (Sean Busbey)
Amending-Author: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
parent
a79e5ce525
commit
fc5f0a672a
|
@ -54,7 +54,15 @@ files.each do |file|
|
|||
end
|
||||
end
|
||||
|
||||
if !Test::Unit::AutoRunner.run
|
||||
# If this system property is set, we'll use it to filter the test cases.
|
||||
runner_args = []
|
||||
if java.lang.System.get_property('shell.test')
|
||||
shell_test_pattern = java.lang.System.get_property('shell.test')
|
||||
puts "Only running tests that match #{shell_test_pattern}"
|
||||
runner_args << "--testcase=#{shell_test_pattern}"
|
||||
end
|
||||
# first couple of args are to match the defaults, so we can pass options to limit the tests run
|
||||
if !(Test::Unit::AutoRunner.run(false, nil, runner_args))
|
||||
raise "Shell unit tests failed. Check output file for details."
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue