-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (25 loc) · 816 Bytes
/
Rakefile
File metadata and controls
30 lines (25 loc) · 816 Bytes
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
require 'colorize'
section_colour = :yellow
name_colour = :blue
task :default => :test
desc "Run tests"
task :test do
sh "richgo test -v ./..."
end
desc "Run selftests (slow)"
task :selftest do
# For dup-key datasets we can't run randomised inputs
dupkey = [ "data/foo.csv" ]
dupkey.each do |ds|
puts ds.colorize(name_colour).bold
sh "time -f 'Elapsed: %E' cat #{ds} | cmd/bsearch_selftest/bsearch_selftest --hdr -i #{ds} | ctap -gsf", :verbose => false
puts
end
# For uniq-key datasets we run randomised inputs instead
FileList['data/*_r1.[cpt]sv'].each do |rand|
ds = rand.sub('_r1.', '.')
puts ds.colorize(name_colour).bold
sh "time -f 'Elapsed: %E' pv -l #{rand} | cmd/bsearch_selftest/bsearch_selftest --hdr -i #{ds} | ctap -gsf", :verbose => false
puts
end
end