# HG changeset patch # User mpm@selenic.com # Date 1118785477 28800 # Node ID 6c869059beb487a0620dba44e2ad7ffa63cbd505 # Parent 55f63f3b6a54f63431b552785519b03f12c59cd0 testing fixups -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 testing fixups Add note about running tests to README Fix issue with pipelines and set -x output stability Add note about stability issue to README manifest hash: 7e8d9da463b3110664e24978550faab3ef67a706 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCr0/FywK+sNU5EO8RAnWXAJ4toFrvgtsPfR3dYs9a81AsOrfiVQCfZKIf yJCboAnoJNSSjyUk42ALMxs= =YJ31 -----END PGP SIGNATURE----- diff --git a/tests/README b/tests/README --- a/tests/README +++ b/tests/README @@ -1,5 +1,10 @@ A simple testing framework +To run the tests, do: + +cd tests/ +./run-tests + This finds all scripts in the test directory named test-* and executes them. The scripts can be either shell scripts or Python. Each test is run in a temporary directory that is removed when the test is complete. @@ -25,3 +30,7 @@ writing tests: use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates +- set -x and pipelines don't generate stable output + + turn off set -x or break pipelines into pieces + diff --git a/tests/test-up-local-change b/tests/test-up-local-change --- a/tests/test-up-local-change +++ b/tests/test-up-local-change @@ -16,7 +16,8 @@ cd r2 hg init ../r1 hg up echo abc > a -hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff > ../d +sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d cd ../r1 echo b > b @@ -31,5 +32,6 @@ hg -d up hg -d up -m hg parents hg -v history -hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff > ../d +sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d