hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/3] git commit: HBASE-11731 Add option to only run a subset of the shell tests (Sean Busbey)
Date Thu, 14 Aug 2014 18:52:15 GMT
HBASE-11731 Add option to only run a subset of the shell tests (Sean Busbey)

Amending-Author: Andrew Purtell <apurtell@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fc5f0a67
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fc5f0a67
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fc5f0a67

Branch: refs/heads/branch-1
Commit: fc5f0a672aea43aa659f5acd1b5183e407bd7ed0
Parents: a79e5ce
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Aug 14 11:49:59 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Aug 14 11:50:41 2014 -0700

----------------------------------------------------------------------
 hbase-shell/src/test/ruby/tests_runner.rb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fc5f0a67/hbase-shell/src/test/ruby/tests_runner.rb
----------------------------------------------------------------------
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
 


Mime
View raw message