You are here: Foswiki>Tasks Web>Item1230 (03 Jan 2014, GeorgeClark)Edit Attach

Item1230: EngineTests bork the logger

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: UnitTestContrib
Branches:
Reported By: CrawfordCurrie
Waiting For:
Last Change By: GeorgeClark
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 Closed
WaitingFor
Checkins distro:e88fe19f2aab distro:a1acf8e40859
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r9 - 03 Jan 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy