From eb175c2f113f39a70cfbd45fd6fcdf3addb1de96 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Thu, 14 Aug 2014 11:49:59 -0700 Subject: [PATCH] HBASE-11731 Add option to only run a subset of the shell tests (Sean Busbey) Amending-Author: Andrew Purtell --- hbase-shell/src/test/ruby/tests_runner.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hbase-shell/src/test/ruby/tests_runner.rb b/hbase-shell/src/test/ruby/tests_runner.rb index 7e40962..e1458db 100644 --- a/hbase-shell/src/test/ruby/tests_runner.rb +++ b/hbase-shell/src/test/ruby/tests_runner.rb @@ -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 -- 1.8.5.2 (Apple Git-48)