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,26 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
class Good
|
5
|
+
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
test_section __FILE__ do
|
11
|
+
|
12
|
+
class GoodTest < Test::Unit::TestCase
|
13
|
+
|
14
|
+
def test_1
|
15
|
+
assert(true)
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_2
|
19
|
+
assert(true, 'good')
|
20
|
+
assert(true, 'very good')
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#FIXME: this test suite is not deterministic since timeout feature can imply
|
2
|
+
# an inconsistent result and so dumpers may raise an exception!
|
3
|
+
---
|
4
|
+
|
5
|
+
Uttk functional test suite: !S::Iterate
|
6
|
+
over: !pathlist <<pwd>>/functional/(*).yml
|
7
|
+
iter: [it_file, it_name]
|
8
|
+
test:
|
9
|
+
Test <<it_name>>: !S::Import
|
10
|
+
import: <<it_file>>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Test an exam tarball with an author
|
2
|
+
---
|
3
|
+
|
4
|
+
Prepare tarball and test (author.yml): !S::Suite
|
5
|
+
contents:
|
6
|
+
- Checkout the tarball: !S::Checkout
|
7
|
+
url: file://<<pwd>>/../fixtures/ball/20040804-exam_a1-zapngo-tessar_m.tar.gz
|
8
|
+
fatal: true
|
9
|
+
- Test the AUTHORS file: !S::Authors
|
10
|
+
author: tessar_m
|
11
|
+
dir: <<extract_dir>>
|
@@ -0,0 +1,119 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the basic features of Strategy and Suite (base.yml): !S::Suite
|
4
|
+
contents:
|
5
|
+
- pass: !S::Pass {}
|
6
|
+
- fail: !S::Fail
|
7
|
+
weight: -1
|
8
|
+
- error: !S::Error
|
9
|
+
weight: -1
|
10
|
+
- stub: !S::Stub
|
11
|
+
returned_value:
|
12
|
+
foo: bar
|
13
|
+
toto: tata
|
14
|
+
- abort: !S::Abort
|
15
|
+
weight: -1
|
16
|
+
- pass output: !S::RMatch
|
17
|
+
test: !S::Pass {}
|
18
|
+
match: [//status/PASS]
|
19
|
+
- fail output: !S::RMatch
|
20
|
+
test: !S::Fail {}
|
21
|
+
match: [//status/FAIL]
|
22
|
+
- error output: !S::RMatch
|
23
|
+
test: !S::Error {}
|
24
|
+
match: [//status/ERROR]
|
25
|
+
- stub output: !S::RMatch
|
26
|
+
test: !S::Stub
|
27
|
+
returned_value:
|
28
|
+
foo: bar
|
29
|
+
toto: tata
|
30
|
+
match:
|
31
|
+
- //foo/bar
|
32
|
+
- //toto/tata
|
33
|
+
- abort output: !S::RMatch
|
34
|
+
test: !S::Abort {}
|
35
|
+
match: [//status/ABORT]
|
36
|
+
- timeout sleep output: !S::RMatch
|
37
|
+
test: !S::Sleep
|
38
|
+
delay: 0.5
|
39
|
+
timeout: 0.2
|
40
|
+
match:
|
41
|
+
- //status/ABORT
|
42
|
+
- //reason/abort 'test' with timeout 0.2s
|
43
|
+
- timeout_suite: !S::Suite
|
44
|
+
timeout: 0.3
|
45
|
+
weight: -1
|
46
|
+
attributes: !S::Sleep
|
47
|
+
delay: 0.1
|
48
|
+
contents:
|
49
|
+
- a
|
50
|
+
- b
|
51
|
+
- c
|
52
|
+
- d
|
53
|
+
- cmd: !S::Cmd
|
54
|
+
command: 'true'
|
55
|
+
exit: 0
|
56
|
+
- bad cmd: !S::Cmd
|
57
|
+
weight: -1
|
58
|
+
command: /bin/unexisting_command
|
59
|
+
exit: 0
|
60
|
+
- abort cmd: !S::Suite
|
61
|
+
contents:
|
62
|
+
- cmd: !S::Cmd
|
63
|
+
weight: -1
|
64
|
+
timeout: 0.1
|
65
|
+
command: sleep
|
66
|
+
args: 1
|
67
|
+
- check for zombies: !S::KillAll
|
68
|
+
regexp: !re sleep
|
69
|
+
- abort suite cmd: !S::Suite
|
70
|
+
contents:
|
71
|
+
- suite: !S::Suite
|
72
|
+
weight: -1
|
73
|
+
timeout: 0.1
|
74
|
+
contents:
|
75
|
+
- cmd: !S::Cmd
|
76
|
+
command: sleep
|
77
|
+
args: 1
|
78
|
+
- check for zombies: !S::KillAll
|
79
|
+
regexp: !re sleep
|
80
|
+
- timeout suite of suite: !S::Suite
|
81
|
+
weight: -1
|
82
|
+
timeout: 0.01
|
83
|
+
contents:
|
84
|
+
- suite: !S::Suite
|
85
|
+
contents:
|
86
|
+
- pass: !S::Sleep
|
87
|
+
delay: 0.1
|
88
|
+
|
89
|
+
- true pre assertion and pass: !S::Pass
|
90
|
+
pre_assertion: true
|
91
|
+
|
92
|
+
- true pre assertion and fail: !S::Fail
|
93
|
+
pre_assertion: true
|
94
|
+
weight: -1
|
95
|
+
|
96
|
+
- false pre assertion and pass: !S::Pass
|
97
|
+
pre_assertion: false
|
98
|
+
weight: -1
|
99
|
+
|
100
|
+
- exception pre assertion and pass: !S::Pass
|
101
|
+
pre_assertion: raise 'ASSERT'
|
102
|
+
weight: -1
|
103
|
+
|
104
|
+
|
105
|
+
- true post assertion and pass: !S::Pass
|
106
|
+
post_assertion: true
|
107
|
+
|
108
|
+
- true post assertion and fail: !S::Fail
|
109
|
+
post_assertion: true
|
110
|
+
weight: -1
|
111
|
+
|
112
|
+
- false post assertion and pass: !S::Pass
|
113
|
+
post_assertion: false
|
114
|
+
weight: -1
|
115
|
+
|
116
|
+
- exception post assertion and pass: !S::Pass
|
117
|
+
post_assertion: raise 'ASSERT'
|
118
|
+
weight: -1
|
119
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Check Block (block.yml): !S::Suite
|
4
|
+
attributes: !S::Block {}
|
5
|
+
contents:
|
6
|
+
- test simple good block:
|
7
|
+
test: " 42 == 42 "
|
8
|
+
- test simple bad block:
|
9
|
+
test: " 42 == 43 "
|
10
|
+
weight: -1
|
11
|
+
- test simple block which raise an exception:
|
12
|
+
test: " fail('Explictly failed') "
|
13
|
+
weight: -1
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test cat program: !S::Suite
|
4
|
+
contents:
|
5
|
+
|
6
|
+
- simple equal: !S::Cmd
|
7
|
+
command: cat
|
8
|
+
input: !path <<pwd>>/cat.yml
|
9
|
+
output: !path <<pwd>>/cat.yml
|
10
|
+
|
11
|
+
- simple different: !S::Cmd
|
12
|
+
command: cat
|
13
|
+
weight: -1
|
14
|
+
input: !path <<pwd>>/cat.yml
|
15
|
+
output: !path <<pwd>>/../fixtures/text/1.txt
|
16
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test suite for the Cmd strategy: !S::Suite
|
4
|
+
|
5
|
+
contents:
|
6
|
+
|
7
|
+
# FIXME restore these tests and remove these weights
|
8
|
+
- segfault ruby: !S::Cmd
|
9
|
+
command: ruby
|
10
|
+
args: <<pwd>>/../fixtures/binaries/segv.rb
|
11
|
+
exit: 134
|
12
|
+
weight: -1
|
13
|
+
|
14
|
+
- segfault C: !S::Cmd
|
15
|
+
command: <<pwd>>/../fixtures/binaries/segv
|
16
|
+
exit: 139
|
17
|
+
weight: -1
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test Cmd with StreamDiff: !S::Suite
|
4
|
+
attributes: !S::Cmd
|
5
|
+
stream_class: Diff
|
6
|
+
command: cat
|
7
|
+
contents:
|
8
|
+
|
9
|
+
- simple valid:
|
10
|
+
input: |
|
11
|
+
foo
|
12
|
+
bar bar
|
13
|
+
fuu
|
14
|
+
output: |
|
15
|
+
foo
|
16
|
+
bar bar
|
17
|
+
fuu
|
18
|
+
|
19
|
+
- simple invalid:
|
20
|
+
weight: -1
|
21
|
+
input: |
|
22
|
+
foo
|
23
|
+
bar bar
|
24
|
+
fuu
|
25
|
+
output: |
|
26
|
+
foo
|
27
|
+
fuu
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the env feature in S::Cmd (env_cmd.yml): !S::Suite
|
4
|
+
contents:
|
5
|
+
|
6
|
+
- Check the env propagation with S::Cmd: !S::Suite
|
7
|
+
attributes: !S::Cmd
|
8
|
+
command: <<ruby>> -e "print ENV['FOO']"
|
9
|
+
exit: 0
|
10
|
+
|
11
|
+
contents:
|
12
|
+
- simple env:
|
13
|
+
env:
|
14
|
+
FOO: bar
|
15
|
+
DISPLAY: foo.bar:0
|
16
|
+
output: bar
|
17
|
+
|
18
|
+
- set symtbl[:bar] to 42: !S::Block
|
19
|
+
test: @symtbl[:bar] = 42
|
20
|
+
weight: 0
|
21
|
+
|
22
|
+
- advanced test <<bar>>:
|
23
|
+
env: { FOO: <<bar>> }
|
24
|
+
output: 42
|
25
|
+
|
26
|
+
- set symtbl[:foo] to 44: !S::Block
|
27
|
+
test: @symtbl[:foo] = 44
|
28
|
+
weight: 0
|
29
|
+
|
30
|
+
- double substitution test <<bar>>:
|
31
|
+
env: { FOO: <<bar>>43<<foo>> }
|
32
|
+
output: 424344
|
33
|
+
|
34
|
+
---
|
35
|
+
# FIXME these tests below was not ran since a long time the env feature no
|
36
|
+
# more works on blocks.
|
37
|
+
symbols:
|
38
|
+
env:
|
39
|
+
A: B
|
40
|
+
C: <<pwd>>/D
|
41
|
+
attributes: !S::Block {}
|
42
|
+
contents:
|
43
|
+
- Verify A in env:
|
44
|
+
test: "ENV['A'] == 'B'"
|
45
|
+
- Verify the suffix of C in env:
|
46
|
+
test: "ENV['C'] =~ /\/D$/"
|
47
|
+
- Verify the prefix of C in env:
|
48
|
+
test: "ENV['C'] == '<<pwd>>/D'"
|
49
|
+
- Append something to A:
|
50
|
+
symbols:
|
51
|
+
env:
|
52
|
+
A: $A:E
|
53
|
+
test: "ENV['A'] == 'B:E'"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the exit status verification: !S::Suite
|
4
|
+
attributes: !S::Cmd {}
|
5
|
+
contents:
|
6
|
+
- test1 true exit 0:
|
7
|
+
command: 'true'
|
8
|
+
exit: 0
|
9
|
+
- test2 false exit 1:
|
10
|
+
command: 'false'
|
11
|
+
exit: 1
|
12
|
+
- test3 false exit 42:
|
13
|
+
command: 'false'
|
14
|
+
exit: 42
|
15
|
+
weight: -1
|
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the fatal option (fatal.yml): !S::Suite
|
4
|
+
contents:
|
5
|
+
- 1/5 must pass: !S::Suite
|
6
|
+
attributes: !S::Pass {}
|
7
|
+
contents:
|
8
|
+
- test1 must fail: !S::Fail
|
9
|
+
weight: -1
|
10
|
+
- test2 must pass: {}
|
11
|
+
- test3 must be fatal: !S::Fail
|
12
|
+
fatal: true
|
13
|
+
weight: -1
|
14
|
+
- test4 not tested: { weight: -4 }
|
15
|
+
- test5 not tested: { weight: -4 }
|
16
|
+
|
17
|
+
- test6 must pass: !S::Pass
|
18
|
+
fatal: true
|
19
|
+
|
20
|
+
- test7 must fail: !S::Fail
|
21
|
+
weight: -1
|
22
|
+
|
23
|
+
- test8 must pass: !S::Pass {}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test a list of tarballs (glob.yml): !S::Iterate
|
4
|
+
over: !pathlist <<pwd>>/../fixtures/ball/(*).tar.bz2
|
5
|
+
iter: [ it_file, it_name ]
|
6
|
+
test:
|
7
|
+
Useless test suite for <<it_name>>: !S::Suite
|
8
|
+
contents:
|
9
|
+
- Pass 1: !S::Pass {}
|
10
|
+
- Fail 1: !S::Fail { weight: -1 }
|
11
|
+
- Pass 2: !S::Pass {}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test Cmd with StreamHexaDiff: !S::Suite
|
4
|
+
attributes: !S::Cmd
|
5
|
+
stream_class: HexaDiff
|
6
|
+
command: cat
|
7
|
+
contents:
|
8
|
+
|
9
|
+
- simple valid:
|
10
|
+
input: |
|
11
|
+
foo
|
12
|
+
bar bar
|
13
|
+
fuu
|
14
|
+
output: |
|
15
|
+
foo
|
16
|
+
bar bar
|
17
|
+
fuu
|
18
|
+
|
19
|
+
- simple invalid:
|
20
|
+
weight: -1
|
21
|
+
input: |
|
22
|
+
foo
|
23
|
+
bar bar
|
24
|
+
fuu
|
25
|
+
output: !path <<pwd>>/../fixtures/text/1.txt
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
Test the import strategy: !S::Suite
|
4
|
+
contents:
|
5
|
+
|
6
|
+
- Basic: !S::Import
|
7
|
+
import: '<<pwd>>/exit.yml'
|
8
|
+
|
9
|
+
- Generate a test: !S::Block
|
10
|
+
fatal: true
|
11
|
+
weight: 0
|
12
|
+
test: |
|
13
|
+
tmp = TempPath.new('import', 'yml')
|
14
|
+
@symtbl[:tmp] = tmp.expand_path
|
15
|
+
tmp.open('w') do |tmp|
|
16
|
+
tmp << '--- A bad test: !S::Fail {}'
|
17
|
+
end
|
18
|
+
|
19
|
+
- Test the generated test: !S::RMatch
|
20
|
+
test: !S::Import
|
21
|
+
import: '<<tmp>>'
|
22
|
+
match:
|
23
|
+
- //A bad test/status/FAIL
|
24
|
+
- //status/FAIL
|
25
|
+
|
26
|
+
- Clean: !S::Block
|
27
|
+
fatal: true
|
28
|
+
test: '@symtbl[:tmp].unlink'
|
29
|
+
|
30
|
+
- Bad pwd handling: !S::Suite
|
31
|
+
|
32
|
+
contents:
|
33
|
+
|
34
|
+
- Basic 1: !S::Import
|
35
|
+
loader: Ruby
|
36
|
+
import: '<<pwd>>/../ruby/wc.rb'
|
37
|
+
|
38
|
+
- Basic 2: !S::Import
|
39
|
+
import: '<<pwd>>/wc.yml'
|
40
|
+
|
41
|
+
|