Wed Aug 6 09:59:49 PDT 2008 Simon Michael <[EMAIL PROTECTED]>
* cleanup and slight rewrite of the test docs
New patches:
[cleanup and slight rewrite of the test docs
Simon Michael <[EMAIL PROTECTED]>**20080806165949] hunk ./tests/README.test_maintainers.txt 5
-Overview of how tests are run
+Overview of types of tests
+==========================
+
+Darcs has tests in three formats. Unit tests that directly test Haskell
+functions are written in Haskell and live in src/unit.lhs. Functional
+tests that test the darcs binary are written in Shell and Perl, and live
+in tests/. Additionally, there are functional tests which are currently
+expected to fail. These are useful for documenting bugs and todo items,
+and are kept in bugs/.
+
+Haskell tests
+--------------------------
+
+These can be run via "make unit", and are not yet documented here.
+
+Shell tests
+---------------------------
+
+Shell tests are useful because they are easy to create from a copy/paste
+of actual shell commands executed. They are considered successful if no
+bad exit codes are returned from the commands in the script.
+
+Perl tests
+---------------------------
+
+The Perl tests are useful because of the featureful testing framework that
+Perl provides, and the potential they offer to create more portable tests.
+
+Right now both shell and perl tests are accepted by the project, but shell
+tests are preferred by the main developers, as they are generally more
+useful and easier to debug. See "The future of testing darcs" below.
+
+
+How to run tests
hunk ./tests/README.test_maintainers.txt 41
-Running tests starts in "GNUmakefile" which has a "make test" target.
+Running tests starts with the test... targets in GNUmakefile:
hunk ./tests/README.test_maintainers.txt 43
-This causes all the functional tests in "tests/" to be run against repositories
-in the old, hashed, and darcs2 formats. Additionally, scripts in "bugs/" are
-also run on all three types of repository, with the expectation that they
-currently fail.
+"make unit" runs the unit tests, as noted.
hunk ./tests/README.test_maintainers.txt 45
-Running fewer tests
------------------------------
+"make test" causes all the functional tests in "tests/" to be run against
+repositories in the old, hashed, and darcs2 formats.
+
+"make bugs" runs the scripts in "bugs/", also on all three types of
+repository, with the expectation that they currently fail.
hunk ./tests/README.test_maintainers.txt 51
-Because "make test" can take a long time to run, it's useful to run fewer tests
-at once. To help with that, the following specific make targets are also
-available through GNUmakefile:
+Because "make test" can take a long time to run, it's useful to run fewer
+tests at once. To help with that, the following make targets are also
+available:
hunk ./tests/README.test_maintainers.txt 55
- make test_shell
- make test_shell_format2
- make test_shell_hashed
+ make test_shell # darcs1 old format
+ make test_shell_hashed # darcs1 hashed format
+ make test_shell_format2 # darcs2 hashed format
hunk ./tests/README.test_maintainers.txt 59
- make test_perl_format2
hunk ./tests/README.test_maintainers.txt 60
+ make test_perl_format2
hunk ./tests/README.test_maintainers.txt 62
- make bugs_shell_format2
hunk ./tests/README.test_maintainers.txt 63
+ make bugs_shell_format2
hunk ./tests/README.test_maintainers.txt 65
- make bugs_perl_format2
hunk ./tests/README.test_maintainers.txt 66
+ make bugs_perl_format2
hunk ./tests/README.test_maintainers.txt 69
-Running a single test
----------------------
-
- ./bin/prove script.pl
- perl shell_harness script.sh
+Running specific tests
+------------------------------
hunk ./tests/README.test_maintainers.txt 72
-or alternatively to run a couple of tests
+Add test file names to tests_to_run to do only those tests:
hunk ./tests/README.test_maintainers.txt 74
- echo test-name.sh > tests/tests_to_run
- echo test-name2.sh >> tests/tests_to_run
+ echo annotate.pl > tests/tests_to_run
+ echo annotate.sh >> tests/tests_to_run
hunk ./tests/README.test_maintainers.txt 79
-Overview of types of tests
-==========================
-
-Darcs has tests in three formats: Functional tests that test the darcs binary
-are written in Shell and Perl. Unit tests are written in Haskell and
-directly test Haskell functions. These can be run via "make unit", but are
-not otherwise documented here.
+Running a single test
+-----------------------------
hunk ./tests/README.test_maintainers.txt 82
-Shell tests
----------------------------
+For consistent output, perl tests are usually run with the prove script:
hunk ./tests/README.test_maintainers.txt 84
-Shell tests and are useful because they are easy to create from a copy/paste of
-actual shell commands executed. They are considered successful if no bad exit
-codes are returned from the commands in the script.
+ cd tests
+ perl bin/prove annotate.pl
hunk ./tests/README.test_maintainers.txt 87
-Perl scripts
----------------------------
+and shell tests are run with the shell_harness script:
hunk ./tests/README.test_maintainers.txt 89
-The Perl scripts are useful because of the featureful testing framework that
-Perl provides, and the potential they offer to create more portable tests.
+ perl shell_harness annotate.sh
hunk ./tests/README.test_maintainers.txt 91
-Right now both kinds of tests are equally accepted by the project, but
-shell tests are preferred by the main developers, as they are generally
-more useful and easier to debug.
+("chmod +x bin/prove shell_harness" to use them directly.)
hunk ./tests/README.test_maintainers.txt 94
-Tips for writing tests
-=======================
+Tips for writing (and reading) tests
+====================================
hunk ./tests/README.test_maintainers.txt 118
- The "v" causes the contents of the script to be printed as part of the run,
- which is helpful for debugging. The "e" causes the script to exit as soon as
- their is an error.
+ The "v" causes the contents of the script to be printed as part of the run,
+ which is helpful for debugging. The "e" causes the script to exit as soon as
+ their is an error.
hunk ./tests/README.test_maintainers.txt 122
+- Try to avoid defining functions where possible (see below)
Context:
[small makefile refactoring: allow just the normal tests to be run, without bugs/*
Simon Michael <[EMAIL PROTECTED]>**20080805203242]
[Rectify dist help
[EMAIL PROTECTED]
Removed the "make dist" suggestion, the manual is a better place for that.
Instead, make clear that it operates on a clean copy of the tree, and
mention the "predist" functionality.
]
[Canonize Gaetan Lehmann and Daniel Buenzli.
Eric Kow <[EMAIL PROTECTED]>**20080730104357
(for Daniel B, avoid an accent in his name)
]
[configure: check for packages needed with split base.
Eric Kow <[EMAIL PROTECTED]>**20080730103840
Now that all packages must be used explicitly.
]
[fix type witness compile errors specific to ghc 6.8
Jason Dagit <[EMAIL PROTECTED]>**20080722182729]
[website: explain that darcs 2 is required to get the darcs source.
Simon Michael <[EMAIL PROTECTED]>**20080803181216]
[avoid import of unused function fromMaybe.
David Roundy <[EMAIL PROTECTED]>**20080729172825]
[configure: suggest regex-compat before text
Eric Kow <[EMAIL PROTECTED]>**20080725095336]
[configure: mention Haskell in 'try installing' suggestion
Eric Kow <[EMAIL PROTECTED]>**20080725095015]
[Typo (Text.Regex)
Eric Kow <[EMAIL PROTECTED]>**20080715121708]
[Use haskeline to have a readline-like behavior when asking something to the user
[EMAIL PROTECTED]
Unlike the implementations using readline or editline packages, this code
code doesn't break the Ctrl-C behavior.
]
[Improve generic rules for English plurals.
Eric Kow <[EMAIL PROTECTED]>**20080604123728]
[add configure check for Network.URI.
David Roundy <[EMAIL PROTECTED]>**20080711011914]
[add -hide-all-packages to default GHCFLAGS.
David Roundy <[EMAIL PROTECTED]>**20080711010952]
[add support for outputting patch numbers in darcs changes.
David Roundy <[EMAIL PROTECTED]>**20080710011211]
[add support for matching single patches by index.
David Roundy <[EMAIL PROTECTED]>**20080710004512]
[add support for matching ranges of patches (counting back from present).
David Roundy <[EMAIL PROTECTED]>**20080710003225]
[Better avoid silly manpage error.
Trent W. Buck <[EMAIL PROTECTED]>**20080704024920
It turned out only initialize's help string used 'quotes', so just
remove them. This makes init's docstring consistent with the others.
]
[Missing period at end of sentence.
Trent W. Buck <[EMAIL PROTECTED]>**20080704024232]
[darcs --overview no longer works, so don't document it.
Trent W. Buck <[EMAIL PROTECTED]>**20080704030804]
[Avoid silly manpage error.
Trent W. Buck <[EMAIL PROTECTED]>**20080703010733
man (nroff) treats an apostrophe in the first column specially,
resulting in a syntax error without this patch.
Ideally, all cases of 'foo' in the manpage (i.e. docstrings) should
become `foo', since man -Tps turns ` and ' into left and right single
quotes respectively.
]
[obliterate whitespace in Darcs.Commands.Get
[EMAIL PROTECTED]
'twas causing lhs/haddock difficulties where a \end{code} wasn't getting recognized.
]
[rm haddock CPP business
[EMAIL PROTECTED]
Try as I might, I can't see any reason to special-case some Haddock CPP logic to deal with some *commented-out guards*, unless CPP magically restores and uncomments the code if Haddock isn't being run.
]
[make pull less verbose when --verbose flag is given.
David Roundy <[EMAIL PROTECTED]>**20080624170035]
[fix makefile to remember to regenerate version information after running configure.
David Roundy <[EMAIL PROTECTED]>**20080624170001]
[TAG 2.0.2
David Roundy <[EMAIL PROTECTED]>**20080624012041]
Patch bundle hash:
a2bcb0f233f2d2230a8f8e72601b9c17e3396dff
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users