Johan Holmberg
9a899213f0
find test_* methods in base classes too
...
this makes it prossible to structure tests better
and even used "mixin" of modules with test_* methods
2017-03-23 10:26:27 +01:00
Johan Holmberg
04c31df479
sort "CMDTEST_*.rb" files alphabetically
...
by sorting the result of Dir.glob().
This should make "CMDTEST_*.rb" being run in a well defined order.
2017-02-28 10:24:27 +01:00
Johan Holmberg
43cb4be270
remove LogBaseMixin, use method_missing?
...
this gets rid of some unnecessary boilerplate code
2016-11-30 23:04:32 +01:00
Johan Holmberg
3c83c52c70
--diff by default, new --no-diff option
2016-11-04 22:26:05 +01:00
Johan Holmberg
cd699f4a8e
1.4 -> 1.5, with 'skip_test' ...
2016-11-04 17:22:00 +01:00
Johan Holmberg
12f905a31b
add 'skip_test'
2016-10-31 00:33:20 +01:00
Johan Holmberg
1af393872c
'teardown' should run after AssertFailed too
2016-10-30 21:42:47 +01:00
Johan Holmberg
136bb53a89
improve --version output
...
now showing a value like 1.4.20161008,
the same as the DEB package
2016-10-08 21:04:30 +02:00
Johan Holmberg
3f80a9a1ea
creation on DEB packages
...
with improved version numbering
2016-10-07 16:45:10 +02:00
Johan Holmberg
aa9d2c4f93
handle --help as any other option
...
earlier -h was recognized as a special case
in "argumentparser.rb"
2016-09-27 00:03:52 +02:00
Johan Holmberg
e6a9092783
add --stop-on-error option
...
to stop after first error. If running in parallel,
we don't know how to stop immediately, so that
option combination is disallowed.
2016-09-17 23:17:23 +02:00
Johan Holmberg
c6cfae144c
report finished time
2016-09-17 22:42:17 +02:00
Johan Holmberg
79bb49ed33
use Cmdtest.print_summary both with/without -j
2016-09-17 21:11:52 +02:00
Johan Holmberg
8124d2fcd6
at error, forget old "success" in .cmdtest-filter
...
with this changes a test will be re-run again even if
it is restored to an earlier content.
(all this is about the effect of the -i option)
2016-09-17 19:19:47 +02:00
Johan Holmberg
1b80605f49
--diff option (experimental)
...
using an LCS algorithm (like diff)
2016-06-28 00:33:39 +02:00
Johan Holmberg
deb6af6086
handle exception in setup/teardown
...
+ new test of this and exception in test_* methods
2016-06-26 21:12:53 +02:00
Johan Holmberg
966a98f4b1
remove obsolete parallel code
...
from before refactoring parallel handling
2016-06-05 12:56:22 +02:00
Johan Holmberg
166b0f310b
reset current directory for "teardown"
...
and after processing each test method.
should pass resently added tests.
2016-06-04 21:16:12 +02:00
Johan Holmberg
43072aecec
remove extra ORIG_CWD
...
just keep Cmdtest::ORIG_CWD
2016-06-03 20:29:02 +02:00
Johan Holmberg
3ea3d852aa
chdir to ORIG_CWD after each test method
...
so current directory is outside the temporary tree
when it is cleaned between test methods.
2016-06-03 20:02:08 +02:00
Johan Holmberg
9117bc2e60
sort methods/files
...
for more deterministic behaviour
2016-06-03 11:17:18 +02:00
Johan Holmberg
122d2b3326
update copyright year -> 2016
2016-04-14 20:25:21 +02:00
Johan Holmberg
d8379148e7
simple test usage of 'argumentparser.rb'
2016-01-05 19:10:02 +01:00
Johan Holmberg
c025d22a14
move code to Runner subclasses
2015-08-17 23:53:49 +02:00
Johan Holmberg
5021972318
first version using parallel(1)
...
to implement -jN option to cmdtest.
may need some cleanup/refactoring.
2015-08-17 23:03:42 +02:00
Johan Holmberg
225983f813
refactor: remove 'run' methods
...
instead loop over test-files/classes/methods outside
of the "administrative" classes. In preparation for
a new way of implementing --parallel support with
the external command GNU Parallel.
2015-08-08 23:43:06 +02:00
Johan Holmberg
b82c90232c
refactor, 'tmp_dir',... -> Runner class
...
the methods 'tmp_dir', 'tmp_work_dir' and 'tmp_cmdtest_dir'
are needed in 'cmdtest.rb' too, so moving them to the
Runner class.
2015-08-08 00:26:17 +02:00
Johan Holmberg
c03de8c577
make --test work again
...
need to convert Symbol -> String before compare
2015-08-06 22:39:08 +02:00
Johan Holmberg
13b284ef8c
use new "argumentparser.rb"
...
modelled after "argparse" in Python
2015-08-06 22:33:48 +02:00
Johan Holmberg
651b613ba0
remove parallel-, revive incremental-support
2015-08-04 10:29:25 +02:00
Johan Holmberg
5a663b92bf
internally convert --xml option to absolute path.
2015-01-18 00:43:03 +01:00
Johan Holmberg
7edd2313ff
add simple SIGINT handler
2014-02-16 21:59:44 +01:00
Johan Holmberg
ee6b520ca3
update copyright year to 2014
2014-02-16 21:36:27 +01:00
Johan Holmberg
21ac1f4f01
use File::PATH_SEPARATOR (correct on Windows with Ruby 2.x)
2014-01-24 15:53:45 +01:00
Johan Holmberg
5c58af597e
fix broken 'import_file' when using t/ or test/ directory
2013-04-18 08:58:22 +02:00
Johan Holmberg
785629e86a
shebang line should use /usr/bin/ruby
2013-04-18 08:06:13 +02:00
Johan Holmberg
cce66576cd
get 'import_file' argument relative to CMDTEST file
...
(not current directory)
2012-09-06 15:21:19 +02:00
Johan Holmberg
7a8492e454
Update copyright year to 2012
2012-08-13 19:02:28 +02:00
Johan Holmberg
b772c8b7f8
Call "Dir.chdir" when no --parallel=N was given.
...
This should make "old" tests work with newer versions.
2012-07-09 22:52:43 +02:00
Johan Holmberg
ffe0a34b40
start using 'notify' for parallelism, add -j option
2012-07-02 09:46:16 +02:00
Johan Holmberg
fedbfa745a
removed use of 'chdir' (preparing for parallel cmdtest)
2012-06-17 14:17:49 +02:00
Johan Holmberg
c2f45a5882
only pass strings to logger classes (no cmdtest objects)
2012-06-12 00:32:50 +02:00
Johan Holmberg
bb70f757ec
Introduced LogClient class (preparing for parallel cmdtest).
2012-06-11 01:02:47 +02:00
Johan Holmberg
daa7f12fbd
Improve detection of Windows.
2011-11-04 23:38:52 +01:00
Johan Holmberg
892dc530c5
Preparation for parallel cmdtest:
...
- 'runner' parameter to methods instead of constructors
- unique work-directory for each test method
- detect class/method name clashes early
- moved tmp-dir knowledge to "testcase.rb"
2011-11-02 00:03:23 +01:00
Johan Holmberg
27f1f3f80f
Make 'cmdtest' work with Ruby 1.9.3 too.
2011-10-30 20:33:16 +01:00
Johan Holmberg
90df8d6b76
Add directory of CMDTEST_*.rb files to LOAD_PATH.
...
Makes it easy to "require" support files in the CMDTEST_*.rb files.
2011-10-12 22:14:11 +02:00
Johan Holmberg
a0663562f0
Avoid setting ENV["PATH"] in cmdtest itself.
...
Instead set PATH in the shell scripts used to execute
the actual commands to test.
2011-09-21 23:38:21 +02:00
Johan Holmberg
02270c3aa9
Let "orig_env_path" return a copy of the path,
...
so users of the method can modify the value.
2011-08-28 20:53:32 +02:00
Johan Holmberg
dc36a1e023
update copyright year
2010-09-03 09:05:21 +02:00