uttk 0.3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +36 -0
- data/COPYING +18 -0
- data/ChangeLog +7673 -0
- data/GUIDELINES +86 -0
- data/LGPL +504 -0
- data/NEWS +158 -0
- data/NORM +137 -0
- data/README +180 -0
- data/Rakefile +8 -0
- data/SPEC.gemspec +15 -0
- data/SPEC.yml +60 -0
- data/TODO +23 -0
- data/TODO.old +31 -0
- data/VERSION +5 -0
- data/bin/getopts/uttk.rb +390 -0
- data/bin/uttk +188 -0
- data/bin/uttk-unit +125 -0
- data/lib/uttk.rb +288 -0
- data/lib/uttk/dumpers/Basic.rb +23 -0
- data/lib/uttk/dumpers/BasicColor.rb +35 -0
- data/lib/uttk/dumpers/Dumper.rb +77 -0
- data/lib/uttk/dumpers/Html.rb +271 -0
- data/lib/uttk/dumpers/Path.rb +24 -0
- data/lib/uttk/dumpers/Xml.rb +88 -0
- data/lib/uttk/dumpers/Yaml.rb +138 -0
- data/lib/uttk/filters.rb +128 -0
- data/lib/uttk/filters/Buffer.rb +119 -0
- data/lib/uttk/filters/Compact.rb +75 -0
- data/lib/uttk/filters/Default.rb +27 -0
- data/lib/uttk/filters/DefaultColor.rb +27 -0
- data/lib/uttk/filters/Filter.rb +53 -0
- data/lib/uttk/filters/Id.rb +30 -0
- data/lib/uttk/filters/JustStatus.rb +25 -0
- data/lib/uttk/filters/KeepSkipBased.rb +38 -0
- data/lib/uttk/filters/NodeCut.rb +97 -0
- data/lib/uttk/filters/RPathFilter.rb +134 -0
- data/lib/uttk/filters/Saver.rb +53 -0
- data/lib/uttk/filters/TextFilter.rb +69 -0
- data/lib/uttk/generators/dumper_generator.rb +28 -0
- data/lib/uttk/generators/filter_generator.rb +28 -0
- data/lib/uttk/generators/generator.rb +86 -0
- data/lib/uttk/generators/generator_generator.rb +26 -0
- data/lib/uttk/generators/loader_generator.rb +28 -0
- data/lib/uttk/generators/path_filter_generator.rb +28 -0
- data/lib/uttk/generators/strategy_generator.rb +28 -0
- data/lib/uttk/generators/templates/dumper.rb +50 -0
- data/lib/uttk/generators/templates/filter.rb +50 -0
- data/lib/uttk/generators/templates/generator.rb +28 -0
- data/lib/uttk/generators/templates/loader.rb +26 -0
- data/lib/uttk/generators/templates/path_filter.rb +28 -0
- data/lib/uttk/generators/templates/strategy.rb +59 -0
- data/lib/uttk/generators/templates/strategy.yml +28 -0
- data/lib/uttk/generators/templates/unit_test.rb +46 -0
- data/lib/uttk/loaders/Loader.rb +180 -0
- data/lib/uttk/loaders/Ruby.rb +28 -0
- data/lib/uttk/loaders/Yaml.rb +98 -0
- data/lib/uttk/logger.rb +306 -0
- data/lib/uttk/logger/backend.rb +170 -0
- data/lib/uttk/logger/path.rb +202 -0
- data/lib/uttk/logger/section_node.rb +214 -0
- data/lib/uttk/logger/severity.rb +63 -0
- data/lib/uttk/logger/to_uttk_log.rb +127 -0
- data/lib/uttk/logger/verbosity.rb +61 -0
- data/lib/uttk/logger_factory.rb +55 -0
- data/lib/uttk/path_filters/ColorStatus.rb +57 -0
- data/lib/uttk/path_filters/PathFilter.rb +27 -0
- data/lib/uttk/path_filters/RemoveTypes.rb +25 -0
- data/lib/uttk/status.rb +146 -0
- data/lib/uttk/strategies/Abort.rb +24 -0
- data/lib/uttk/strategies/Assert.rb +44 -0
- data/lib/uttk/strategies/Authors.rb +45 -0
- data/lib/uttk/strategies/Block.rb +113 -0
- data/lib/uttk/strategies/Bootstrap.rb +55 -0
- data/lib/uttk/strategies/Checkout.rb +64 -0
- data/lib/uttk/strategies/Clean.rb +29 -0
- data/lib/uttk/strategies/Cmd.rb +60 -0
- data/lib/uttk/strategies/CmdBase.rb +130 -0
- data/lib/uttk/strategies/Collection.rb +158 -0
- data/lib/uttk/strategies/Compile.rb +59 -0
- data/lib/uttk/strategies/Composite.rb +201 -0
- data/lib/uttk/strategies/Composite/contents_eval.rb +40 -0
- data/lib/uttk/strategies/Configure.rb +66 -0
- data/lib/uttk/strategies/Error.rb +23 -0
- data/lib/uttk/strategies/Fail.rb +26 -0
- data/lib/uttk/strategies/IOBased.rb +159 -0
- data/lib/uttk/strategies/Import.rb +60 -0
- data/lib/uttk/strategies/Iterate.rb +139 -0
- data/lib/uttk/strategies/JUnit.rb +205 -0
- data/lib/uttk/strategies/KillAll.rb +62 -0
- data/lib/uttk/strategies/Make.rb +94 -0
- data/lib/uttk/strategies/Package.rb +129 -0
- data/lib/uttk/strategies/PackageCollection.rb +78 -0
- data/lib/uttk/strategies/Pass.rb +24 -0
- data/lib/uttk/strategies/Pool.rb +104 -0
- data/lib/uttk/strategies/ProbabilityThreshold.rb +46 -0
- data/lib/uttk/strategies/Proxy.rb +42 -0
- data/lib/uttk/strategies/RMatch.rb +92 -0
- data/lib/uttk/strategies/RUnit.rb +132 -0
- data/lib/uttk/strategies/SignalCmd.rb +85 -0
- data/lib/uttk/strategies/Sleep.rb +36 -0
- data/lib/uttk/strategies/SqlQuery.rb +120 -0
- data/lib/uttk/strategies/Strategy.rb +683 -0
- data/lib/uttk/strategies/Stub.rb +37 -0
- data/lib/uttk/strategies/SubCmd.rb +77 -0
- data/lib/uttk/strategies/Suite.rb +71 -0
- data/lib/uttk/strategies/Test.rb +89 -0
- data/lib/uttk/streams.rb +69 -0
- data/lib/uttk/streams/Diff.rb +60 -0
- data/lib/uttk/streams/HexaDiff.rb +35 -0
- data/lib/uttk/streams/Stream.rb +76 -0
- data/lib/uttk/weights.rb +17 -0
- data/lib/uttk/weights/WExpr.rb +68 -0
- data/lib/uttk/weights/WFloat.rb +23 -0
- data/lib/uttk/weights/WMin.rb +22 -0
- data/lib/uttk/weights/Weight.rb +105 -0
- data/lib/www/javascripts/uttk.js +185 -0
- data/misc/expandtab.rb +29 -0
- data/misc/header.rb +44 -0
- data/misc/renaming +57 -0
- data/misc/textile_compiler +194 -0
- data/misc/uttk-grep.sh +8 -0
- data/misc/uttk-line-count.rb +143 -0
- data/test/examples-suite.yml +8 -0
- data/test/examples/README +68 -0
- data/test/examples/basic.rb +10 -0
- data/test/examples/basic.yml +9 -0
- data/test/examples/cache/cache_and_fatal.yml +5 -0
- data/test/examples/cache/simple.yml +30 -0
- data/test/examples/sql/basic.yml +24 -0
- data/test/examples/students-suite.yml +9 -0
- data/test/examples/students/ball.yml +11 -0
- data/test/examples/students/glob_stud.yml +20 -0
- data/test/examples/students/mini-lib.yml +61 -0
- data/test/examples/students/pool_stud.yml +31 -0
- data/test/examples/students/stud.yml +21 -0
- data/test/fixtures/ball/20040804-exam_a1-zapngo-tessar_m.tar.gz +0 -0
- data/test/fixtures/ball/Makefile +24 -0
- data/test/fixtures/ball/bar_p-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/bar_p-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/bar_p-mini-lib/my_strlen.c +13 -0
- data/test/fixtures/ball/foo_s-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/foo_s-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/foo_s-mini-lib/configure +2 -0
- data/test/fixtures/ball/foo_s-mini-lib/my_strlen.c +10 -0
- data/test/fixtures/ball/hello.tar.bz2 +0 -0
- data/test/fixtures/ball/hello.tar.gz +0 -0
- data/test/fixtures/ball/hello/Makefile +14 -0
- data/test/fixtures/ball/hello/hello.c +7 -0
- data/test/fixtures/ball/jack-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/jack-exit/Makefile +14 -0
- data/test/fixtures/ball/jack-exit/exit.c +16 -0
- data/test/fixtures/ball/joe-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/joe-exit/Makefile +14 -0
- data/test/fixtures/ball/joe-exit/exit.c +8 -0
- data/test/fixtures/ball/joe_i-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/joe_i-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/joe_i-mini-lib/configure +2 -0
- data/test/fixtures/ball/joe_i-mini-lib/my_strlen.c +10 -0
- data/test/fixtures/ball/john-exit.tar.bz2 +0 -0
- data/test/fixtures/ball/john-exit/Makefile +14 -0
- data/test/fixtures/ball/john-exit/exit.c +6 -0
- data/test/fixtures/ball/qux_j-mini-lib.tar.bz2 +0 -0
- data/test/fixtures/ball/qux_j-mini-lib/Makefile +20 -0
- data/test/fixtures/ball/qux_j-mini-lib/my_strlen.c +12 -0
- data/test/fixtures/binaries/segv +0 -0
- data/test/fixtures/binaries/segv.c +10 -0
- data/test/fixtures/binaries/segv.rb +2 -0
- data/test/fixtures/demo/command-tutorial/steps/1/check.yml +5 -0
- data/test/fixtures/demo/command-tutorial/steps/1/pluralizer.rb +10 -0
- data/test/fixtures/demo/command-tutorial/steps/2/bad_check.yml +7 -0
- data/test/fixtures/demo/command-tutorial/steps/2/check.yml +7 -0
- data/test/fixtures/demo/command-tutorial/steps/2/pluralizer.rb +10 -0
- data/test/fixtures/demo/command-tutorial/steps/3.1/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/3/check.yml +14 -0
- data/test/fixtures/demo/command-tutorial/steps/4.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/4.1/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/4/check.yml +12 -0
- data/test/fixtures/demo/command-tutorial/steps/4/pluralizer.rb +12 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/check.yml +17 -0
- data/test/fixtures/demo/command-tutorial/steps/5.1/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/5/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/5/check.yml +16 -0
- data/test/fixtures/demo/command-tutorial/steps/5/pluralizer.rb +16 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/check.yml +22 -0
- data/test/fixtures/demo/command-tutorial/steps/6.1/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/6/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/6/check.yml +21 -0
- data/test/fixtures/demo/command-tutorial/steps/6/pluralizer.rb +17 -0
- data/test/fixtures/demo/command-tutorial/steps/7/bird.txt +1 -0
- data/test/fixtures/demo/command-tutorial/steps/7/check.yml +22 -0
- data/test/fixtures/demo/command-tutorial/steps/7/pluralizer.rb +17 -0
- data/test/fixtures/demo/filter-tutorial/check.yml +20 -0
- data/test/fixtures/demo/filter-tutorial/filters/CutSkip100.rb +19 -0
- data/test/fixtures/demo/filter-tutorial/pluralizer.rb +17 -0
- data/test/fixtures/java/unit/MultiRight/Foo/Foo.java +11 -0
- data/test/fixtures/java/unit/MultiRight/Foo/FooTest.java +15 -0
- data/test/fixtures/java/unit/MultiRight/MultiRight.java +13 -0
- data/test/fixtures/java/unit/MultiRight/MultiRightTest.java +12 -0
- data/test/fixtures/java/unit/MultiRight/bar/Bar.java +11 -0
- data/test/fixtures/java/unit/MultiRight/bar/BarTest.java +21 -0
- data/test/fixtures/java/unit/MultiRight/build.sh +7 -0
- data/test/fixtures/java/unit/SimpleException/SimpleExceptionTest.java +11 -0
- data/test/fixtures/java/unit/SimpleException/build.sh +4 -0
- data/test/fixtures/java/unit/build.sh +9 -0
- data/test/fixtures/java/unit/multibar.yml +6 -0
- data/test/fixtures/java/unit/multifoo.yml +6 -0
- data/test/fixtures/java/unit/multiright.yml +8 -0
- data/test/fixtures/java/unit/simple_exception.yml +6 -0
- data/test/fixtures/mini-lib/Makefile +9 -0
- data/test/fixtures/mini-lib/strlen.c +15 -0
- data/test/fixtures/package/pkg_foo.tar.gz +0 -0
- data/test/fixtures/package/pkg_foo/Makefile +20 -0
- data/test/fixtures/package/pkg_foo/bootstrap +3 -0
- data/test/fixtures/package/pkg_foo/configure +3 -0
- data/test/fixtures/package/pkg_foo/foo.sh +2 -0
- data/test/fixtures/text/1.txt +4 -0
- data/test/fixtures/unit/bad.rb +26 -0
- data/test/fixtures/unit/error.rb +6 -0
- data/test/fixtures/unit/good.rb +26 -0
- data/test/functional-suite.yml +10 -0
- data/test/functional/author.yml +11 -0
- data/test/functional/base.yml +119 -0
- data/test/functional/base_pool.yml +13 -0
- data/test/functional/block.yml +13 -0
- data/test/functional/cat.yml +16 -0
- data/test/functional/cmd.yml +17 -0
- data/test/functional/diff.yml +27 -0
- data/test/functional/env_cmd.yml +53 -0
- data/test/functional/exit.yml +15 -0
- data/test/functional/fatal.yml +23 -0
- data/test/functional/glob.yml +11 -0
- data/test/functional/hexa-diff.yml +25 -0
- data/test/functional/import.yml +41 -0
- data/test/functional/iterate.yml +99 -0
- data/test/functional/killall.yml +31 -0
- data/test/functional/pkg.yml +14 -0
- data/test/functional/probability_threshold.yml +35 -0
- data/test/functional/r_unit.yml +26 -0
- data/test/functional/rmatch.yml +122 -0
- data/test/functional/signal_cmd.yml +22 -0
- data/test/functional/sub.yml +15 -0
- data/test/functional/test.yml +25 -0
- data/test/functional/timeout.yml +20 -0
- data/test/functional/wc.yml +26 -0
- data/test/functional/weight.yml +152 -0
- data/test/pkg-suite.yml +8 -0
- data/test/pkg/cmdline.yml +80 -0
- data/test/pool-suite.yml +8 -0
- data/test/pool/base.yml +12 -0
- data/test/pool/pool.yml +25 -0
- data/test/ruby-suite.rb +10 -0
- data/test/ruby-suite.yml +5 -0
- data/test/ruby/base.rb +119 -0
- data/test/ruby/iterate.rb +21 -0
- data/test/ruby/wc.rb +43 -0
- data/test/unit-suite.yml +10 -0
- data/test/unit/dumpers/path_test.rb +46 -0
- data/test/unit/dumpers/xml_test.rb +65 -0
- data/test/unit/dumpers/yaml_test.rb +65 -0
- data/test/unit/filters/buffer_test.rb +168 -0
- data/test/unit/filters/keep_skip_based_test.rb +46 -0
- data/test/unit/filters/node_cut_test.rb +72 -0
- data/test/unit/filters/rpath_filter_test.rb +191 -0
- data/test/unit/filters/text_filter_test.rb +46 -0
- data/test/unit/filters_test.rb +119 -0
- data/test/unit/logger/section_node_test.rb +120 -0
- data/test/unit/logger/severity_test.rb +37 -0
- data/test/unit/logger/to_uttk_log_test.rb +113 -0
- data/test/unit/logger/verbosity_test.rb +44 -0
- data/test/unit/logger_test.rb +203 -0
- data/test/unit/strategies/suite_test.rb +151 -0
- data/test/uttk-check.yml +8 -0
- data/test/uttk-distcheck.yml +18 -0
- metadata +399 -0
@@ -0,0 +1,99 @@
|
|
1
|
+
Test the Iterate strategy: !S::Suite
|
2
|
+
contents:
|
3
|
+
- Iterate over a range: !S::Iterate
|
4
|
+
over: !range 0...4
|
5
|
+
with: each
|
6
|
+
iter: it
|
7
|
+
test:
|
8
|
+
Test on turn <<it>>: !S::Assert
|
9
|
+
test: |
|
10
|
+
assert_equal('<<it>>', '<<it:i>>')
|
11
|
+
assert_equal('<<it>>', '<<it:0>>')
|
12
|
+
|
13
|
+
- Iterate over a range of Error: !S::Iterate
|
14
|
+
over: !range 0...4
|
15
|
+
with: each
|
16
|
+
iter: it
|
17
|
+
test:
|
18
|
+
Test on turn <<it>>: !S::Error
|
19
|
+
weight: -1
|
20
|
+
|
21
|
+
- Nested iterations: !S::Iterate
|
22
|
+
over: !range 0..2
|
23
|
+
iter: ita
|
24
|
+
test:
|
25
|
+
Sub iteration <<ita>>: !S::Iterate
|
26
|
+
over: !range 0..1
|
27
|
+
iter: itb
|
28
|
+
test:
|
29
|
+
Iteration (<<ita>>, <<itb>>): !S::Pass {}
|
30
|
+
|
31
|
+
- Setup a ruby extension for tests: !S::Block
|
32
|
+
test: |
|
33
|
+
module ::Enumerable
|
34
|
+
def uttk_test_iterate_each ( *a, &b )
|
35
|
+
uttk_each { |a| b[*(a.to_a)] }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
true
|
39
|
+
|
40
|
+
- Many iterators can be used: !S::Suite
|
41
|
+
symbols:
|
42
|
+
results: []
|
43
|
+
contents:
|
44
|
+
- Feed the result list: !S::Iterate
|
45
|
+
over: [it, [ita, itb, itc, itd, ite]]
|
46
|
+
with: uttk_test_iterate_each
|
47
|
+
iter: pit
|
48
|
+
test:
|
49
|
+
Iterate with this iterator <<*pit>>: !S::Iterate
|
50
|
+
over: !ruby |
|
51
|
+
[0..4, 2..2, 'a'..'c']
|
52
|
+
with: uttk_test_iterate_each
|
53
|
+
iter: <<*pit>>
|
54
|
+
test:
|
55
|
+
Many iterators <<<<pit>>:i>>: !S::Block
|
56
|
+
test: |
|
57
|
+
@symtbl[:results] << '<<<<pit>>:i>>, <<*<<pit>>>>, ' +
|
58
|
+
'"<<<<pit>>>>", "<<<<pit>>:1>>", "<<<<pit:2>>>>"'
|
59
|
+
|
60
|
+
- Check the results contents: !S::Assert
|
61
|
+
symbols:
|
62
|
+
ref_results:
|
63
|
+
- '0, [0, 1, 2, 3, 4], "0", "1", "<<<<pit:2>>>>"'
|
64
|
+
- '1, [2], "2", "1", "<<<<pit:2>>>>"' # the 2nd "1" is undef
|
65
|
+
- '2, ["a", "b", "c"], "a", "b", "<<<<pit:2>>>>"'
|
66
|
+
- '0, [0, 1, 2, 3, 4], "0", "1", "2"'
|
67
|
+
- '1, [2], "2", "1", "2"'
|
68
|
+
- '2, ["a", "b", "c"], "a", "b", "c"'
|
69
|
+
test: |
|
70
|
+
assert_equal(@symtbl[:ref_results], @symtbl[:results])
|
71
|
+
|
72
|
+
- Iterate can deal with many structures: !S::Suite
|
73
|
+
symbols:
|
74
|
+
results: []
|
75
|
+
attributes: !S::Iterate
|
76
|
+
iter: it
|
77
|
+
test:
|
78
|
+
Iterate over many structures <<it:i>>: !S::Block
|
79
|
+
test: |
|
80
|
+
@symtbl[:results] << '<<*it>>'
|
81
|
+
contents:
|
82
|
+
- Iterate over arrays:
|
83
|
+
over: [1, 3, 7, 1042]
|
84
|
+
- Iterate over ranges:
|
85
|
+
over: !ruby "'p'..'r'" # FIXME !range
|
86
|
+
- Iterate over a pathname list:
|
87
|
+
over: !filelist <<pwd>>/../fixtures/ball/*-mini-lib.tar.*
|
88
|
+
- Iterate over a hash:
|
89
|
+
over:
|
90
|
+
foo: bar
|
91
|
+
bar: baz
|
92
|
+
qux: foo
|
93
|
+
- Iterate over a Ruby value:
|
94
|
+
over: !ruby |
|
95
|
+
[2] * 3
|
96
|
+
|
97
|
+
- Check the results contents: !S::Assert
|
98
|
+
test: |
|
99
|
+
assert_equal(17, @symtbl[:results].size)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#FIXME: return always 83% with the new input format.
|
2
|
+
---
|
3
|
+
|
4
|
+
The KillAll test suite: !S::Suite
|
5
|
+
attributes: !S::KillAll {}
|
6
|
+
contents:
|
7
|
+
|
8
|
+
- Kill when nothing to kill:
|
9
|
+
regexp: !re unexisting_process
|
10
|
+
|
11
|
+
- Killall sleep 1:
|
12
|
+
regexp: !re sleep 42
|
13
|
+
weight: 0
|
14
|
+
|
15
|
+
- Killall sleep 2:
|
16
|
+
regexp: !re sleep 42
|
17
|
+
|
18
|
+
- Launch a long command in background: !S::Cmd
|
19
|
+
command: sleep 42 &
|
20
|
+
fatal: true
|
21
|
+
|
22
|
+
- Killall sleep 3:
|
23
|
+
regexp: !re sleep 42
|
24
|
+
weight: -1
|
25
|
+
|
26
|
+
- Wait a little bit: !S::Sleep
|
27
|
+
delay: 0.1
|
28
|
+
|
29
|
+
- Zombie Verification Killall: !S::Cmd
|
30
|
+
exit: 1
|
31
|
+
command: killall -v sleep
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the Package strategy: !S::Suite
|
4
|
+
attributes: !S::Package {}
|
5
|
+
contents:
|
6
|
+
- Test the foo package:
|
7
|
+
url: file://<<pwd>>/../fixtures/package/pkg_foo.tar.gz
|
8
|
+
test:
|
9
|
+
Test yo: !S::Cmd
|
10
|
+
dir: '<<extract_dir>>'
|
11
|
+
command: ./foo.sh
|
12
|
+
output: |
|
13
|
+
Foo !!!
|
14
|
+
exit: 0
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the ProbabilityThreshold strategy: !S::Suite
|
4
|
+
|
5
|
+
attributes: !S::ProbabilityThreshold
|
6
|
+
test:
|
7
|
+
Simple test (0.625): !S::Fail
|
8
|
+
value: 0.625
|
9
|
+
|
10
|
+
contents:
|
11
|
+
|
12
|
+
- bad too high:
|
13
|
+
threshold: 1.1
|
14
|
+
weight: -1
|
15
|
+
|
16
|
+
- bad too low:
|
17
|
+
threshold: -0.1
|
18
|
+
weight: -1
|
19
|
+
|
20
|
+
- strict threshold:
|
21
|
+
threshold: 1
|
22
|
+
weight: -1
|
23
|
+
|
24
|
+
- easy threshold:
|
25
|
+
threshold: 0
|
26
|
+
|
27
|
+
- exact:
|
28
|
+
threshold: 0.625
|
29
|
+
|
30
|
+
- too high:
|
31
|
+
threshold: 0.9
|
32
|
+
weight: -1
|
33
|
+
|
34
|
+
- low:
|
35
|
+
threshold: 0.5
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
RUnit strategy test suite: !S::RMatch
|
3
|
+
symbols:
|
4
|
+
unit_dir: <<pwd>>/../fixtures/unit
|
5
|
+
test: !S::Suite
|
6
|
+
attributes: !S::RUnit {}
|
7
|
+
contents:
|
8
|
+
- good:
|
9
|
+
input: !path <<unit_dir>>/good.rb
|
10
|
+
- bad:
|
11
|
+
input: !path <<unit_dir>>/bad.rb
|
12
|
+
- error:
|
13
|
+
input: !path <<unit_dir>>/error.rb
|
14
|
+
- good directory:
|
15
|
+
input: !path fixtures/unit/good.rb
|
16
|
+
dir: <<pwd>>/..
|
17
|
+
verbose: true
|
18
|
+
- bad directory:
|
19
|
+
input: !path fixtures/unit/bad.rb
|
20
|
+
dir: <<pwd>>/..
|
21
|
+
match:
|
22
|
+
- ///good/status/PASS
|
23
|
+
- ///^bad$/status/FAIL
|
24
|
+
- ///^bad directory$/status/FAIL
|
25
|
+
- ///error/status/ERROR
|
26
|
+
- //status/FAIL\(40%\)
|
@@ -0,0 +1,122 @@
|
|
1
|
+
Test the rmatch strategy: !S::Suite
|
2
|
+
|
3
|
+
contents:
|
4
|
+
- Basic test suite: !S::Suite
|
5
|
+
|
6
|
+
attributes: !S::RMatch
|
7
|
+
test: &basic_stub
|
8
|
+
a: !S::Stub
|
9
|
+
returned_value:
|
10
|
+
b:
|
11
|
+
- c: d
|
12
|
+
- e: very_long_one
|
13
|
+
g: h
|
14
|
+
|
15
|
+
contents:
|
16
|
+
- Simple good test:
|
17
|
+
match:
|
18
|
+
- /
|
19
|
+
- /a
|
20
|
+
- /a/b
|
21
|
+
- ///
|
22
|
+
- /a/b/c
|
23
|
+
- /a/b/c/d
|
24
|
+
- /a/b/e/very_long_one
|
25
|
+
- /a/b/e/very_.*_one
|
26
|
+
- /a/g
|
27
|
+
- /a/g/h
|
28
|
+
dont_match:
|
29
|
+
- /c
|
30
|
+
- /a/b/c/d/e
|
31
|
+
- ///////
|
32
|
+
- /a/gh
|
33
|
+
|
34
|
+
- Simple bad test 1:
|
35
|
+
weight: -1
|
36
|
+
match:
|
37
|
+
- /
|
38
|
+
- /a/b/c/d/e
|
39
|
+
- /a/b
|
40
|
+
|
41
|
+
- Simple bad test 2:
|
42
|
+
weight: -1
|
43
|
+
dont_match:
|
44
|
+
- /c
|
45
|
+
- /a/b/c/d
|
46
|
+
- /a/b/c/d/e
|
47
|
+
|
48
|
+
- Bootstrapped test suite: !S::Suite
|
49
|
+
contents:
|
50
|
+
- good test 1: !S::RMatch
|
51
|
+
test:
|
52
|
+
x: !S::RMatch
|
53
|
+
test: *basic_stub
|
54
|
+
match:
|
55
|
+
- /a/b/e/very_long_one
|
56
|
+
- /a/b/e/very_.*_one
|
57
|
+
- /a/g
|
58
|
+
dont_match:
|
59
|
+
- /c
|
60
|
+
- /a/b/c/d/e
|
61
|
+
dont_match:
|
62
|
+
- //some_wanted_paths_are_missing
|
63
|
+
- //some_unwanted_paths_are_present
|
64
|
+
|
65
|
+
|
66
|
+
- bad test 1: !S::RMatch
|
67
|
+
test:
|
68
|
+
x: !S::RMatch
|
69
|
+
test: *basic_stub
|
70
|
+
match:
|
71
|
+
- /
|
72
|
+
- /a/b/c/d/e
|
73
|
+
- /a/b
|
74
|
+
match:
|
75
|
+
- //some_wanted_paths_are_missing/\/a\/b\/c\/d\/e
|
76
|
+
dont_match:
|
77
|
+
- //some_unwanted_paths_are_present
|
78
|
+
|
79
|
+
- bad test 2: !S::RMatch
|
80
|
+
test:
|
81
|
+
x: !S::RMatch
|
82
|
+
test: *basic_stub
|
83
|
+
dont_match:
|
84
|
+
- /c
|
85
|
+
- /a/b/c/d
|
86
|
+
- /a/b/c/d/e
|
87
|
+
match:
|
88
|
+
- //some_unwanted_paths_are_present/^\/a\/b\/c\/d$
|
89
|
+
dont_match:
|
90
|
+
- //some_wanted_paths_are_missing
|
91
|
+
|
92
|
+
- Simple status checker: !S::RMatch
|
93
|
+
test:
|
94
|
+
First output of cache simple.yml: !S::Stub
|
95
|
+
returned_value:
|
96
|
+
root: !S::Suite
|
97
|
+
contents:
|
98
|
+
- Relaunch 5 times this test with the cache feature to obtain a PASS: !S::Suite
|
99
|
+
timeout: 1.2
|
100
|
+
attributes:
|
101
|
+
strategy: Uttk::Strategies::Sleep
|
102
|
+
delay: 1
|
103
|
+
contents:
|
104
|
+
- first: !S::Sleep
|
105
|
+
symbols:
|
106
|
+
foo: a
|
107
|
+
status: PASS
|
108
|
+
- second: !S::Sleep
|
109
|
+
symbols:
|
110
|
+
foo: a/b
|
111
|
+
status: ABORT
|
112
|
+
reason: abort `second' with timeout 1.2s
|
113
|
+
status: ABORT
|
114
|
+
reason: abort `second' with timeout 1.2s
|
115
|
+
status: FAIL
|
116
|
+
match:
|
117
|
+
- /F/r/c/R
|
118
|
+
- /////contents/first/status/PASS
|
119
|
+
- /////contents/second/status/ABORT
|
120
|
+
- /////status/ABORT
|
121
|
+
dont_match:
|
122
|
+
- /////contents/(third|(four|fi|six)th)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Check SignalCmd Strategy: !S::Suite
|
2
|
+
attributes: !S::SignalCmd
|
3
|
+
command: |
|
4
|
+
<<ruby>> -e 'Process.kill("SEGV", $$)'
|
5
|
+
contents:
|
6
|
+
|
7
|
+
- Test a simple Cmd:
|
8
|
+
command: echo toto
|
9
|
+
exit : 1
|
10
|
+
weight : -1
|
11
|
+
|
12
|
+
- Test a ABRT binary:
|
13
|
+
exit : 0
|
14
|
+
weight : -1
|
15
|
+
|
16
|
+
- Test a ABRT binary and check signal:
|
17
|
+
signal : SEGV
|
18
|
+
exit : 0
|
19
|
+
weight : -1
|
20
|
+
|
21
|
+
- Test a ABRT binary with good signal:
|
22
|
+
signal : ABRT
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test sub (sub.yml): !S::Suite
|
4
|
+
attributes: !S::SubCmd {}
|
5
|
+
contents:
|
6
|
+
- test sub pass:
|
7
|
+
input: --- !S::Pass {}
|
8
|
+
- test sub fail: !S::RMatch
|
9
|
+
test: !S::SubCmd
|
10
|
+
input: --- !S::Fail {}
|
11
|
+
match:
|
12
|
+
- /test/root/status/FAIL
|
13
|
+
- /test/status/FAIL
|
14
|
+
- test sub with args: { args: <<pwd>>/wc.yml }
|
15
|
+
- test sub with input: { input: !path <<pwd>>/wc.yml }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test test suite: !S::Suite
|
4
|
+
contents:
|
5
|
+
- simple digit key: !S::Test
|
6
|
+
expected_status: PASS
|
7
|
+
expected_log:
|
8
|
+
0: tata
|
9
|
+
ignored_value:
|
10
|
+
- benchmark
|
11
|
+
test:
|
12
|
+
simple digit key stub: !S::Stub
|
13
|
+
returned_value:
|
14
|
+
0: tata
|
15
|
+
- simple digit key fail: !S::Test
|
16
|
+
expected_status: PASS
|
17
|
+
expected_log:
|
18
|
+
0: toto
|
19
|
+
ignored_value:
|
20
|
+
- benchmark
|
21
|
+
test:
|
22
|
+
simple digit key stub: !S::Stub
|
23
|
+
returned_value:
|
24
|
+
0: tata
|
25
|
+
weight: -1
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test timeout option (timeout.yml): !S::Suite
|
4
|
+
|
5
|
+
attributes: !S::Cmd
|
6
|
+
command: sleep
|
7
|
+
exit: 0
|
8
|
+
timeout: 1
|
9
|
+
|
10
|
+
contents:
|
11
|
+
|
12
|
+
- I am suppose to FAIL:
|
13
|
+
args: 42
|
14
|
+
weight: -1
|
15
|
+
|
16
|
+
- I am suppose to PASS:
|
17
|
+
args: 0
|
18
|
+
|
19
|
+
- Zombie Verification Killall: !S::KillAll
|
20
|
+
regexp: !re sleep
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the wc command (wc.yml): !S::Suite
|
4
|
+
attributes: !S::Cmd
|
5
|
+
command: "wc -c"
|
6
|
+
exit: 0
|
7
|
+
contents:
|
8
|
+
- good foo:
|
9
|
+
input: 'foo'
|
10
|
+
output: !re \s*3\n$
|
11
|
+
|
12
|
+
- bad foo:
|
13
|
+
input: 'foo'
|
14
|
+
output: !re \s*4\n$
|
15
|
+
weight: -1
|
16
|
+
|
17
|
+
- good foo foo:
|
18
|
+
input: "foo\n foo"
|
19
|
+
output: !re \s*8\n$
|
20
|
+
|
21
|
+
- useless foo:
|
22
|
+
input: "foo"
|
23
|
+
|
24
|
+
- from file test:
|
25
|
+
input: !path '<<pwd>>/../fixtures/text/1.txt'
|
26
|
+
output: !re \s*272\s
|