[PATCH] run-tests: report missing feature for skipped tests

Yuya Nishihara yuya at tcha.org
Wed Dec 23 03:56:57 CST 2015


On Tue, 22 Dec 2015 02:08:27 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1450771203 0
> #      Tue Dec 22 08:00:03 2015 +0000
> # Node ID ff25f50d7970722227a391b806c703c42feb4d93
> # Parent  3dea4eae4eebac11741f0c1dc5dcd9c88d8f4554
> run-tests: report missing feature for skipped tests
> 
> diff --git a/tests/run-tests.py b/tests/run-tests.py
> --- a/tests/run-tests.py
> +++ b/tests/run-tests.py
> @@ -940,7 +940,7 @@
>              sys.exit(1)
>  
>          if ret != 0:
> -            return False
> +            return stdout
>  
>          if 'slow' in reqs:
>              self._timeout = self._slowtimeout
> @@ -989,8 +989,9 @@
>                  lsplit = l.split()
>                  if len(lsplit) < 2 or lsplit[0] != b'#require':
>                      after.setdefault(pos, []).append('  !!! invalid #require\n')
> -                if not self._hghave(lsplit[1:]):
> -                    script = [b"exit 80\n"]
> +                haveresult = self._hghave(lsplit[1:])
> +                if haveresult is not True:
> +                    script = [b'echo "%s"\nexit 80\n' % haveresult]

Returning True|message seems confusing.
Can it be None|message or (skipping, message) ?


More information about the Mercurial-devel mailing list