|
Home > Archive > Apache Mod-Python > December 2005 > Testing mod_python on win32
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Testing mod_python on win32
|
|
| David Fraser 2005-12-05, 5:48 pm |
| There's an old thread below about testing on Win32.
As afar as I can recall, Nicolas Lehuen is the only guy who's been able
to run the tests on win32
Has anybody else been able to? Can we put together some hints as to how
to do it?
David
David Fraser wrote:
> Nicolas Lehuen wrote:
>
> Brilliant :-)
>
> Great, thanks
>
> Surely we could write code to figure these out? We work out many of
> them in setup.py.in / win32_postinstall.py anyway...
>
> OK - it seems the test framework leads at least a bit of documentation
> as to how to run on Windows
>
> Nothing like bothering people :-)
> So do these tests run for you?
> The disturbing thing for me was that the seem to fail without any
> error messages being produced by apache, even in the test/logs/* files
> It turns out that if the service can't write to the error log file, it
> fails and logs a message in the Windows Event log, rather than to the
> console.
> This is odd because it actually opens the log files itself.
> I suspect this is because it actually runs using a different user as a
> service...
>
> Anyway I should have been testing the earlier betas so I'm doing
> catchup :-)
> Cheers
> David
>
| |
| Nicolas Lehuen 2005-12-05, 5:48 pm |
| Hi David,
To follow my old promise, I've just checked in a bit of documentation on how
to run the test suite, including on Win32. I've also added a few self-test
in the test module, so that the most obvious setup mistakes are notified to
the user.
Here is the documentation, directly from the Subversion repository :
http://svn.apache.org/repos/asf/htt...unk/test/README
This should eventually be converted to TeX and integrated into the real
documentation, but for various reasons this way is the quickest way to put
it online. It's much better than the previous README file anyway (it was
basically saying "keep out unless you know what you're doing" ;).
Hope this helps.
Regards,
Nicolas
2005/12/5, David Fraser <davidf@sjsoft.com>:
>
> There's an old thread below about testing on Win32.
>
> As afar as I can recall, Nicolas Lehuen is the only guy who's been able
> to run the tests on win32
> Has anybody else been able to? Can we put together some hints as to how
> to do it?
>
> David
>
| |
| Graham Dumpleton 2005-12-05, 5:48 pm |
| I'm a bit confused by:
- The only trick is that you'll have to stop your Apache server
before launching
the test, as the start/stop command can only apply to one single
Apache instance.
Does this apply to UNIX as well as Win32?
I ask as I have never bothered to explicitly shut down any running
instance of
Apache, yet haven't noticed any problems with running the tests. If
this is a Win32
specific instruction, you might want to note it as such. On UNIX
systems, where
the web server may be doing real work, people may not want to shut it
down just
to be able to test a new separate version of mod_python that hasn't
been installed
yet.
Graham
On 06/12/2005, at 8:02 AM, Nicolas Lehuen wrote:
[vbcol=seagreen]
> Hi David,
>
> To follow my old promise, I've just checked in a bit of documentation
> on how to run the test suite, including on Win32. I've also added a
> few self-test in the test module, so that the most obvious setup
> mistakes are notified to the user.
>
> Here is the documentation, directly from the Subversion repository :
>
> http://svn.apache.org/repos/asf/htt...unk/test/README
>
> This should eventually be converted to TeX and integrated into the
> real documentation, but for various reasons this way is the quickest
> way to put it online. It's much better than the previous README file
> anyway (it was basically saying "keep out unless you know what you're
> doing" ;).
>
> Hope this helps.
>
> Regards,
> Nicolas
>
>
>
> 2005/12/5, David Fraser <davidf@sjsoft.com>:
| |
| David Fraser 2005-12-06, 2:47 am |
| Nicolas Lehuen wrote:
> Hi David,
>
> To follow my old promise, I've just checked in a bit of documentation
> on how to run the test suite, including on Win32. I've also added a
> few self-test in the test module, so that the most obvious setup
> mistakes are notified to the user.
>
> Here is the documentation, directly from the Subversion repository :
>
> http://svn.apache.org/repos/asf/htt...unk/test/README
> <http://svn.apache.org/repos/asf/htt...unk/test/README>
>
> This should eventually be converted to TeX and integrated into the
> real documentation, but for various reasons this way is the quickest
> way to put it online. It's much better than the previous README file
> anyway (it was basically saying "keep out unless you know what you're
> doing" ;).
>
> Hope this helps.
Thanks Nicolas, that was quick :-)
OK Now I know I'm following the correct procedure ...
At first all the tests failed... then I realised this was because I was
running it off a shared drive that the service didn't have access to as
it runs under a different account, so it simply fails to start with no
error messages... (Hmmm, sure I've done this before...)
After switching to a local drive, all tests pass! Hurray! This was on my
own built version, so the build process works nicely too...
So +1 for me on the already-released 3.2.5b on win32, and I should be
able to run tests in the future
Cheers
David
| |
| Nicolas Lehuen 2005-12-06, 2:47 am |
| My bad... It seems it's not necessary to stop the Apache server. I was a bit
confused by the Apache Monitor, a Win32 application putting an icon in the
tray area showing the state of the Apache server and allowing you to control
it. Turns out the monitor is a bit messed up by the test procedure, showing
the status of the test server and not the "official" server. Thus when the
tests stop, the monitor shows that the Apache server is stopped even though
the "official" one isn't.
I have changed the documentation accordingly.
Regards,
Nicolas
2005/12/5, Graham Dumpleton <grahamd@dscpl.com.au>:
>
> I'm a bit confused by:
>
> - The only trick is that you'll have to stop your Apache server
> before launching
> the test, as the start/stop command can only apply to one single
> Apache instance.
>
> Does this apply to UNIX as well as Win32?
>
> I ask as I have never bothered to explicitly shut down any running
> instance of
> Apache, yet haven't noticed any problems with running the tests. If
> this is a Win32
> specific instruction, you might want to note it as such. On UNIX
> systems, where
> the web server may be doing real work, people may not want to shut it
> down just
> to be able to test a new separate version of mod_python that hasn't
> been installed
> yet.
>
> Graham
>
> On 06/12/2005, at 8:02 AM, Nicolas Lehuen wrote:
>
>
>
| |
| David Fraser 2005-12-06, 2:47 am |
| I'm sure this is Win32 only.
We could even remove the requirement on Win32 by using an alternative
service name that we create and destroy as required.
I've opened a Jira issue with a patch for this:
http://issues.apache.org/jira/browse/MODPYTHON-95
Graham Dumpleton wrote:
> I'm a bit confused by:
>
> - The only trick is that you'll have to stop your Apache server
> before launching
> the test, as the start/stop command can only apply to one single
> Apache instance.
>
> Does this apply to UNIX as well as Win32?
>
> I ask as I have never bothered to explicitly shut down any running
> instance of
> Apache, yet haven't noticed any problems with running the tests. If
> this is a Win32
> specific instruction, you might want to note it as such. On UNIX
> systems, where
> the web server may be doing real work, people may not want to shut it
> down just
> to be able to test a new separate version of mod_python that hasn't
> been installed
> yet.
>
> Graham
>
> On 06/12/2005, at 8:02 AM, Nicolas Lehuen wrote:
>
>
| |
| Nicolas Lehuen 2005-12-06, 2:47 am |
| Woops, I've marked the issue as resolved since I've corrected the
documentation, but I've not taken your patch into account. I'm not really
sure it's required, though, since the only problem is that the Apache
Monitor gets a bit confused by the test server, buit everything else works
correctly. Does your patch fixes the problem with the Apache Monitor ?
Regards,
Nicolas
2005/12/6, David Fraser <davidf@sjsoft.com>:
>
> I'm sure this is Win32 only.
>
> We could even remove the requirement on Win32 by using an alternative
> service name that we create and destroy as required.
> I've opened a Jira issue with a patch for this:
> http://issues.apache.org/jira/browse/MODPYTHON-95
>
> Graham Dumpleton wrote:
>
> able
> how
>
>
| |
| David Fraser 2005-12-06, 2:47 am |
| In parallel, I opened http://issues.apache.org/jira/browse/MODPYTHON-95
which changes the service name, and prevents this confusion anyway...
The patch could be improved, perhaps we should make this automatic on
win32...
Nicolas Lehuen wrote:
> My bad... It seems it's not necessary to stop the Apache server. I was
> a bit confused by the Apache Monitor, a Win32 application putting an
> icon in the tray area showing the state of the Apache server and
> allowing you to control it. Turns out the monitor is a bit messed up
> by the test procedure, showing the status of the test server and not
> the "official" server. Thus when the tests stop, the monitor shows
> that the Apache server is stopped even though the "official" one isn't.
>
> I have changed the documentation accordingly.
>
> Regards,
> Nicolas
>
> 2005/12/5, Graham Dumpleton <grahamd@dscpl.com.au
> <mailto:grahamd@dscpl.com.au>>:
>
> I'm a bit confused by:
>
> - The only trick is that you'll have to stop your Apache server
> before launching
> the test, as the start/stop command can only apply to one single
> Apache instance.
>
> Does this apply to UNIX as well as Win32?
>
> I ask as I have never bothered to explicitly shut down any running
> instance of
> Apache, yet haven't noticed any problems with running the tests. If
> this is a Win32
> specific instruction, you might want to note it as such. On UNIX
> systems, where
> the web server may be doing real work, people may not want to shut it
> down just
> to be able to test a new separate version of mod_python that hasn't
> been installed
> yet.
>
> Graham
>
> On 06/12/2005, at 8:02 AM, Nicolas Lehuen wrote:
>
> documentation
> repository :
> you're
> <mailto:davidf@sjsoft.com>>:
> as to
>
>
| |
| David Fraser 2005-12-06, 2:47 am |
| Hi Nicolas
Interesting, I never even tried running it the same time as the service,
so I can see that actually works now (except for the monitor problem).
Yes, my patch fixes the problem with the monitor
David
Nicolas Lehuen wrote:
> Woops, I've marked the issue as resolved since I've corrected the
> documentation, but I've not taken your patch into account. I'm not
> really sure it's required, though, since the only problem is that the
> Apache Monitor gets a bit confused by the test server, buit
> everything else works correctly. Does your patch fixes the problem
> with the Apache Monitor ?
>
> Regards,
> Nicolas
>
> 2005/12/6, David Fraser <davidf@sjsoft.com <mailto:davidf@sjsoft.com>>:
>
> I'm sure this is Win32 only.
>
> We could even remove the requirement on Win32 by using an alternative
> service name that we create and destroy as required.
> I've opened a Jira issue with a patch for this:
> http://issues.apache.org/jira/browse/MODPYTHON-95
>
> Graham Dumpleton wrote:
>
> shut it
> documentation
> repository :
> quickest
> file
> you're
> <mailto:davidf@sjsoft.com>>:
> been able
> as to how
>
>
| |
| Nicolas Lehuen 2005-12-06, 7:46 am |
| David,
Though your code seems perfect, I'm a bit worried about installing a
service, even temporary, for testing purposes.
It adds another point where the test could fail for setup reasons, and
should the test end unexpectedly, the tester's system has an extra service
which points to a temporary generated configuration file.
Since everything seems OK without the service layer, I'd rather we keep the
test suite as is and not introduce some extra feature that we'll have to
debug later on. Nothings kills me more than debugging the tests .
Regards,
Nicolas
2005/12/6, David Fraser <davidf@sjsoft.com>:
>
> Hi Nicolas
>
> Interesting, I never even tried running it the same time as the service,
> so I can see that actually works now (except for the monitor problem).
> Yes, my patch fixes the problem with the monitor
>
> David
>
> Nicolas Lehuen wrote:
>
> alternative
> If
> hasn't
> a
> http://svn.apache.org/repos/asf/htt...unk/test/README
> the
>
>
| |
| David Fraser 2005-12-06, 7:46 am |
| Hi Nicolas
Of course, one way of fixing this up is ensuring we use a test framework
that cleans everything up.
As it stands, we could potentially have Apache processes left hanging
around...
In fact we could have a service left running that seems to be the
standard Apache service but is in fact the test service...
I think the current situation is worse since it actually stops your
existing Apache service if you leave it running.
At least with the patch the stuff left hanging around is clearly marked
as testing mod python.
The alternative would be to test Apache standalone rather than as a
service, but this would make the tests more difficult to control
David
Nicolas Lehuen wrote:
> David,
>
> Though your code seems perfect, I'm a bit worried about installing a
> service, even temporary, for testing purposes.
>
> It adds another point where the test could fail for setup reasons, and
> should the test end unexpectedly, the tester's system has an extra
> service which points to a temporary generated configuration file.
>
> Since everything seems OK without the service layer, I'd rather we
> keep the test suite as is and not introduce some extra feature that
> we'll have to debug later on. Nothings kills me more than debugging
> the tests .
>
> Regards,
> Nicolas
>
> 2005/12/6, David Fraser <davidf@sjsoft.com <mailto:davidf@sjsoft.com>>:
>
> Hi Nicolas
>
> Interesting, I never even tried running it the same time as the
> service,
> so I can see that actually works now (except for the monitor problem).
> Yes, my patch fixes the problem with the monitor
>
> David
>
> Nicolas Lehuen wrote:
>
> that the
> <mailto:davidf@sjsoft.com> <mailto:davidf@sjsoft.com
> <mailto:davidf@sjsoft.com>>>:
> alternative
> server
> one single
> running
> tests. If
> On UNIX
> that hasn't
> also added a
> obvious setup
> http://svn.apache.org/repos/asf/htt...unk/test/README
> into the
> README
> what
> <mailto:davidf@sjsoft.com>
> who's
> hints
>
>
| |
| David Fraser 2005-12-06, 7:46 am |
| Another minor point:
6 of the tests fail without the patch if the Apache service was running
before the tests started.
These all pass with the patch regardless of the status of the Apache
service.
David Fraser wrote:
> Hi Nicolas
>
> Of course, one way of fixing this up is ensuring we use a test
> framework that cleans everything up.
> As it stands, we could potentially have Apache processes left hanging
> around...
> In fact we could have a service left running that seems to be the
> standard Apache service but is in fact the test service...
> I think the current situation is worse since it actually stops your
> existing Apache service if you leave it running.
> At least with the patch the stuff left hanging around is clearly
> marked as testing mod python.
>
> The alternative would be to test Apache standalone rather than as a
> service, but this would make the tests more difficult to control
>
> David
>
> Nicolas Lehuen wrote:
>
>
| |
| Nicolas Lehuen 2005-12-06, 5:47 pm |
| David,
As I've wrote before, I made a mistake in the documentation, asstopping
Apache is not required, and having a running service has nothing to do with
the test. I don't have the problem even with the service running. What test
are failing on your system ?
Regards,
Nicolas
2005/12/6, David Fraser <davidf@sjsoft.com>:
>
> Another minor point:
> 6 of the tests fail without the patch if the Apache service was running
> before the tests started.
> These all pass with the patch regardless of the status of the Apache
> service.
>
> David Fraser wrote:
>
> not
> problem
> the
>
>
| |
| David Fraser 2005-12-07, 7:51 am |
| Well it certainly causes problems for me :-)
OK It's only one that fails, I didn't read the message clearly. It's
testLoadModule, the first test.
But the existing Apache service is definitely stopped.
What seems to happen is on the first test, it tries to start the
service, then fails, then tries to stop it and stops the existing
running service.
This seems fairly logical. Are you sure your main apache service is
called Apache2 (the default)?
I've attached the diff between a log of running the tests without the
service started and with the service started (with the hunks for
different port numbers removed).
Regards
David
Nicolas Lehuen wrote:
> David,
>
> As I've wrote before, I made a mistake in the documentation,
> asstopping Apache is not required, and having a running service has
> nothing to do with the test. I don't have the problem even with the
> service running. What test are failing on your system ?
>
> Regards,
> Nicolas
>
> 2005/12/6, David Fraser <davidf@sjsoft.com <mailto:davidf@sjsoft.com>>:
>
> Another minor point:
> 6 of the tests fail without the patch if the Apache service was
> running
> before the tests started.
> These all pass with the patch regardless of the status of the Apache
> service.
>
> David Fraser wrote:
>
> hanging
> installing a
> configuration file.
> that
> <mailto:davidf@sjsoft.com> <mailto:davidf@sjsoft.com
> <mailto:davidf@sjsoft.com>>>:
> the
> corrected the
> account. I'm not
> the problem
> <mailto:davidf@sjsoft.com>
> <mailto:davidf@sjsoft.com <mailto:davidf@sjsoft.com>
> Apache
> apply to
> down any
> running the
> such.
> bit of
> I've
> Subversion
> http://svn.apache.org/repos/asf/htt...unk/test/README
> integrated
> way is the
> previous
> you know
> <mailto:davidf@sjsoft.com>
> <mailto:davidf@sjsoft.com <mailto:davidf@sjsoft.com>>>>:
> only guy
> together some
>
>
| |
| David Fraser 2005-12-08, 2:46 am |
| Has anyone else run the tests on win32 with a standard Apache2 service
started and checked the effects? (Does it stop the service? Do some
tests fail? etc)
David Fraser wrote:
> Well it certainly causes problems for me :-)
> OK It's only one that fails, I didn't read the message clearly. It's
> testLoadModule, the first test.
> But the existing Apache service is definitely stopped.
> What seems to happen is on the first test, it tries to start the
> service, then fails, then tries to stop it and stops the existing
> running service.
> This seems fairly logical. Are you sure your main apache service is
> called Apache2 (the default)?
> I've attached the diff between a log of running the tests without the
> service started and with the service started (with the hunks for
> different port numbers removed).
>
> Regards
> David
>
> Nicolas Lehuen wrote:
>
>
|
|
|
|
|