NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item1230: EngineTests bork the logger

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Waiting for Release Extension UnitTestContrib Main.OlivierRaginel
For some reason, if you perl ../bin/TestRunner.pl -clean -log FoswikiSuite.pm the log stops after the EngineTests.

I tried moving the EngineTests last, and sure enough something in those tests is borking the log.

-- CrawfordCurrie - 09 Mar 2009

The problem is that the EngineTests calls lib/Unit/CGIEngine.pm (unless FOSWKI_SERVER is set, what is the case of automated tests) and it needs to manipulate STDIN and STDOUT and hence untie(*STDIN) and untie(*STDOUT).

I'm aware of this issue and I'm thinking how to solve this: maybe change the logger, so it becomes possible to tie STDOUT again.

-- GilmarSantosJr - 09 Mar 2009

As we don't care about anything prior to 5.8, we can simply localise STDIN / STDOUT without worrying whether they're tied or not (perl will worry for us).

Tested on current, trunk, works like a charm.

Also, maybe one day we could use something like CPAN:Capture::Tiny to do such stuff.

-- OlivierRaginel - 19 Sep 2010

ItemTemplate edit

Summary EngineTests bork the logger
ReportedBy CrawfordCurrie
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component UnitTestContrib
Priority Normal
CurrentState Waiting for Release
WaitingFor OlivierRaginel
Checkins Foswikirev:9244 Foswikirev:9245
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r6 - 19 Sep 2010, OlivierRaginel
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads