gettc 1.7.4 → 1.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gettc +0 -0
- data/core/lib/version.rb +1 -1
- data/dist/config.yml +1 -1
- data/dist/template/bin/runner.sh +16 -13
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a749b72f782e9dd4eb99402eef64b9f522dab5e
|
4
|
+
data.tar.gz: bd0188164895468f19e6bac14a14ac166f5e8bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28c5e11d377ade6b796431b3fa8e0637a2c796aad1f3978dc08fca0487283e42dde54f1c1c9fd2f1c3cd4caa28e813819a46e13a741a564259c8e980efe68a2c
|
7
|
+
data.tar.gz: 3dbbfd3dd916f2428a8a4222466af226fbf227f8170fc56967e1f5ebe44fd760afa63d754ee31e93262a5fdb0a00aee3b4b6f597574f55f91f07535fd91e6d02
|
data/bin/gettc
CHANGED
File without changes
|
data/core/lib/version.rb
CHANGED
data/dist/config.yml
CHANGED
data/dist/template/bin/runner.sh
CHANGED
@@ -13,10 +13,13 @@ command_exists () {
|
|
13
13
|
|
14
14
|
timeit () {
|
15
15
|
if command_exists /usr/bin/time ; then
|
16
|
-
/usr/bin/time -o /dev/null echo "
|
16
|
+
/usr/bin/time -o /dev/null echo "testing availability of the time command" &>/dev/null
|
17
17
|
if [ $? -eq 0 ]; then
|
18
18
|
/usr/bin/time -o $ostream "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
|
19
19
|
return
|
20
|
+
elif [ $mode = 'verbose' ]; then
|
21
|
+
/usr/bin/time "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
|
22
|
+
return
|
20
23
|
fi
|
21
24
|
elif [ $mode = 'verbose' ]; then
|
22
25
|
if command_exists time ; then
|
@@ -43,17 +46,17 @@ view_file () {
|
|
43
46
|
}
|
44
47
|
|
45
48
|
report_case () {
|
46
|
-
write '
|
49
|
+
write ' input: '
|
47
50
|
view_file "$data_d/$test_case.in"
|
48
|
-
write '
|
51
|
+
write ' expected: '
|
49
52
|
view_file "$data_d/$test_case.out"
|
50
|
-
write '
|
53
|
+
write ' received: '
|
51
54
|
view_file "$output_d/$test_case.out"
|
52
55
|
}
|
53
56
|
|
54
57
|
init () {
|
55
|
-
export
|
56
|
-
export
|
58
|
+
export time="time: %es - memory: %mk"
|
59
|
+
export timeformat=%3lr
|
57
60
|
|
58
61
|
if [ ! -d "$output_d" ]; then
|
59
62
|
mkdir "$output_d"
|
@@ -91,37 +94,37 @@ main () {
|
|
91
94
|
test_case=`basename "$input"`
|
92
95
|
test_case=${test_case%.in}
|
93
96
|
|
94
|
-
write "
|
97
|
+
write "check $test_case ... "
|
95
98
|
timeit "$solver" "$data_d/$test_case.in" "$output_d/$test_case.out"
|
96
99
|
"$checker" "$data_d/$test_case.out" "$output_d/$test_case.out" > $ostream
|
97
100
|
retcode=$?
|
98
101
|
|
99
102
|
if [ $retcode -eq 0 ]; then
|
100
|
-
puts '
|
103
|
+
puts 'passed'
|
101
104
|
|
102
105
|
elif [ $retcode -eq 1 ]; then
|
103
106
|
fails=$(( fails + 1 ))
|
104
107
|
failstr="$failstr $test_case"
|
105
|
-
puts '
|
108
|
+
puts 'failed'
|
106
109
|
report_case "$test_case"
|
107
110
|
|
108
111
|
else
|
109
112
|
errors=$(( errors + 1 ))
|
110
113
|
errorstr="$errorstr $test_case"
|
111
|
-
puts '
|
114
|
+
puts 'error'
|
112
115
|
report_case "$test_case"
|
113
116
|
fi
|
114
117
|
fi
|
115
118
|
done
|
116
119
|
echo "$cases cases checked, $fails failed, $errors errored"
|
117
120
|
if [ $fails -gt 0 ]; then
|
118
|
-
echo "
|
121
|
+
echo "failed cases:${failstr}"
|
119
122
|
fi
|
120
123
|
if [ $errors -gt 0 ]; then
|
121
|
-
echo "
|
124
|
+
echo "errored cases:${errorstr}"
|
122
125
|
fi
|
123
126
|
|
124
127
|
}
|
125
128
|
|
126
129
|
init
|
127
|
-
main
|
130
|
+
main
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hpricot
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdiscount
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Given a TopCoder problem ID, gettc downloads the problem specification,
|
@@ -115,12 +115,12 @@ require_paths:
|
|
115
115
|
- core/lib
|
116
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- -
|
118
|
+
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|