forked from jmettraux/ruote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmtest.rb
executable file
·51 lines (36 loc) · 1023 Bytes
/
mtest.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env ruby
#
# testing the various storage engines
#
if ARGV.size < 1 or ARGV.include?('--help') or ARGV.include?('-h')
puts %{
This test helper will run a given functional test with all the storage
implementations. It will exit as sooon as one of them fails.
It can run all the functional tests :
./mtest.rb --all
Or only one of them
./mtest.rb test/functional/ft_1_process_status.rb
}
exit 1
end
ARGV = [ 'test/functional/test.rb' ] \
if ARGV.include?('--all') or ARGV.include?('-a')
ruby = `which ruby`.strip
ruby += ' -I~/rufus/rufus-tokyo/lib' # TODO : remove me later
[
'', '--fs', '--tc', '--ar',
#'', '--fs', '--tc', '--tt', '--ar',
#'--cfp',
'--fs -y', '--fs -C', '--fs -C -y', '--tc -C'
#'--fs -y', '--fs -C', '--fs -C -y', '--tc -C', '--tt -C'
].each do |args|
puts
puts '=' * 80
puts "#{ruby} #{ARGV.join(' ')} -- #{args}"
puts '=' * 80
puts
t = Time.now.to_f
puts `#{ruby} #{ARGV.join(' ')} -- #{args}`
d = Time.now.to_f - t
break if $? != 0
end