]> rtime.felk.cvut.cz Git - wvtest.git/log
wvtest.git
13 years agoFix Makefile.omk to compile the test correctly omk
Michal Sojka [Thu, 27 Jan 2011 14:01:01 +0000 (15:01 +0100)]
Fix Makefile.omk to compile the test correctly

13 years agoBranch with OMK makefiles
Michal Sojka [Thu, 27 Jan 2011 11:12:00 +0000 (12:12 +0100)]
Branch with OMK makefiles

13 years agoUse os.path rather than '/' logic in wvtest
Brandon Low [Sat, 22 Jan 2011 19:24:46 +0000 (11:24 -0800)]
Use os.path rather than '/' logic in wvtest

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
13 years agoFix the C API to work under OS X
Michal Sojka [Thu, 13 Jan 2011 14:55:22 +0000 (15:55 +0100)]
Fix the C API to work under OS X

Using variable attributes to put data structures to a separate section
doesn't work as expected under OS X. The code doesn't even compile.

This patch removes the use of variable attributes and uses instead
function attribute "constructor". The functions marked by this attribute
are called before main() similarly as C++ constructors of global
variables.

These functions are used to register all the tests defined with
WVTEST_MAIN so that we can run all of them.

Thanks to Jimmy Tang for helping with the fix.

13 years agoAdd the new C tests to the toplevel Makefile.
Avery Pennarun [Sat, 1 Jan 2011 03:41:50 +0000 (19:41 -0800)]
Add the new C tests to the toplevel Makefile.

13 years agoAdd wvtest for C
Michal Sojka [Tue, 14 Dec 2010 12:54:07 +0000 (13:54 +0100)]
Add wvtest for C

For some C programs it is not possible to use C++ implementation
because g++ compiler doesn't support "Designated Initializers"
extension of GCC. If this extension is used in C code, the code cannot
be compiled by g++ and therefore it cannot contain WVPASS and similar
macros implemented in C++.

This patch adds C support which is derived the C++ one. The code
relies on "variable attributes" (another GCC extension) to run all the
functions defined with WVTEST_MAIN(). C++ API uses constructors of
global variables to find all these functions but in C, something else
must be used.

13 years agowvtestrun: Do not use colors on dumb terminals
Michal Sojka [Tue, 14 Dec 2010 12:54:06 +0000 (13:54 +0100)]
wvtestrun: Do not use colors on dumb terminals

This is helpful for example when the tests are run by compile command
under Emacs.

13 years agoREADME: we have four APIs already (cpp dotnet python sh)
Kirill Smelkov [Tue, 13 Jul 2010 15:17:50 +0000 (19:17 +0400)]
README: we have four APIs already (cpp dotnet python sh)

13 years agoREADME: fix typo
Kirill Smelkov [Tue, 13 Jul 2010 15:17:49 +0000 (19:17 +0400)]
README: fix typo

13 years agoStrip trailing whitespace all over the tree.
Kirill Smelkov [Tue, 13 Jul 2010 15:17:48 +0000 (19:17 +0400)]
Strip trailing whitespace all over the tree.

Because some editors highlight them in bright colors, and also git diff
colors them as red (try e.g. `git show --color 2f4552`). So kill them.

P.S. I've left trailing whitespace in LICENSE intact, because licensing
is special.

13 years agoMakefile: build 'all' before 'test'.
Avery Pennarun [Sat, 26 Jun 2010 04:58:15 +0000 (00:58 -0400)]
Makefile: build 'all' before 'test'.

That way wvtestrun doesn't hide build output.

13 years agoUpdate wvtest.py to the new version that does os.chdir().
Avery Pennarun [Sat, 26 Jun 2010 04:48:11 +0000 (00:48 -0400)]
Update wvtest.py to the new version that does os.chdir().

It was too annoying to test submodules, because if any of them opened a
file, they always had to mention the full path from the wvtest.py (which was
usually at the root of the whole project) to the data file (which was
usually in the t/ subdir of the submodule).  So if you extracted a submodule
into its own project, all the paths would be wrong.

Now wvtest.py does os.chdir() into the t/ subdir being tested.  If you don't
like that, you can always chdir into a parent directory.

