-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
executable file
·51 lines (39 loc) · 1.07 KB
/
Rakefile
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
51
require 'rake'
task :clean do
rm_f Dir.glob("*.j")
rm_f Dir.glob("*.out")
rm_f Dir.glob("*.class")
rm_f Dir.glob("*~")
sh "ls -G"
end
task :verifyJasmin do
if !File.exist?("jasmin.jar")
puts "Please download Jasmin from http://jasmin.sourceforge.net before continuing"
end
end
task :run, :verbosity do |t, args|
if args.verbosity == nil || args.verbosity != "low"
sh "cat stutestNoErrors.in"
end
if ENV["file"] != nil
fileToBuild = ENV["file"]
else
fileToBuild = "stutestNoErrors.in"
end
ruby "driver.rb #{fileToBuild}"
sh "java -jar jasmin.jar stutestNoErrors.j"
sh "java stutestNoErrors > stutest.out"
sh "cat stutest.out"
end
task :buildAndRun => :verifyJasmin do
if ENV["file"] != nil
fileToBuild = ENV["file"]
else
fileToBuild = "stutestNoErrors.in"
end
ruby "driver.rb #{fileToBuild}"
sh "java -jar jasmin.jar stutestNoErrors.j"
sh "java stutestNoErrors > stutest.out"
puts "Results in stutest.out"
end
task :default => :buildAndRun