Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 91024 invoked from network); 18 Sep 2003 16:29:26 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 18 Sep 2003 16:29:26 -0000 Received: (qmail 25102 invoked by uid 500); 18 Sep 2003 16:29:18 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 25034 invoked by uid 500); 18 Sep 2003 16:29:17 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 24980 invoked from network); 18 Sep 2003 16:29:17 -0000 Received: from unknown (HELO secure.exclamationlabs.net) (66.77.29.186) by daedalus.apache.org with SMTP; 18 Sep 2003 16:29:17 -0000 Received: from modperlcookbook.org (pcp04156113pcs.walngs01.pa.comcast.net [68.81.89.216]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id h8IGTKr11725 for ; Thu, 18 Sep 2003 11:29:20 -0500 Message-ID: <3F69DD68.1030201@modperlcookbook.org> Date: Thu, 18 Sep 2003 12:29:28 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: [RFC] running tests after the server stops Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hi all... I'm thinking about implementing a mechansim that allows you to run certain tests after the server shuts down. the rationale behind this is some work I'm doing on Devel::Profiler::Apache - the profiler generates statistics when the children die off, so I need to either kill the children or shut down the server to have some data to test. now, killing off the children is easy in 1.0 with child_terminate(), but that isn't portable to 2.0 from what I can tell. I have wanted an API for restarting the server midstrean for a while now, mainly to test per-server cleanup logic. for that I currently use skip ($Apache::TestConfig::WIN32, kill HUP => Apache::TestServer->new->pid); and that would seem to work as well here, but again with (different) portability. however, what I really want is only one child, which would generate only one file when the server is shutdown. then I want to be able to use that file in additional tests. after poking around, I think I can hack together a few different options to support this: - a new command-line option, poststop=foo.t, which would specify tests to add after the server is shutdown. - treat a directory, t/poststop, as special, feeding the tests in there directly to the test harness. or perhaps something else that somebody here can come up with :) I can't help but feel there would be other uses for this, but maybe I'm wrong. ideas? comments? --Geoff