13 years agowvtest.py: handle lines that have trailing "# whatever" comments.
Avery Pennarun [Tue, 4 May 2010 02:11:09 +0000 (22:11 -0400)]
wvtest.py: handle lines that have trailing "# whatever" comments.

13 years agowvtest.py: when exceptions are thrown, choose a better stack dump.
Avery Pennarun [Fri, 30 Apr 2010 03:54:05 +0000 (23:54 -0400)]
wvtest.py: when exceptions are thrown, choose a better stack dump.

We already print the entire stack trace - the useful part - but we were
printing a kind of useless line number in the wvtest result line: the line
from which the exception was thrown.  That's kind of weird, and doesn't help
indicate which test threw the exception.  So let's pull out the current line
number from the running @wvtest function instead.

That's not perfect either, in case the function called a sub-function that
produced the exception, but it's somewhat more useful at least.  You should
still read the full exception printout for maximum accuracy.

13 years agowvtest.py: add a new WVEXCEPT() for when you expect an exception.
Avery Pennarun [Fri, 30 Apr 2010 03:35:23 +0000 (23:35 -0400)]
wvtest.py: add a new WVEXCEPT() for when you expect an exception.

14 years agosh: use a worse version of _wvfind_caller if bash isn't available.
Avery Pennarun [Tue, 16 Feb 2010 22:03:28 +0000 (17:03 -0500)]
sh: use a worse version of _wvfind_caller if bash isn't available.

bash has tools for finding the file/linenumber of the caller, but it's not
POSIX, so don't rely on it.

14 years agosh: add new WVPASSRC and WVFAILRC commands.
Avery Pennarun [Tue, 16 Feb 2010 22:01:38 +0000 (17:01 -0500)]
sh: add new WVPASSRC and WVFAILRC commands.

For testing the value of $?.

14 years agosh: Import wvtest.sh from the bup project.
Avery Pennarun [Tue, 16 Feb 2010 21:40:14 +0000 (16:40 -0500)]
sh: Import wvtest.sh from the bup project.

14 years agoMerge branch 'master' of git://github.com/wlach/wvtest
Avery Pennarun [Wed, 30 Dec 2009 20:46:17 +0000 (15:46 -0500)]
Merge branch 'master' of git://github.com/wlach/wvtest

* 'master' of git://github.com/wlach/wvtest:
  Basic support for checking (in)equality of std::string in C++ version

14 years agoMerge wvtest.py and wvtestmain.py into one file.
Avery Pennarun [Wed, 30 Dec 2009 20:41:51 +0000 (15:41 -0500)]
Merge wvtest.py and wvtestmain.py into one file.

This makes it a bit easier to bring into your own projects, since it's just
a single file.

Copied from eqldata project, commit
3b004336b117c01885f09f95b6e2aededd2de377.

14 years agoBasic support for checking (in)equality of std::string in C++ version
William Lachance [Tue, 11 Aug 2009 16:35:05 +0000 (12:35 -0400)]
Basic support for checking (in)equality of std::string in C++ version

15 years agoAdded an initial README.
Avery Pennarun [Fri, 1 May 2009 03:33:31 +0000 (23:33 -0400)]
Added an initial README.

15 years agoRename wvtestrunner to wvtestrun.
Avery Pennarun [Fri, 1 May 2009 02:36:07 +0000 (22:36 -0400)]
Rename wvtestrunner to wvtestrun.

Who names their programs as nouns anyway?  Clearly it runs things, so it
should be a verb.

15 years agoClean up license information and add LICENSE file.
Avery Pennarun [Fri, 1 May 2009 02:11:55 +0000 (22:11 -0400)]
Clean up license information and add LICENSE file.

15 years agoRename wvtestrunner.pl to wvtestrunner.
Avery Pennarun [Fri, 1 May 2009 02:04:58 +0000 (22:04 -0400)]
Rename wvtestrunner.pl to wvtestrunner.

The .pl isn't the important part, and someday it might change to another
language. Who knows?

15 years agoBetter 'make clean' targets.
Avery Pennarun [Fri, 1 May 2009 01:59:51 +0000 (21:59 -0400)]
Better 'make clean' targets.

