auser-poolparty 0.2.66 → 0.2.67

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.
Files changed (159) hide show
  1. data/Manifest.txt +83 -41
  2. data/PostInstall.txt +2 -2
  3. data/README.txt +1 -2
  4. data/Rakefile +14 -1
  5. data/bin/cloud-start +11 -10
  6. data/bin/{pool-spec → pool-generate} +0 -0
  7. data/bin/pool-init +3 -3
  8. data/bin/pool-start +8 -7
  9. data/bin/server-update-hosts +1 -1
  10. data/lib/erlang/messenger/ebin/pm_client_rel-0.1.rel +1 -1
  11. data/lib/erlang/messenger/ebin/pm_master_rel-0.1.rel +1 -1
  12. data/lib/erlang/messenger/ebin/pm_node_rel-0.1.rel +1 -1
  13. data/lib/erlang/messenger/include/defines.hrl +7 -3
  14. data/lib/erlang/messenger/lib/eunit/.svn/all-wcprops +53 -0
  15. data/lib/erlang/messenger/lib/eunit/.svn/entries +140 -0
  16. data/lib/erlang/messenger/lib/eunit/.svn/format +1 -0
  17. data/lib/erlang/messenger/lib/eunit/.svn/prop-base/NOTES.svn-base +5 -0
  18. data/lib/erlang/messenger/lib/eunit/.svn/text-base/AUTHORS.svn-base +2 -0
  19. data/lib/erlang/messenger/lib/eunit/.svn/text-base/CHANGELOG.svn-base +14 -0
  20. data/lib/erlang/messenger/lib/eunit/.svn/text-base/COPYING.svn-base +504 -0
  21. data/lib/erlang/messenger/lib/eunit/.svn/text-base/NOTES.svn-base +276 -0
  22. data/lib/erlang/messenger/lib/eunit/.svn/text-base/README.svn-base +3 -0
  23. data/lib/erlang/messenger/lib/eunit/.svn/text-base/sys.config.svn-base +9 -0
  24. data/lib/erlang/messenger/lib/eunit/.svn/text-base/vsn.mk.svn-base +1 -0
  25. data/lib/erlang/messenger/lib/eunit/doc/.svn/all-wcprops +59 -0
  26. data/lib/erlang/messenger/lib/eunit/doc/.svn/entries +142 -0
  27. data/lib/erlang/messenger/lib/eunit/doc/.svn/format +1 -0
  28. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/erlang.png.svn-base +5 -0
  29. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/eunit.html.svn-base +5 -0
  30. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/index.html.svn-base +5 -0
  31. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/modules-frame.html.svn-base +5 -0
  32. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/overview-summary.html.svn-base +5 -0
  33. data/lib/erlang/messenger/lib/eunit/doc/.svn/prop-base/packages-frame.html.svn-base +5 -0
  34. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/edoc-info.svn-base +3 -0
  35. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/erlang.png.svn-base +0 -0
  36. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/eunit.html.svn-base +172 -0
  37. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/index.html.svn-base +17 -0
  38. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/modules-frame.html.svn-base +12 -0
  39. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview-summary.html.svn-base +984 -0
  40. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/overview.edoc.svn-base +980 -0
  41. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/packages-frame.html.svn-base +11 -0
  42. data/lib/erlang/messenger/lib/eunit/doc/.svn/text-base/stylesheet.css.svn-base +55 -0
  43. data/lib/erlang/messenger/lib/eunit/ebin/.svn/all-wcprops +5 -0
  44. data/lib/erlang/messenger/lib/eunit/ebin/.svn/dir-prop-base +8 -0
  45. data/lib/erlang/messenger/lib/eunit/ebin/.svn/entries +28 -0
  46. data/lib/erlang/messenger/lib/eunit/ebin/.svn/format +1 -0
  47. data/lib/erlang/messenger/lib/eunit/examples/.svn/all-wcprops +23 -0
  48. data/lib/erlang/messenger/lib/eunit/examples/.svn/entries +66 -0
  49. data/lib/erlang/messenger/lib/eunit/examples/.svn/format +1 -0
  50. data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/eunit_examples.erl.svn-base +5 -0
  51. data/lib/erlang/messenger/lib/eunit/examples/.svn/prop-base/fib.erl.svn-base +5 -0
  52. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/eunit_examples.erl.svn-base +339 -0
  53. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/fib.erl.svn-base +19 -0
  54. data/lib/erlang/messenger/lib/eunit/examples/.svn/text-base/tests.txt.svn-base +1 -0
  55. data/lib/erlang/messenger/lib/eunit/include/.svn/all-wcprops +11 -0
  56. data/lib/erlang/messenger/lib/eunit/include/.svn/entries +41 -0
  57. data/lib/erlang/messenger/lib/eunit/include/.svn/format +1 -0
  58. data/lib/erlang/messenger/lib/eunit/include/.svn/prop-base/eunit.hrl.svn-base +5 -0
  59. data/lib/erlang/messenger/lib/eunit/include/.svn/text-base/eunit.hrl.svn-base +313 -0
  60. data/lib/erlang/messenger/lib/eunit/src/.svn/all-wcprops +113 -0
  61. data/lib/erlang/messenger/lib/eunit/src/.svn/entries +259 -0
  62. data/lib/erlang/messenger/lib/eunit/src/.svn/format +1 -0
  63. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/autoload.erl.svn-base +5 -0
  64. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/code_monitor.erl.svn-base +5 -0
  65. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit.erl.svn-base +5 -0
  66. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_autoexport.erl.svn-base +5 -0
  67. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_data.erl.svn-base +5 -0
  68. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_internal.hrl.svn-base +5 -0
  69. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_lib.erl.svn-base +5 -0
  70. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_proc.erl.svn-base +5 -0
  71. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_serial.erl.svn-base +5 -0
  72. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_server.erl.svn-base +5 -0
  73. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_striptests.erl.svn-base +5 -0
  74. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_test.erl.svn-base +5 -0
  75. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tests.erl.svn-base +5 -0
  76. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/eunit_tty.erl.svn-base +5 -0
  77. data/lib/erlang/messenger/lib/eunit/src/.svn/prop-base/file_monitor.erl.svn-base +5 -0
  78. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/autoload.erl.svn-base +388 -0
  79. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/code_monitor.erl.svn-base +243 -0
  80. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.app.src.svn-base +21 -0
  81. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.appup.src.svn-base +1 -0
  82. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit.erl.svn-base +196 -0
  83. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_autoexport.erl.svn-base +102 -0
  84. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_data.erl.svn-base +798 -0
  85. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_internal.hrl.svn-base +48 -0
  86. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_lib.erl.svn-base +682 -0
  87. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_proc.erl.svn-base +552 -0
  88. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_serial.erl.svn-base +157 -0
  89. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_server.erl.svn-base +340 -0
  90. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_striptests.erl.svn-base +64 -0
  91. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_test.erl.svn-base +334 -0
  92. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tests.erl.svn-base +45 -0
  93. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/eunit_tty.erl.svn-base +272 -0
  94. data/lib/erlang/messenger/lib/eunit/src/.svn/text-base/file_monitor.erl.svn-base +409 -0
  95. data/lib/erlang/messenger/pm_client_rel-0.1.boot +0 -0
  96. data/lib/erlang/messenger/pm_client_rel-0.1.script +77 -85
  97. data/lib/erlang/messenger/pm_master_rel-0.1.boot +0 -0
  98. data/lib/erlang/messenger/pm_master_rel-0.1.script +78 -85
  99. data/lib/erlang/messenger/pm_node_rel-0.1.boot +0 -0
  100. data/lib/erlang/messenger/pm_node_rel-0.1.script +77 -86
  101. data/lib/erlang/messenger/src/pm_node.erl +46 -9
  102. data/lib/erlang/messenger/src/utils.erl +7 -1
  103. data/lib/poolparty.rb +17 -23
  104. data/lib/poolparty/base_packages/poolparty.rb +1 -1
  105. data/lib/poolparty/core/string.rb +11 -2
  106. data/lib/poolparty/helpers/binary.rb +31 -0
  107. data/lib/poolparty/helpers/console.rb +25 -16
  108. data/lib/poolparty/helpers/nice_printer.rb +36 -0
  109. data/lib/poolparty/helpers/optioner.rb +8 -0
  110. data/lib/poolparty/helpers/provisioner_base.rb +7 -5
  111. data/lib/poolparty/helpers/provisioners/master.rb +1 -1
  112. data/lib/poolparty/helpers/provisioners/slave.rb +2 -1
  113. data/lib/poolparty/modules/cloud_resourcer.rb +1 -1
  114. data/lib/poolparty/modules/file_writer.rb +12 -1
  115. data/lib/poolparty/modules/resourcing_dsl.rb +2 -1
  116. data/lib/poolparty/monitors/base_monitor.rb +3 -0
  117. data/lib/poolparty/net/remoter.rb +13 -11
  118. data/lib/poolparty/pool/base.rb +25 -13
  119. data/lib/poolparty/pool/cloud.rb +32 -10
  120. data/lib/poolparty/pool/custom_resource.rb +16 -7
  121. data/lib/poolparty/pool/plugin_model.rb +2 -2
  122. data/lib/poolparty/pool/pool.rb +2 -2
  123. data/lib/poolparty/pool/resource.rb +25 -7
  124. data/lib/poolparty/pool/resources/class_package.rb +3 -2
  125. data/lib/poolparty/pool/resources/exec.rb +1 -1
  126. data/lib/poolparty/pool/resources/variable.rb +4 -0
  127. data/lib/poolparty/version.rb +1 -1
  128. data/poolparty.gemspec +13 -11
  129. data/spec/poolparty/core/hash_spec.rb +1 -1
  130. data/spec/poolparty/core/time_spec.rb +1 -1
  131. data/spec/poolparty/net/remote_spec.rb +1 -1
  132. data/spec/poolparty/pool/base_spec.rb +25 -20
  133. data/spec/poolparty/pool/cloud_spec.rb +50 -3
  134. data/spec/poolparty/pool/plugin_spec.rb +1 -0
  135. data/spec/poolparty/pool/resource_spec.rb +4 -3
  136. data/spec/poolparty/spec_helper.rb +3 -4
  137. data/tasks/deployment.rake +15 -3
  138. data/website/index.html +2 -2
  139. metadata +88 -46
  140. data/lib/erlang/messenger/Makefile +0 -15
  141. data/lib/erlang/messenger/lib/eunit/Makefile +0 -28
  142. data/lib/erlang/messenger/lib/eunit/ebin/autoload.beam +0 -0
  143. data/lib/erlang/messenger/lib/eunit/ebin/code_monitor.beam +0 -0
  144. data/lib/erlang/messenger/lib/eunit/ebin/eunit.beam +0 -0
  145. data/lib/erlang/messenger/lib/eunit/ebin/eunit_autoexport.beam +0 -0
  146. data/lib/erlang/messenger/lib/eunit/ebin/eunit_data.beam +0 -0
  147. data/lib/erlang/messenger/lib/eunit/ebin/eunit_lib.beam +0 -0
  148. data/lib/erlang/messenger/lib/eunit/ebin/eunit_proc.beam +0 -0
  149. data/lib/erlang/messenger/lib/eunit/ebin/eunit_serial.beam +0 -0
  150. data/lib/erlang/messenger/lib/eunit/ebin/eunit_server.beam +0 -0
  151. data/lib/erlang/messenger/lib/eunit/ebin/eunit_striptests.beam +0 -0
  152. data/lib/erlang/messenger/lib/eunit/ebin/eunit_test.beam +0 -0
  153. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tests.beam +0 -0
  154. data/lib/erlang/messenger/lib/eunit/ebin/eunit_tty.beam +0 -0
  155. data/lib/erlang/messenger/lib/eunit/ebin/file_monitor.beam +0 -0
  156. data/lib/erlang/messenger/lib/eunit/src/Makefile +0 -46
  157. data/lib/poolparty/config/allowed_commands.yml +0 -1
  158. data/lib/poolparty/plugins/git.rb +0 -45
  159. data/spec/poolparty/plugins/git_spec.rb +0 -40
