Skip to content

Commit

Permalink
Merge pull request #33 from BallAerospace/bugfix/27-dont-destroy-cust…
Browse files Browse the repository at this point in the history
…omtestsuite

#27 Don't clear CustomTestSuite in build_test_suites.  Fix bug in result...
  • Loading branch information
ryanmelt committed Feb 2, 2015
2 parents 613152c + b81f8fd commit ecced16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions demo/procedures/example_test.rb
Expand Up @@ -11,9 +11,6 @@ def setup
wait(2)
end




# test_1 verifies requirement 1
def test_case_with_long_name_1
puts "Running test_1"
Expand Down
2 changes: 1 addition & 1 deletion lib/cosmos/tools/test_runner/results_writer.rb
Expand Up @@ -94,7 +94,7 @@ def process_result(results)
@file.puts " Exceptions:"
result.exceptions.each_with_index do |error, index|
error.formatted(true).each_line do |line|
break if line =~ /cosmos_test.rb/
break if line =~ /test_runner\/test.rb/
next if line =~ cosmos_lib
if line =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F\x7F-\xFF]/
line.chomp!
Expand Down
5 changes: 3 additions & 2 deletions lib/cosmos/tools/test_runner/test_runner.rb
Expand Up @@ -1033,9 +1033,10 @@ def build_test_suites
end

# Build list of TestSuites and Tests
@@test_suites = []
@@test_suites = @@test_suites.select {|my_suite| my_suite.name == 'Cosmos::CustomTestSuite'}
tests = []
ObjectSpace.each_object(Class) do |object|
next if object.name == 'Cosmos::CustomTestSuite'
if (object.ancestors.include?(TestSuite) &&
object != TestSuite &&
!ignored_test_suite_classes.include?(object))
Expand Down Expand Up @@ -1125,7 +1126,7 @@ def build_test_suites
end
end
end
@@suites[suite.name.split('::')[-1]] = cur_suite
@@suites[suite.name.split('::')[-1]] = cur_suite unless suite.name == 'Cosmos::CustomTestSuite'
end
Qt.execute_in_main_thread(true) { @test_runner_chooser.test_suites = @@suites }
end
Expand Down

0 comments on commit ecced16

Please sign in to comment.