From: Mark Wielaard <mark@klomp.org>
To: frysk <frysk@sourceware.org>
Subject: [patch] java main detection vs test cases
Date: Tue, 15 Apr 2008 15:21:00 -0000 [thread overview]
Message-ID: <1208263208.3185.27.camel@dijkstra.wildebeest.org> (raw)
Hi,
To my horror some of my tests weren't run on make check. Even though
they ran fine when invoking ./TestRunner test by hand. What was
happening was that a couple of tests has "main()" in some comment. This
triggered Makefile.gen.sh into turning them into executable instead of
junit test cases. This patch makes the regexp detection more strict as
to eliminate some of these false positives.
frysk-common/ChangeLog
2008-04-15 Mark Wielaard <mwielaard@redhat.com>
* Makefile.gen.sh (has_java_main): Make regexp more strict.
This enables the following tests:
frysk.rt.TestDisplayValue
frysk.stack.TestLibFunctionStepFrame
frysk.stack.TestSignalStepFrame
Those all pass (or contain unresolved tests) on x86 and x86_64 (at least
on fedora 8).
There is still one "false positive" of a slightly different category:
Exception in thread "main" java.lang.NullPointerException
at FunitSimpleInterfaceTest.main(FunitSimpleInterfaceTest.java:46)
FAIL: frysk/pkglibdir/FunitSimpleInterfaceTest
This is part of the frysk.debuginfo.TestGccInterface test (which
passes). It should be an executable, but it shouldn't also be run as a
separate test program. I filed bug #6408 for this.
Cheers,
Mark
diff --git a/frysk-common/Makefile.gen.sh b/frysk-common/Makefile.gen.sh
index f05302c..a9114a7 100755
--- a/frysk-common/Makefile.gen.sh
+++ b/frysk-common/Makefile.gen.sh
@@ -328,7 +328,7 @@ has_java_source ()
has_java_main ()
{
- grep ' main[ ]*[(]' $1 > /dev/null 2>&1
+ grep ' void main[ ]*[(][ ]*String' $1 > /dev/null 2>&1
}
has_main ()
reply other threads:[~2008-04-15 12:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1208263208.3185.27.camel@dijkstra.wildebeest.org \
--to=mark@klomp.org \
--cc=frysk@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).