@@ -0,0 +1,276 @@
1
+
2
+ EUnit Developer notebook
3
+ ========================
4
+
5
+ Concepts and features
6
+ ---------------------
7
+
8
+ - Separation of tests and test runners (different ways of reporting)
9
+
10
+ * Tests are represented by data structures
11
+ * Traversal and execution are separated
12
+ * TODO: Cannot enumerate all tests in advance for really large sets
13
+
14
+ - Test engine as a producer/iterator: run next, step back, repeat...
15
+
16
+ * Iterators working (reverse/single stepping currently not used)
17
+ * TODO: Need to be able to stop after N failures
18
+
19
+ - Test module - a container (as in 'eunit:run(M)'); automatic test collection
20
+
21
+ * Works; a module name can be used to represent its set of tests.
22
+
23
+ - Single tests (exported nullary functions, to be called directly)
24
+
25
+ * Works; has drawbacks (no comments, context, or order, many
26
+ functions)
27
+
28
+ - Abstraction of tests, for reuse
29
+
30
+ * Tests are just nullary funs; this is both simple and powerful
31
+ * You can use 'fun name/arity' or 'fun module:name/arity' for sharing code
32
+ * Generator functions are used to create specialized test funs
33
+
34
+ - Executing a test by calling directly should have observable
35
+ failure/success, and tests should not in themselves output test
36
+ results to console or otherwise
37
+
38
+ * Tests succeed by returning properly (any return value)
39
+ * Tests fail by throwing an exception (any exception)
40
+
41
+ - It should be possible to run single tests without eunit runtime support
42
+
43
+ * Just apply a test function to an empty argument list and see if it
44
+ throws an exception or not
45
+ * More complex test representations (grouping, setup/teardown etc.)
46
+ need eunit support functions
47
+
48
+ - It should be possible to write tests without requiring eunit headers
49
+
50
+ * Using plain tuples, funs, atoms, and lists to represent tests; not
51
+ more difficult, just less convenient.
52
+
53
+ - Tests are identified by: module/sourcefile, test function name, and
54
+ line number (if available)
55
+
56
+ * This is also used in listings of test sets
57
+ * Funs have useful metadata, which allows most of the identifying
58
+ info to be extracted automatically
59
+
60
+ - Test functions must be identified as either directly callable or as
61
+ returning one or more test representations (the latter is referred to
62
+ as a "generator"). We cannot just try to call any function and check
63
+ the result - it would not be possible to _collect_ tests without
64
+ accidentally _executing_ tests in that case. So, the simplest form of
65
+ test generator function should return a nullary fun. This can be
66
+ tested directly and easily by a user.
67
+
68
+ * Using a '_test_' suffix (as opposed to a '_test' suffix) for test
69
+ generator functions (that return test *representations*) is a good
70
+ idea, since it makes it easy to accomodate both styles of writing
71
+ tests, does not break existing code, allows both types of functions
72
+ to be automatically detected, and makes it easy to write wrapper
73
+ functions. The underscore just before the opening parenthesis makes
74
+ it more visible than most other variants.
75
+
76
+ - Conditional compilation of test code
77
+
78
+ * Defining the NOTEST macro is used to disable testing code; this is
79
+ used by all the eunit header files.
80
+ * Testing can be disabled by default by including eunit_off.hrl
81
+ instead of eunit.hrl, or before any other eunit header file; then,
82
+ defining the TEST macro externally will enable the testing code.
83
+ The same effect is achieved by defining NOTEST before including
84
+ eunit.hrl or any other eunit header file, but using eunit_off.hrl
85
+ is always independent of the actual macro name used for control.
86
+
87
+ - Exporting test functions manually is annoying and easy to forget
88
+ - Decorating a normal module with common eunit entry functions
89
+
90
+ * Including eunit.hrl inserts a parse transform (unless NOTEST or
91
+ EUNIT_NOAUTO is defined) which automatically exports functions
92
+ identified as test functions with the proper suffixes and arity,
93
+ and adds a test/0 function to the module (unless it exists).
94
+
95
+ - Label of a single test
96
+
97
+ * {"...", Test}, also works for groups.
98
+
99
+ - Context of a single test; set up and tear down of context; multiple
100
+ tests within same context (single set up/tear down)
101
+
102
+ * {setup, Setup, Teardown, Generator}
103
+ * {setup, Setup, Generator} works as a simple let-binding
104
+
105
+ - Multiple tests using same context (individual set up/tear down)
106
+
107
+ * {foreach, Setup, Teardown, [Generator]}
108
+ {foreach1, Setup, Teardown, [{Arg, Generator}]}
109
+
110
+ - Aggregation of tests in an order-dependent sequence; aggregation of
111
+ tests in explicitly parallel sets
112
+
113
+ * {inorder, T} | {inparallel, T}
114
+
115
+ - Aggregation of tests in unspecified-order sets
116
+
117
+ * Deep lists represent generic test sets
118
+
119
+ - Test suites: label of a test suite, composition of test suites
120
+
121
+ * Deep lists and {"label", DeepList} work fine for this purpose
122
+
123
+ - Defining test suites without modifying code or creating new modules.
124
+
125
+ * This does not create new tests - just select specific modules or
126
+ functions. If there is need for expressiveness beyond a simple list
127
+ of constant terms (no funs), it should be put in a module. Hence, a
128
+ facility for "consulting" files should be sufficient.
129
+ * Works (simply writing "filename" or {file, "filename"}).
130
+
131
+ - Extra header files for better macro namespace separation (eunit_...)
132
+
133
+ * Seems to be overkill - the leading underscore in the normal macros
134
+ lessens the need for such double definitions
135
+
136
+ - Running tests in parallel
137
+
138
+ * Works (also running N tests at a time)
139
+ * TODO: Restructure to start new job as soon as slot is available
140
+
141
+ - Running a test or set of tests in a new process (like setup/teardown)
142
+
143
+ * Works
144
+
145
+ - Running tests on a separate (existing) node
146
+
147
+ * Implemented as {spawn, Node, Tests}: assuming a specific node
148
+ exists, run a set of tests on that node, rather than locally, the
149
+ main idea being that a number of test sets could be run in parallel
150
+ on separate machines (and maybe none are run locally)
151
+
152
+ - Running OS commands, testing output and result values
153
+
154
+ * Works; output is normalized to LF only for linebreaks on all platforms
155
+ * TODO: Better Windows support (not much tested)
156
+ * TODO: Is it possible to capture stderr separately somehow?
157
+
158
+ - Starting one or more additional nodes to run tests or suites on
159
+
160
+ * {node, foo@bar.baz, Instantiator}
161
+ * {node, foo, Instantiator}
162
+
163
+ - Whole-application testing (using .app files?)
164
+
165
+ * {application, AppName}
166
+ * {file, AppFile}
167
+
168
+ - Identification of tests within a test set (e.g., which succeeded,
169
+ which failed, repeating selected tests or groups of tests, etc.)
170
+
171
+ * The numbering scheme in listings take care of this point
172
+
173
+ - Running EUnit from command line, as a standalone tool
174
+
175
+ * TODO: Command line interface similar to that of edoc
176
+
177
+ - Open source (licensed under the GNU Lesser General Public Licence)
178
+
179
+ * Header files can be used without tainting, according to LGPL
180
+
181
+ - Marking tests as known failures, for handling known bugs
182
+
183
+ * TODO: Known-failure is necessary to avoid writing "inverted-logic" tests
184
+ * TODO: Is it possible to handle known timout/setup failures?
185
+
186
+ - Diagnostic tests which never fail, but may cause warnings
187
+
188
+ Assorted notes which may or may not be useful, e.g. for documentation
189
+ ---------------------------------------------------------------------
190
+
191
+ Tests for exported functions of a module should preferably be in a
192
+ separate module. This is good in many ways, but mainly boils down to
193
+ that modifying test code should not have to imply modifying source code,
194
+ and vice versa. At the same time, it should be possible for a module to
195
+ export test functions for private functions, and to have these tests
196
+ conditionally compiled (use -ifdef(EUNIT) or -ifdef(TEST) for this).
197
+
198
+ Pyunit uses 'failIf' and 'failUnless' as standard test names, and
199
+ 'assert' as a synonym for 'failUnless'. I have settled on 'assert' and
200
+ 'assertNot' as the standard names. Maybe I'll add 'failUnless' and
201
+ 'failIf' as synonyms, if users ask for it.
202
+
203
+ Junit/Pyunit get a lot of context embedding for free due to the object
204
+ oriented languages (using class members and inheritance); in Erlang,
205
+ context must be passed to tests as arguments or through local variable
206
+ bindings if there are multiple tests within a function clause. This is
207
+ particularly important for reuse of tests with small variations. To be
208
+ able to instantiate the environment of a set of tests when executing a
209
+ setup, the setup must be a function which returns the test set and the
210
+ cleanup function.
211
+
212
+ A list of tests represents an order-independent set. Usually, the tests
213
+ will be run in order, but it is not required and tests may also be
214
+ executed in parallel if they are included in an 'inparallel'-context.
215
+ Labeling a set of tests does not change its meaning in any way.
216
+
217
+ Wrapping a set of tests in a 'setup' implies that the setup is executed,
218
+ then _all_ the tests (those returned by the generator fun) are executed,
219
+ and finally the cleanup is executed regardless of whether any tests
220
+ failed or not. If the setup itself failed, the whole test set _and_ the
221
+ cleanup is skipped (there is no setup-result that can be passed to the
222
+ cleanup).
223
+
224
+ Wrapping a (deep) list of generators in a 'foreach' is equivalent to
225
+ wrapping each individual generator in the list in a corresponding
226
+ 'setup', regardless of nesting depth. E.g., foreach(a, [foreach(b, [t1,
227
+ t2]), foreach(c, [t3, t4])]) is equivalent to [setup(a, setup(b, t1)),
228
+ setup(a, setup(b, t2)), setup(a, setup(c, t3)), setup(a, setup(c, t4))].
229
+ Note that 'foreach' does not distribute over 'setup', since the nesting
230
+ level of 'setup' must be preserved.
231
+
232
+ While a plain 'foreach' can be done over any set of generators, a
233
+ 'foreach1' requires that there is a pairing of argument+generator for
234
+ each element.
235
+
236
+ See the file eunit_data.erl for a description of test representations.
237
+
238
+ Lists of tests/generators/arg-generator-pairs can all be deep, but every
239
+ sublist must be a proper list, i.e., nil-terminated.
240
+
241
+ Test Set Traversal Operations (traversal only - no execution here):
242
+
243
+ Init: create iterator from test representation.
244
+ Next: the most common operation - get the next test or group
245
+ Previous: step back to the previous operation (in the group)
246
+ Enter: enter a group, executing any side effects
247
+ Browse: enter a group without triggering side effects
248
+ Up: leave the current group
249
+
250
+ Problem: cannot browse a 'setup'-group unless you are able to instantiate
251
+ the generator fun, and to do that you either need the actual result from
252
+ the 'setup' fun, or you need to know if the generator fun expects an
253
+ argument matching a certain pattern, such as a 3-tuple. You could then
254
+ pass dummy values such as 'undefined' for the components, since they
255
+ will not be used unless you try to run one of the instantiated tests or
256
+ a setup fun of a subgroup.
257
+
258
+ If there was never a fun that returned a list of tests, but only funs
259
+ around single tests, it would be simple - just don't apply any funs
260
+ while traversing. But then it would be necessary to wrap each test
261
+ within a 'setup' in its own generator fun, which would be a pain, and it
262
+ would not be possible to nest 'setup' groups in an easy way (variables
263
+ bound in the outer group would have to be explicitly passed to the
264
+ generator funs in the inner group, using manual closure conversion). This
265
+ is simply not tolerable. So, dummy value instantiation is the only way
266
+ to go, if it should be possible at all to browse test groups without
267
+ executing setup/cleanup funs.
268
+
269
+ Solution: a 'browser' function that tries to pass variants of dummy
270
+ values to a fun until it either succeeds or fails with some other error
271
+ than 'fun_clause'. This has been implemented and is the basis of the
272
+ test listing function.
273
+
274
+ When a setup-group is being browsed, its tests cannot be executed (since
275
+ they are instantiated with dummy values), and its subgroups can only be
276
+ further Browsed, not Entered, for the same reason.
@@ -0,0 +1,3 @@
1
+ EUnit 2.0 Beta release
2
+
3
+ See the doc/ subdirectory for documentation in HTML.
@@ -0,0 +1,9 @@
1
+ [
2
+ {kernel,
3
+ [{error_logger,
4
+ {file, "priv/eunit.log"}}]},
5
+ {sasl,
6
+ [{sasl_error_logger, false},
7
+ {error_logger_mf_dir, "."},
8
+ {error_logger_mf_maxfiles, 20},
9
+ {error_logger_mf_maxbytes, 1000000}]}].
@@ -0,0 +1 @@
1
+ EUNIT_VSN = 2.0 beta 1
@@ -0,0 +1,59 @@
1
+ K 25
2
+ svn:wc:ra_dav:version-url
3
+ V 38
4
+ /contribs/!svn/ver/263/trunk/eunit/doc
5
+ END
6
+ overview.edoc
7
+ K 25
8
+ svn:wc:ra_dav:version-url
9
+ V 52
10
+ /contribs/!svn/ver/263/trunk/eunit/doc/overview.edoc
11
+ END
12
+ stylesheet.css
13
+ K 25
14
+ svn:wc:ra_dav:version-url
15
+ V 53
16
+ /contribs/!svn/ver/172/trunk/eunit/doc/stylesheet.css
17
+ END
18
+ edoc-info
19
+ K 25
20
+ svn:wc:ra_dav:version-url
21
+ V 48
22
+ /contribs/!svn/ver/172/trunk/eunit/doc/edoc-info
23
+ END
24
+ modules-frame.html
25
+ K 25
26
+ svn:wc:ra_dav:version-url
27
+ V 57
28
+ /contribs/!svn/ver/219/trunk/eunit/doc/modules-frame.html
29
+ END
30
+ overview-summary.html
31
+ K 25
32
+ svn:wc:ra_dav:version-url
33
+ V 60
34
+ /contribs/!svn/ver/263/trunk/eunit/doc/overview-summary.html
35
+ END
36
+ eunit.html
37
+ K 25
38
+ svn:wc:ra_dav:version-url
39
+ V 49
40
+ /contribs/!svn/ver/263/trunk/eunit/doc/eunit.html
41
+ END
42
+ packages-frame.html
43
+ K 25
44
+ svn:wc:ra_dav:version-url
45
+ V 58
46
+ /contribs/!svn/ver/219/trunk/eunit/doc/packages-frame.html
47
+ END
48
+ index.html
49
+ K 25
50
+ svn:wc:ra_dav:version-url
51
+ V 49
52
+ /contribs/!svn/ver/219/trunk/eunit/doc/index.html
53
+ END
54
+ erlang.png
55
+ K 25
56
+ svn:wc:ra_dav:version-url
57
+ V 49
58
+ /contribs/!svn/ver/219/trunk/eunit/doc/erlang.png
59
+ END
@@ -0,0 +1,142 @@
1
+ 8
2
+
3
+ dir
4
+ 263
5
+ http://svn.process-one.net/contribs/trunk/eunit/doc
6
+ http://svn.process-one.net/contribs
7
+
8
+
9
+
10
+ 2008-10-12T12:17:56.811879Z
11
+ 263
12
+ rcarlsson
13
+
14
+
15
+ svn:special svn:externals svn:needs-lock
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ 5c723cce-c907-0410-9aa2-ab8348fff7a4
28
+
29
+ overview.edoc
30
+ file
31
+
32
+
33
+
34
+
35
+ 2008-10-18T23:25:35.000000Z
36
+ af4447cd25c26312306f2f70586aa6fb
37
+ 2008-10-12T12:17:56.811879Z
38
+ 263
39
+ rcarlsson
40
+
41
+ stylesheet.css
42
+ file
43
+
44
+
45
+
46
+
47
+ 2008-10-18T23:25:35.000000Z
48
+ 6e11b8ef1d68117868228d9fd1e4fce9
49
+ 2007-03-22T19:20:34.421238Z
50
+ 172
51
+ rcarlsson
52
+
53
+ edoc-info
54
+ file
55
+
56
+
57
+
58
+
59
+ 2008-10-18T23:25:35.000000Z
60
+ 5ae38b5d072e0202af1bfbaf6aebd1ed
61
+ 2007-03-22T19:20:34.421238Z
62
+ 172
63
+ rcarlsson
64
+
65
+ modules-frame.html
66
+ file
67
+
68
+
69
+
70
+
71
+ 2008-10-18T23:25:35.000000Z
72
+ c9d803b4b7cd0380b1f4a58786252366
73
+ 2007-05-10T11:49:35.930693Z
74
+ 219
75
+ rcarlsson
76
+ has-props
77
+
78
+ overview-summary.html
79
+ file
80
+
81
+
82
+
83
+
84
+ 2008-10-18T23:25:35.000000Z
85
+ 849e34a030ef1d2176958f6810feec4f
86
+ 2008-10-12T12:17:56.811879Z
87
+ 263
88
+ rcarlsson
89
+ has-props
90
+
91
+ eunit.html
92
+ file
93
+
94
+
95
+
96
+
97
+ 2008-10-18T23:25:35.000000Z
98
+ 7724288cbff17b29387d6f830d5a856a
99
+ 2008-10-12T12:17:56.811879Z
100
+ 263
101
+ rcarlsson
102
+ has-props
103
+
104
+ packages-frame.html
105
+ file
106
+
107
+
108
+
109
+
110
+ 2008-10-18T23:25:35.000000Z
111
+ a720dd0c1a9a393f3ab4208082c2357b
112
+ 2007-05-10T11:49:35.930693Z
113
+ 219
114
+ rcarlsson
115
+ has-props
116
+
117
+ index.html
118
+ file
119
+
120
+
121
+
122
+
123
+ 2008-10-18T23:25:35.000000Z
124
+ 71189e0120cccc4749a4960b5dae52a2
125
+ 2007-05-10T11:49:35.930693Z
126
+ 219
127
+ rcarlsson
128
+ has-props
129
+
130
+ erlang.png
131
+ file
132
+
133
+
134
+
135
+
136
+ 2008-10-18T23:25:35.000000Z
137
+ f6077f849b23033f1533877a2f236bd6
138
+ 2007-05-10T11:49:35.930693Z
139
+ 219
140
+ rcarlsson
141
+ has-props
142
+