jasmine-headless-webkit/ext/jasmine-webkit-specrunner/test.rb

32 lines
493 B
Ruby
Raw Normal View History

2011-08-03 16:26:39 +00:00
#!/usr/bin/env ruby
2011-08-29 17:35:36 +00:00
require 'fileutils'
2011-08-23 23:49:47 +00:00
system %{make clean}
2011-08-29 17:35:36 +00:00
$: << File.expand_path("../../../lib", __FILE__)
require 'qt/qmake'
result = 0
2011-08-03 16:26:39 +00:00
Dir['*_test.pro'].each do |test|
2011-08-29 17:35:36 +00:00
FileUtils.rm_f('jhw-test')
2011-08-23 23:49:47 +00:00
Qt::Qmake.make!('jasmine-headless-webkit', test)
2011-08-29 17:35:36 +00:00
if File.file?('jhw-test')
system %{./jhw-test}
if $?.exitstatus != 0
result = 1
break
2011-08-29 17:35:36 +00:00
end
else
result = 1
break
2011-08-03 16:26:39 +00:00
end
end
Qt::Qmake.make!('jasmine-headless-webkit', 'specrunner.pro')
exit result