[PATCH 10 of 11 FOR-REFERENCE] test-run-tests.y: test the --interactive option
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Jun 2 15:23:40 CDT 2014
On 06/02/2014 12:54 PM, pierre-yves.david at ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1401477132 25200
> # Fri May 30 12:12:12 2014 -0700
> # Node ID f81cfdf120e06552c9e01d7eb279ae04670614de
> # Parent 583b86b30cd591b09461083a123ff69cb87b12df
> test-run-tests.y: test the --interactive option
With the new code, This test fails with the following output:
--- /home/pyd/src/mercurial-dev/tests/test-run-tests.t
+++ /home/pyd/src/mercurial-dev/tests/test-run-tests.t.err
@@ -150,12 +150,11 @@
$ echo babar
- rataxes
+ babar
-
- ERROR: test-failure.t output changed
- Accept this change? [n] !.
+ .
Failed test-failure.t: output changed
# Ran 2 tests, 0 skipped, 0 warned, 1 failed.
- python hash seed: * (glob)
+ python hash seed: 42
+ Accept this change? [n]
[1]
$ cat test-failure.t
@@ -172,10 +171,12 @@
$ echo babar
- rataxes
+ babar
-
- ERROR: test-failure.t output changed
- Accept this change? [n] ..
- # Ran 2 tests, 0 skipped, 0 warned, 0 failed.
+ .
+ Failed test-failure.t: output changed
+ # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
+ python hash seed: 42
+ Accept this change? [n]
+ [1]
$ cat test-failure.t
$ echo babar
1. There is a wreid change in oputput order that I do not see in real
usage. not sure it is important
2. Test were the output is accepted are now still reported as failed.
This is a significant regression that requires a fix.
>
> diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
> --- a/tests/test-run-tests.t
> +++ b/tests/test-run-tests.t
> @@ -141,5 +141,55 @@ Parallel runs
> [1]
>
> (delete the duplicated test file)
> $ rm test-failure-copy.t
>
> +
> +Interactive run
> +===============
> +
> +(backup the failing test)
> + $ cp test-failure.t backup
> +
> +Refuse the fix
> +
> + $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i
> +
> + --- $TESTTMP/test-failure.t
> + +++ $TESTTMP/test-failure.t.err
> + @@ -1,2 +1,2 @@
> + $ echo babar
> + - rataxes
> + + babar
> +
> + ERROR: test-failure.t output changed
> + Accept this change? [n] !.
> + Failed test-failure.t: output changed
> + # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
> + python hash seed: * (glob)
> + [1]
> +
> + $ cat test-failure.t
> + $ echo babar
> + rataxes
> +
> +Accept the fix
> +
> + $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i
> +
> + --- $TESTTMP/test-failure.t
> + +++ $TESTTMP/test-failure.t.err
> + @@ -1,2 +1,2 @@
> + $ echo babar
> + - rataxes
> + + babar
> +
> + ERROR: test-failure.t output changed
> + Accept this change? [n] ..
> + # Ran 2 tests, 0 skipped, 0 warned, 0 failed.
> +
> + $ cat test-failure.t
> + $ echo babar
> + babar
> +
> +(reinstall)
> + $ mv backup test-failure.t
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list