aboutsummaryrefslogtreecommitdiff
path: root/run_integration_test.rb
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-09 22:50:25 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-04-09 22:50:25 +0900
commita2574f441a1c920202ad22bb9d93235a3ca02abb (patch)
tree346e318aab7268467d32a8d70a19a7cab6381fbd /run_integration_test.rb
parentb40f4a046b7d8a2de53031a590760f1954761ade (diff)
downloadkati-a2574f441a1c920202ad22bb9d93235a3ca02abb.tar.gz
Show elapsed time of integration tests
Diffstat (limited to 'run_integration_test.rb')
-rwxr-xr-xrun_integration_test.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/run_integration_test.rb b/run_integration_test.rb
index 7b1a76f..6ecbf82 100755
--- a/run_integration_test.rb
+++ b/run_integration_test.rb
@@ -40,13 +40,15 @@ class TestCase
Dir.chdir(@name) do
@prepare.call(self)
- @clean.call(self)
- puts "Running make for #{@name}..."
- system("make #{@target} > make.log 2>&1")
-
- @clean.call(self)
- puts "Running kati for #{@name}..."
- system("../../kati #{@target} > kati.log 2>&1")
+ [['make', 'make'], ['kati', '../../kati']].each do |n, cmd|
+ @clean.call(self)
+ print "Running #{n} for #{@name}..."
+ STDOUT.flush
+ started = Time.now
+ system("#{cmd} #{@target} > #{n}.log 2>&1")
+ elapsed = Time.now - started
+ puts " %.2f secs" % elapsed
+ end
make_log = File.read('make.log')
kati_log = File.read('kati.log')