#!/usr/bin/env ruby # Niklaus Giger, 15.01.2011 # Small ruby-script run all tests using ec (the Eiffel compiler) # we assumen that ec outputs everything in english! # For the command line options look at # http://docs.eiffel.com/book/eiffelstudio/eiffelstudio-command-line-options # we use often the -batch open. # # TODO: Fix problems when compiling takes too long and/or there # are ec process lingering around from a previous failed build require 'tempfile' require 'fileutils' # Override system command. # run command. if not successful, complain and exit with error def system(cmd) puts cmd res = Kernel.system(cmd) if !res puts "Failed running: #{cmd}" exit 2 end end def runTestForProject(where) if !File.directory?(where) puts "Directory #{where} does not exist" exit 2 end # create a temporary file with input for the # interactive mode of ec commands2run=<