15 years agoFix standalone compilation of wvtest/cpp.
Avery Pennarun [Fri, 1 May 2009 01:49:23 +0000 (21:49 -0400)]
Fix standalone compilation of wvtest/cpp.

15 years agoAdded a Makefile to dotnet as an example of how to run tests.
Avery Pennarun [Fri, 1 May 2009 01:28:26 +0000 (21:28 -0400)]
Added a Makefile to dotnet as an example of how to run tests.

...and call it from the top level 'make test' too.

15 years agoAdd toplevel and python/ 'make test' example targets.
Avery Pennarun [Fri, 1 May 2009 00:58:08 +0000 (20:58 -0400)]
Add toplevel and python/ 'make test' example targets.

15 years agowvtestrunner: print the time taken by each section, and the total time.
Avery Pennarun [Fri, 17 Apr 2009 02:44:43 +0000 (22:44 -0400)]
wvtestrunner: print the time taken by each section, and the total time.

This will perhaps help encourage faster tests.

(cherry picked from commit 6be08f9b861f059da5d3137b7af4e25b77511731)

15 years agowvtestrunner: catch segfaults in the subprogram.
Avery Pennarun [Mon, 24 Nov 2008 22:28:39 +0000 (17:28 -0500)]
wvtestrunner: catch segfaults in the subprogram.

wvtestrunner would notice if the subprogram returned a non-zero exit code,
but not if it died on a signal.  Thus, a unit test program dying on a
segfault was considered a success.  Oops!

(cherry picked from commit 9aff60fa6d55a46440a8e4d6bf343753b2bdc1ec)

15 years agowvtestrunner: timeouts and CRLF support.
Avery Pennarun [Wed, 10 Sep 2008 05:03:37 +0000 (01:03 -0400)]
wvtestrunner: timeouts and CRLF support.

We now time out if there are no test results for 120 seconds.  Also handle
surprise CRLFs in the input stream.

(cherry picked from commit ff9cd2868155ff91201e457008a1bfe0da3e6e40)

15 years agoReplaced wvtesthelper/meter/colour scripts with an all-new wvtestrunner.pl.
Avery Pennarun [Fri, 1 May 2009 01:02:00 +0000 (21:02 -0400)]
Replaced wvtesthelper/meter/colour scripts with an all-new wvtestrunner.pl.

This one is much smarter than previous versions: by default, it prints out
only the headers from "Testing blah blah:" lines and then prints just a "."
for each "! whatever  ok" line.  But, if a test does fail, it prints out
*all* the stdout/stderr that was produced by the test from the "Testing blah
blah" line all the way to the failing test.

It also auto-colours ok/FAILED lines, but only if stdout is a tty, so you
don't need to decide whether you want it coloured or not.

Finally, its output is actually compatible with itself: you can run a
top-level wvtestrunner and it'll further summarize the output of inner
wvtestrunners, because the complete output of a given testrunner is in a
single "Testing blah blah:" section.  But if a failure occurs, you'll still
get the more detailed results.

(cherry picked from commit 49efbe24c148d69873ca78c05e9c5825d50ef49d)

15 years agoImport wvtest for python from eqldata project.
Avery Pennarun [Fri, 1 May 2009 00:46:08 +0000 (20:46 -0400)]
Import wvtest for python from eqldata project.

Commit 5db96d703ab5a0c253d09d0cbcfd56646eaffbfe.

15 years agoImport latest wvtest for C#/.NET from versaplex project.
Avery Pennarun [Fri, 1 May 2009 00:42:44 +0000 (20:42 -0400)]
Import latest wvtest for C#/.NET from versaplex project.

Commit 8f939de8b03b0e0236a182543af0298bb6b97c52.

15 years agoImport basic C++ wvtest from wvstreams project.
Avery Pennarun [Fri, 1 May 2009 01:08:13 +0000 (21:08 -0400)]
Import basic C++ wvtest from wvstreams project.

Commit was 333349d03e15b0081c7141f7164bacc2e1fb196a.

15 years agoInitial .gitignore.
Avery Pennarun [Fri, 1 May 2009 01:06:21 +0000 (21:06 -0400)]
Initial .gitignore.