most 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Copying.txt +679 -0
- data/History.txt +15 -0
- data/Manifest.txt +95 -0
- data/PostInstall.txt +6 -0
- data/Rakefile +44 -0
- data/Readme.rdoc +146 -0
- data/bin/most +31 -0
- data/lib/most.rb +52 -0
- data/lib/most/context.rb +244 -0
- data/lib/most/core.rb +171 -0
- data/lib/most/di/container.rb +148 -0
- data/lib/most/di/proxy.rb +55 -0
- data/lib/most/di/service.rb +63 -0
- data/lib/most/di/service_factory.rb +40 -0
- data/lib/most/environment.rb +67 -0
- data/lib/most/executor.rb +80 -0
- data/lib/most/helpers/array.rb +31 -0
- data/lib/most/helpers/hash.rb +25 -0
- data/lib/most/helpers/kernel.rb +35 -0
- data/lib/most/helpers/memory_out.rb +93 -0
- data/lib/most/helpers/numeric.rb +59 -0
- data/lib/most/helpers/object.rb +65 -0
- data/lib/most/helpers/symbol.rb +31 -0
- data/lib/most/interfaces/meta_programmable.rb +59 -0
- data/lib/most/starter.rb +126 -0
- data/lib/most/structures/box.rb +199 -0
- data/lib/most/structures/submission.rb +117 -0
- data/lib/most/structures/test_case.rb +173 -0
- data/lib/most/structures/test_runner.rb +103 -0
- data/lib/most/structures/types/options.rb +67 -0
- data/lib/most/structures/types/path.rb +39 -0
- data/lib/most/structures/types/report.rb +84 -0
- data/lib/most/submissions/cpp_memory_out_sample.rb +34 -0
- data/lib/most/submissions/cpp_sample.rb +36 -0
- data/lib/most/submissions/cpp_timeout_sample.rb +34 -0
- data/lib/most/submissions/cs_sample.rb +36 -0
- data/lib/most/submissions/erlang_sample.rb +36 -0
- data/lib/most/submissions/haskell_sample.rb +36 -0
- data/lib/most/submissions/java_sample.rb +36 -0
- data/lib/most/submissions/lisp_sample.rb +32 -0
- data/lib/most/submissions/lua_sample.rb +36 -0
- data/lib/most/submissions/ocaml_sample.rb +36 -0
- data/lib/most/submissions/pascal_sample.rb +36 -0
- data/lib/most/submissions/perl_sample.rb +32 -0
- data/lib/most/submissions/php_sample.rb +32 -0
- data/lib/most/submissions/python_sample.rb +32 -0
- data/lib/most/submissions/ruby_sample.rb +32 -0
- data/lib/most/submissions/vb_sample.rb +36 -0
- data/lib/most/tasks/general/win/cs.rb +60 -0
- data/lib/most/tasks/general/win/erlang.rb +86 -0
- data/lib/most/tasks/general/win/gcc.rb +39 -0
- data/lib/most/tasks/general/win/haskell.rb +75 -0
- data/lib/most/tasks/general/win/java.rb +72 -0
- data/lib/most/tasks/general/win/lisp.rb +59 -0
- data/lib/most/tasks/general/win/lua.rb +75 -0
- data/lib/most/tasks/general/win/ocaml.rb +77 -0
- data/lib/most/tasks/general/win/pascal.rb +73 -0
- data/lib/most/tasks/general/win/perl.rb +61 -0
- data/lib/most/tasks/general/win/php.rb +59 -0
- data/lib/most/tasks/general/win/python.rb +59 -0
- data/lib/most/tasks/general/win/ruby.rb +61 -0
- data/lib/most/tasks/general/win/vb.rb +60 -0
- data/lib/most/tasks/general/win/vc.rb +79 -0
- data/lib/most/tasks/general/win/vs.rb +52 -0
- data/samples/problem/solutions/cpp/main.cpp +9 -0
- data/samples/problem/solutions/cpp/tests.yml +19 -0
- data/samples/problem/solutions/cs/main.cs +17 -0
- data/samples/problem/solutions/cs/tests.yml +19 -0
- data/samples/problem/solutions/erlang/main.erl +2 -0
- data/samples/problem/solutions/erlang/tests.yml +19 -0
- data/samples/problem/solutions/haskell/main.hs +5 -0
- data/samples/problem/solutions/haskell/tests.yml +19 -0
- data/samples/problem/solutions/java/Main.java +14 -0
- data/samples/problem/solutions/java/tests.yml +19 -0
- data/samples/problem/solutions/lisp/main.lisp +1 -0
- data/samples/problem/solutions/lisp/tests.yml +19 -0
- data/samples/problem/solutions/lua/main.lua +4 -0
- data/samples/problem/solutions/lua/tests.yml +19 -0
- data/samples/problem/solutions/ocaml/main.ml +3 -0
- data/samples/problem/solutions/ocaml/tests.yml +19 -0
- data/samples/problem/solutions/pascal/main.pas +5 -0
- data/samples/problem/solutions/pascal/tests.yml +19 -0
- data/samples/problem/solutions/perl/main.pl +2 -0
- data/samples/problem/solutions/perl/tests.yml +19 -0
- data/samples/problem/solutions/php/main.php +1 -0
- data/samples/problem/solutions/php/tests.yml +19 -0
- data/samples/problem/solutions/python/main.py +1 -0
- data/samples/problem/solutions/python/tests.yml +19 -0
- data/samples/problem/solutions/ruby/main.rb +1 -0
- data/samples/problem/solutions/ruby/tests.yml +19 -0
- data/samples/problem/solutions/vb/main.vb +14 -0
- data/samples/problem/solutions/vb/tests.yml +19 -0
- data/samples/time_memory/solutions/cpp/main.cpp +21 -0
- data/samples/time_memory/solutions/cpp/tests.yml +19 -0
- data/tasks/samples.rb +31 -0
- metadata +242 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'C/C++ "MemoryOut" Test'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.cpp'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'C/C++ Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:vc:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
total_memory_out 10.megabytes do
|
|
26
|
+
rake_clean 'win:vc:run', entities[:executable], input
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple C/C++ Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.cpp'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'C/C++ Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:vc:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:vc:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'C/C++ "Timeout" Test'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.cpp'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'C/C++ Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:vc:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout 5.seconds do
|
|
26
|
+
rake_clean 'win:vc:run', entities[:executable], input
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple C# Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.cs'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'C# Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:cs:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:cs:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Erlang Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.erl'), :entry_function => path('main')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Erlang Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:erlang:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:erlang:run', entities[:entry_function], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Haskell Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.hs'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Haskell Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:haskell:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:haskell:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Java Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('Main.java'), :executable => path('Main')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Java Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:java:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:java:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Lisp Submission'
|
|
3
|
+
|
|
4
|
+
entities :executable => path('main.lisp')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Lisp Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
timeout specs[:time] do
|
|
22
|
+
total_memory_out specs[:memory] do
|
|
23
|
+
rake_clean 'win:lisp:run', entities[:executable], input
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Lua Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.lua'), :executable => path('main.out')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Lua Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:lua:compile', entities[:source_file], entities[:executable]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:lua:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple OCaml Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.ml'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'OCaml Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:ocaml:compile', entities[:source_file], entities[:executable]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:ocaml:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Pascal Submission'
|
|
3
|
+
|
|
4
|
+
entities :source_file => path('main.pas'), :executable => path('main.exe')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Pascal Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
rake_clean 'win:pascal:compile', entities[:source_file]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_step Proc do
|
|
25
|
+
timeout specs[:time] do
|
|
26
|
+
total_memory_out specs[:memory] do
|
|
27
|
+
rake_clean 'win:pascal:run', entities[:executable], input
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple Perl Submission'
|
|
3
|
+
|
|
4
|
+
entities :executable => path('main.pl')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'Perl Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
timeout specs[:time] do
|
|
22
|
+
total_memory_out specs[:memory] do
|
|
23
|
+
rake_clean 'win:perl:run', entities[:executable], input
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
submission do
|
|
2
|
+
name 'Simple PHP Submission'
|
|
3
|
+
|
|
4
|
+
entities :executable => path('main.php')
|
|
5
|
+
|
|
6
|
+
options :tests => {:report => {:differences => true, :time => true, :specs => true},
|
|
7
|
+
:steps => {:break => {:unsuccessful => true}}}
|
|
8
|
+
|
|
9
|
+
YAML.load_file('tests.yml').each_with_index do |specs, i|
|
|
10
|
+
|
|
11
|
+
add_test TestCase do
|
|
12
|
+
name "Test #{i + 1}"
|
|
13
|
+
|
|
14
|
+
input specs[:input]
|
|
15
|
+
output specs[:output]
|
|
16
|
+
|
|
17
|
+
runner TestRunner do
|
|
18
|
+
name 'PHP Runner'
|
|
19
|
+
|
|
20
|
+
add_step Proc do
|
|
21
|
+
timeout specs[:time] do
|
|
22
|
+
total_memory_out specs[:memory] do
|
|
23
|
+
rake_clean 'win:php:run', entities[:executable], input
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|