runtests.rb 474 B

1234567891011121314151617181920212223242526272829303132333435
  1. def find_tests( path )
  2. tests = Array.new
  3. Dir.foreach( path ) { |name|
  4. full = File.expand_path( name, path )
  5. if name != "." && name != ".."
  6. if File.directory?( full )
  7. tests.push( *find_tests( full ) )
  8. elsif File.executable?( full )
  9. tests.push( full )
  10. end
  11. end
  12. }
  13. return tests
  14. end
  15. tests = find_tests( "tests" )
  16. tests.each { |t|
  17. stop = false
  18. Dir.chdir( File.dirname( t ) ) {
  19. if !system( t )
  20. stop = true
  21. end
  22. }
  23. if stop
  24. break
  25. end
  26. }