[PATCH] jcheck: allow bug id line to be ignored
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Tue May 7 13:47:30 PDT 2013
2013/4/12 8:12 -0700, omajid at redhat.com:
> Thanks for pointing me to the right place to add tests. I had two
> questions about tests in jcheck that I couldn't find answers to:
>
> 1. What's the difference between 'make test' and 'make tests'? Should I
> be running both all the time or prefer one over the other?
"make test" runs all the tests. "make tests" creates the prebuilt test
cases by running mktests.sh; it doesn't actually run any tests.
> 2. Looking at runtests.sh, some tests set up jcheck:
>
> 259 hg add -R z z/.jcheck/conf
> 260 cat >z/.hg/hgrc <<___
> 261 [extensions]
> 262 jcheck = $(pwd)/jcheck.py
> 263 [hooks]
> 264 pretxncommit.jcheck=python:jcheck.hook
> 265 ___
>
> While others dont:
>
> 208 # Lax bugids
> 209 echo "-- $r lax bug ids"
> 210 rm -rf z
> 211 hg init z
> 212 mkdir z/.jcheck
> 213 cat >z/.jcheck/conf <<___
> 214 project=jdk7
> 215 comments=lax
> 216 bugids=lax
> 217 ___
> 218 hg add -R z z/.jcheck/conf
> 219
> 220 if HGUSER=$setup_author hg ci -R z -m '1234: Silly bugid'; then
> true; else fail; fi
> 221 r=$(expr $r + 1)
Hmm, looks like you found a bug in some existing tests.
> Is it expected that jcheck will be hooked into the global ~/.hgrc file?
> (Is that a good expectation for unit tests?)
No, not at all, and that would be an inappropriate expectation.
The "export HGRCPATH=" at the top of runtests.sh prevents that.
The lax bugid test you quoted above passes because it just doesn't
run with jcheck enabled. I'll fix that.
- Mark
More information about the hg-tools-dev
mailing list