Class: RunAllTests

Inherits:
Minitest::Test
  • Object
show all
Defined in:
lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb

Instance Method Summary collapse

Instance Method Details

#test_allObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb', line 11

def test_all()
  full_file_list = nil
  if File.exist?(TestListFile)
    puts TestListFile
    # load test files from file.
    full_file_list = File.readlines(TestListFile).shuffle
    # Select only .rb files that exist
    full_file_list.select! {|item| item.include?('rb') && File.exist?(File.absolute_path("#{item.strip}"))}
    full_file_list.map! {|item| File.absolute_path("#{item.strip}")}
  else
    puts "Could not find list of files to test at #{TestListFile}"
    return false
  end
  assert(ParallelTests.new.run(full_file_list), "Some tests failed please ensure all test pass and tests have been updated to reflect the changes you expect before issuing a pull request")
end