diff options
| author | varac <varacanero@zeromail.org> | 2014-03-26 13:37:56 +0100 | 
|---|---|---|
| committer | varac <varacanero@zeromail.org> | 2014-03-26 13:37:56 +0100 | 
| commit | ce35a9dc3457f87ebd8f87decfad1a55e7cfa27a (patch) | |
| tree | c8538a52738b401ba1cb85b4690a2e7b415a182b /bin/run_tests | |
| parent | f3deb7db2648080bbe74dd4de9c7a45caadaff80 (diff) | |
| parent | e7332f2370db83523c52ca2cf5510db001469093 (diff) | |
Merge branch '0.6' of ssh://code.leap.se/leap_platform into 0.6
Diffstat (limited to 'bin/run_tests')
| -rwxr-xr-x | bin/run_tests | 15 | 
1 files changed, 9 insertions, 6 deletions
| diff --git a/bin/run_tests b/bin/run_tests index 2336eba8..f4fb0157 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -394,11 +394,9 @@ class LeapRunner < MiniTest::Unit    # Converts snake_case and CamelCase to something more pleasant for humans to read.    #    def readable(str) -    str.gsub(/([A-Z]+)([A-Z][a-z])/, '\1 \2'). -    gsub(/([a-z])([A-Z])/, '\1 \2'). +    str.      gsub(/_/, ' '). -    sub(/^test (\d* )?/i, ''). -    downcase.capitalize +    sub(/^test (\d* )?/i, '')    end    def machine_readable(str) @@ -428,7 +426,12 @@ class TestDependencyGraph    end    def tsort_each_child(test_class_name, &block) -    @dependencies[test_class_name].each(&block) +    if @dependencies[test_class_name] +      @dependencies[test_class_name].each(&block) +    else +      puts "ERROR: bad dependency, no such class `#{test_class_name}`" +      exit(1) +    end    end    def sorted @@ -476,7 +479,7 @@ def pin_test_name(name)      die name, "there is no test class `#{test_class}`"    end    if test_name -    $pinned_test_method = $pinned_test_class.tests.detect{|m| m.to_s =~ /^test_(\d+_)?#{test_name}$/} +    $pinned_test_method = $pinned_test_class.tests.detect{|m| m.to_s =~ /^test_(\d+_)?#{Regexp.escape(test_name)}$/}      unless $pinned_test_method        die name, "there is no test `#{test_name}` in class `#{test_class}`"      end | 
