From: Divye K. <div...@gm...> - 2008-09-03 06:43:48
|
Hi Kim, On Wed, Sep 3, 2008 at 2:31 AM, Kim Gräsman <kim...@gm...> wrote: > Hello, > > I've spent a couple of hours getting used to Boost, cpp-netlib, etc, > and spent those cleaning up localhost_tests.cpp. Here's a patch that > does a lot: > > - extracts http_test_server.hpp wrapping ShellExecuteEx/fork > - http_test_server no longer stops with an error dialog if Python is > not installed, but rather fails with an error message on the console > - uses global fixture for starting/stopping the Python test server > (independent of test run order) > - cleaned some file i/o out of text_file_query and binary_file_query > into helper function readfile > - consistent tab size in localhost_tests.cpp > - added adjust_lineendings, used with text_file_query to make the > source data match the output from the Python server (LF-only > line-endings) > I tried extracting the ShellExecuteEx and Fork into a separate header file and creating the fixture but I was continually running into segmentation faults. So, I put it aside for a while. Thanks for the patch! > I wish I could've offered these one-by-one, but it would turn into a > versioning nightmare to apply the patches in order. I think most of > the changes are benign, I'm a little doubtful of the last one, but > until I've fully understood Divye, this is a workaround to make it > right on Windows. > I think Dean's made a pretty good explanation of what I'm trying to convey. The file size test that fails on Windows actually passes on Linux because the linux version of the python library doesn't convert the CRLF to a single LF. Its a known bug in the Python library that causes the file size mismatch on windows. Although it helps to keep the tests clean, the text file transfer test is an expected failure on Windows. It would be better to mark this test as an expected failure in the test suite rather than making up for the shortcomings of the Python server. I hope that clears things up. Cheers, Divye -- An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup. H. L. Mencken (1880 - 1956) My official web site: http://people.iitr.ernet.in/shp/061305/ Webmaster: http://www.drkapoorsclinic.com Blog: http://divyekapoor.blogspot.com |