Bug 3349 - TestRunner doesn't exit with non-zero status on error
Summary: TestRunner doesn't exit with non-zero status on error
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 2234
  Show dependency tree / graph
 
Reported: 2006-10-11 21:25 UTC by Andrew Cagney
Modified: 2006-10-13 04:13 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-10-11 21:25:44 UTC
Notice how, in the below, the RET is from the second call to runArchCases, the
first call's status is discarded.

	int ret = 0;

	Runner testRunner = new Runner (args);

        testRunner.setBuildArch(Build.BUILD_ARCH);
	
	// Set the path prefixes and then do the common test.
	Paths.setPrefixes (Build.ABS_BUILDDIR + "/frysk/pkglibexecdir/",
			   Build.ABS_BUILDDIR + "/frysk/pkgdatadir/");
	testRunner.runArchCases(JUnitTests.get ());
	
	// Set the execPrefix of arch32 and then do the arch32 test.
	Paths.setPrefixes (Build.ABS_BUILDDIR + "/frysk/pkglibexecdir/arch32/",
			   Build.ABS_BUILDDIR + "/frysk/pkgdatadir/");
	ret = testRunner.runArch32Cases(JUnitTests.get ());
	System.exit(ret);
Comment 1 Andrew Cagney 2006-10-11 21:27:04 UTC
this should explain why `` make check '', when TestRunner is reporting failures
or errors, doesn't abort.
Comment 2 Andrew Cagney 2006-10-12 15:17:56 UTC
Yong, I've checked this in, you may want to check your 32- 64- test runs.

Index: frysk-core/frysk/pkglibexecdir/ChangeLog
2006-10-12  Andrew Cagney  <cagney@redhat.com>

        * funit.java: Move 32- and 64- logic to frysk.junit.Runner.

Index: frysk-imports/frysk/junit/ChangeLog
2006-10-12  Andrew Cagney  <cagney@redhat.com>

        * Runner.java (runArchCases (String, String)): New.
        (worstResult): New.

Index: frysk-sys/common/ChangeLog
2006-10-12  Andrew Cagney  <cagney@redhat.com>

        * TestRunner.javain (main): 32- and 64-bit code moved to
        frysk.junit.Runner, update.
Comment 3 Yong Zheng 2006-10-13 04:13:06 UTC
(In reply to comment #1)
> this should explain why `` make check '', when TestRunner is reporting failures
> or errors, doesn't abort.
> 

Andrew, very sorry for my discarding the first call's result! Thanks for your
fixing it. Thanks.