[process] How to run test cases

As Boost.Process 0.3 has been released it would be great if the test cases are run on various platforms. So far I've tested Boost.Process on WinXP with MSVC 9.0, Cygwin with g++ 3.4.4 and Solaris with g++ 3.4.6 and Sun C++ 5.9. To make it as easy as possible for others to run the test cases here's a short description of how to proceed. Nearly all test cases depend on a program called "helpers". This program is built first and is started by many test cases as a child process. In order to find the program "helpers" the test cases must know its location. As there is no way to get the location at runtime it is hardcoded in the file libs/process/test/misc.hpp. As the location differs depending on what compiler is used YOU MUST CHECK FIRST THE PATH IN libs/process/test/misc.hpp! Otherwise most of the test cases will fail as they look for a program "helpers" in the wrong directory. As of today only those paths are correct and have been tested which are set for Windows, Cygwin and Solaris. Only after you have checked and maybe updated the path in libs/process/test/misc.hpp you should try to build and run the test cases: WinXP/MSVC 9.0 ************** With MSVC 9.0 you only need to open the Visual Studio 2008 Command Prompt, change to the directory with the test cases and run bjam: C:\boost_1_36_0\libs\process\test> ..\..\..\bjam.exe -q Cygwin/GCC 3.4.4 **************** On Cygwin it's important to know if the Boost libraries have been built for the POSIX or Windows API. By default Boost libraries on Cygwin use the Windows API. With the Windows API the Boost.Process test cases are not passed successfully though (there are compiler errors where I'm not sure currently if they are a Boost.Process problem and how they could be fixed). If you want to run the test cases on Cygwin you must (re-)build the Boost libraries to use the POSIX API: $ cd ~/boost_1_36_0 $ ./bjam cxxflags=-DBOOST_POSIX_API Afterwards you can run the test cases: $ cd ~/boost_1_36_0/libs/process/test $ ../../../bjam cxxflags=-DBOOST_POSIX_API -q Solaris/GCC 3.4.6 ***************** At first you have to put the following line in ~/user-config.jam: using gcc : : : <linker-type>sun ; Then start building the Boost libraries: $ cd ~/boost_1_36_0 $ ./bjam --toolset=gcc cxxflags=-mcpu=ultrasparc For the test cases to be passed successfully you must update Boost.Test. Change line 624 in ~/boost_1_36_0/boost/test/impl/execution_monitor.ipp temporarily to: - , m_CHLD_action( SIGCHLD, catch_system_errors, attach_dbg, alt_stack ) + , m_CHLD_action( SIGCHLD, false, attach_dbg, alt_stack ) It is important that the second parameter is false as the signal SIGCHLD should not be handled by the execution monitor and should not be reported as an error. Afterwards the test cases can be run: $ cd ~/boost_1_36_0/libs/process/test $ ../../../bjam --toolset=gcc cxxflags=-mcpu=ultrasparc -q Solaris/Sun C++ 5.9 ******************* Build the Boost libraries with the sun toolset: $ cd ~/boost_1_36_0 $ ./bjam --toolset=sun stdlib=sun-stlport For the test cases to be passed successfully you must update Boost.Test. Change line 624 in ~/boost_1_36_0/boost/test/impl/execution_monitor.ipp temporarily to: - , m_CHLD_action( SIGCHLD, catch_system_errors, attach_dbg, alt_stack ) + , m_CHLD_action( SIGCHLD, false, attach_dbg, alt_stack ) It is important that the second parameter is false as the signal SIGCHLD should not be handled by the execution monitor and should not be reported as an error. If you run the test cases now you'll get this compiler error for one test case: "../../../boost/asio/detail/socket_ops.hpp", line 218: Error: Cannot assign void* to char*. "../../../boost/asio/detail/socket_ops.hpp", line 229: Error: Cannot assign void* to char*. "../../../boost/asio/detail/descriptor_ops.hpp", line 66: Error: Cannot assign void* to char*. "../../../boost/asio/detail/descriptor_ops.hpp", line 72: Error: Cannot assign void* to char*. The bug has been reported to the Boost.Asio mailing list. If you want to build that one test case, too, you need to fix the two files in Boost.Asio 1.36.0 yourself. All the test cases can be built and run with: $ cd ~/boost_1_36_0/libs/process/test $ ../../../bjam --toolset=sun stdlib=sun-stlport -q

Hi, Ran the test suite on GCC 4.1.2, Linux x86_64. 9 test cases failed. Attached is the bjam output. Sebastian warning: skipping optional Message Passing Interface (MPI) library. note: to enable MPI support, add "using mpi ;" to user-config.jam. note: to suppress this message, pass "--without-mpi" to bjam. note: otherwise, you can safely ignore this message. ...patience... ...patience... ...found 2305 targets... ...using 9 temp targets... ...updating 18 targets... ...using <p../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static>arguments_test... testing.capture-output ../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.run ====== BEGIN OUTPUT ====== Running 2 test cases... arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(68): error in "test_quoting": check get_argument("foo") == ">>>foo<<<" failed [Running 2 test cases... != >>>foo<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(69): error in "test_quoting": check get_argument("foo ") == ">>>foo <<<" failed [ != >>>foo <<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(70): error in "test_quoting": check get_argument(" foo") == ">>> foo<<<" failed [ != >>> foo<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(71): error in "test_quoting": check get_argument("foo bar") == ">>>foo bar<<<" failed [ != >>>foo bar<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(73): error in "test_quoting": check get_argument("foo\"bar") == ">>>foo\"bar<<<" failed [ != >>>foo"bar<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(74): error in "test_quoting": check get_argument("foo\"bar\"") == ">>>foo\"bar\"<<<" failed [ != >>>foo"bar"<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(75): error in "test_quoting": check get_argument("\"foo\"bar") == ">>>\"foo\"bar<<<" failed [ != >>>"foo"bar<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(76): error in "test_quoting": check get_argument("\"foo bar\"") == ">>>\"foo bar\"<<<" failed [ != >>>"foo bar"<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(78): error in "test_quoting": check get_argument("*") == ">>>*<<<" failed [ != >>>*<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(79): error in "test_quoting": check get_argument("?*") == ">>>?*<<<" failed [ != >>>?*<<<] arguments_test.cpp(61): error in "test_quoting": check s.exit_status() == 0 failed [1 != 0] arguments_test.cpp(80): error in "test_quoting": check get_argument("[a-z]*") == ">>>[a-z]*<<<" failed [ != >>>[a-z]*<<<] *** 22 failures detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test" > "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.output" "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/arguments_test.test/gcc-4.1.2/debug/link-static/arguments_test.run... ...using <p../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static>executable_test... testing.capture-output ../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.run ====== BEGIN OUTPUT ====== Running 4 test cases... executable_test.cpp(41): error in "test_find_default": exception boost::filesystem::filesystem_error is expected *** 1 failure detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test" > "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.output" "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/executable_test.test/gcc-4.1.2/debug/link-static/executable_test.run... ...using <p../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static>process_test... testing.capture-output ../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.run ====== BEGIN OUTPUT ====== Running 2 test cases... process_base_test.hpp(84): fatal error in "(test_terminate<Process, Factory>)": critical check !s.exited() failed *** 1 failure detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test" > "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.output" "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/process_test.test/gcc-4.1.2/debug/link-static/process_test.run... ...using <p../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static>child_test... testing.capture-output ../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.run ====== BEGIN OUTPUT ====== Running 5 test cases... process_base_test.hpp(84): fatal error in "(test_terminate<Process, Factory>)": critical check !s.exited() failed *** 1 failure detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test" > "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.output" "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/child_test.test/gcc-4.1.2/debug/link-static/child_test.run... ...using <p../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static>launch_test... testing.capture-output ../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.run ====== BEGIN OUTPUT ====== Running 11 test cases... launch_base_test.hpp(75): error in "(test_close_stdin<Launcher, Context, Child>)": check s1.exit_status() == 0 failed [1 != 0] EXIT STATUS: 141 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test" > "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.output" "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/launch_test.test/gcc-4.1.2/debug/link-static/launch_test.run... ...using <p../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static>status_test... testing.capture-output ../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.run ====== BEGIN OUTPUT ====== Running 2 test cases... status_base_test.hpp(49): error in "(test_exit_success<Exit_Status>)": check s.exit_status() == 0 failed [1 != 0] *** 1 failure detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test" > "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.output" "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/status_test.test/gcc-4.1.2/debug/link-static/status_test.run... ...using <p../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static>pipeline_test... testing.capture-output ../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.run ====== BEGIN OUTPUT ====== Running 15 test cases... launch_base_test.hpp(75): error in "(test_close_stdin<Launcher, Context, Child>)": check s1.exit_status() == 0 failed [1 != 0] EXIT STATUS: 141 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test" > "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.output" "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/pipeline_test.test/gcc-4.1.2/debug/link-static/pipeline_test.run... ...using <p../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static>posix_launch_test... testing.capture-output ../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.run ====== BEGIN OUTPUT ====== Running 26 test cases... launch_base_test.hpp(75): error in "(test_close_stdin<Launcher, Context, Child>)": check s1.exit_status() == 0 failed [1 != 0] EXIT STATUS: 141 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test" > "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.output" "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/posix_launch_test.test/gcc-4.1.2/debug/link-static/posix_launch_test.run... ...using <p../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static>posix_status_test... testing.capture-output ../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.run ====== BEGIN OUTPUT ====== Running 2 test cases... status_base_test.hpp(49): error in "(test_exit_success<Exit_Status>)": check s.exit_status() == 0 failed [1 != 0] *** 1 failure detected in test suite "Master Test Suite" EXIT STATUS: 201 ====== END OUTPUT ====== LD_LIBRARY_PATH=/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test" > "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.output" 2>&1 status=$? echo >> "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.output" echo EXIT STATUS: $status >> "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.output" if test $status -eq 0 ; then cp "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.output" "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.run" fi verbose=0 if test $status -ne 0 ; then verbose=1 fi if test $verbose -eq 1 ; then echo ====== BEGIN OUTPUT ====== cat "../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.output" echo ====== END OUTPUT ====== fi exit $status ...failed testing.capture-output ../../../bin.v2/libs/process/test/posix_status_test.test/gcc-4.1.2/debug/link-static/posix_status_test.run... ...failed updating 9 targets... ...skipped 9 targets...

On Mon, 22 Sep 2008 13:41:32 +0200, Sebastian Redl <sebastian.redl@getdesigned.at> wrote: Hi Sebastian,
Ran the test suite on GCC 4.1.2, Linux x86_64. 9 test cases failed. Attached is the bjam output.
thanks for running the tests! On Linux line 624 in boost_1_36_0/boost/test/impl/execution_monitor.ipp should be temporarily changed like I did on Solaris (not sure if you did this?). SIGCHLD is otherwise handled by Boost.Test which will then report an error. I guess this is a problem on all *nix platforms (except Cygwin; it could be that Boost.Test doesn't handle signals on Cygwin?). As the test cases try to start a program "helpers" shared libraries "helpers" depends on must be found. You might need to set and export LD_LIBRARY_PATH before you run the test cases. If I'm not mistaken I had to set LD_LIBRARY_PATH=/usr/lib/libstdc++.so somewhere, too. The current environment variables will be used by all test cases (thus LD_LIBRARY_PATH will be defined when "helpers" is started). You can check if this is a problem on your computer by starting "helpers" yourself (the executable should be somewhere in boost_1_36_0/bin.v2/libs/process/test/gcc-4.1.2/...). Boris

Boris wrote:
On Linux line 624 in boost_1_36_0/boost/test/impl/execution_monitor.ipp should be temporarily changed like I did on Solaris (not sure if you did this?). I did.
As the test cases try to start a program "helpers" shared libraries "helpers" depends on must be found. You might need to set and export LD_LIBRARY_PATH before you run the test cases. No, no need. helpers runs fine standalone.
Sebastian

On Mon, 22 Sep 2008 16:42:52 +0200, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
Boris wrote:
On Linux line 624 in boost_1_36_0/boost/test/impl/execution_monitor.ipp should be temporarily changed like I did on Solaris (not sure if you did this?). I did.
As the test cases try to start a program "helpers" shared libraries "helpers" depends on must be found. You might need to set and export LD_LIBRARY_PATH before you run the test cases. No, no need. helpers runs fine standalone.
Unfortunately I don't have a Linux server at hand and can't reproduce the problems. Currently I'd say that "helpers" can't be started correctly by the test cases. At least that was the reason why I got similar errors when I tested everything on Cygwin and Solaris. Here status::exited() returns false two times (which mean "helpers" didn't exit gracefully), and status::exit_status() returns 1 instead of 0 five times. The test case arguments_test can't read any data from "helpers" either. I guess that this is really one problem which when fixed makes all the errors disappear. I could have a look but that would require me to give access to your server, Sebastian? Or does Boost have test servers somewhere which could be used to track down problems? Boris

on Mon Sep 22 2008, Boris <boriss-AT-web.de> wrote:
On Mon, 22 Sep 2008 16:42:52 +0200, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
Boris wrote:
On Linux line 624 in boost_1_36_0/boost/test/impl/execution_monitor.ipp should be temporarily changed like I did on Solaris (not sure if you did this?). I did.
As the test cases try to start a program "helpers" shared libraries "helpers" depends on must be found. You might need to set and export LD_LIBRARY_PATH before you run the test cases. No, no need. helpers runs fine standalone.
Unfortunately I don't have a Linux server at hand and can't reproduce the problems.
Can you not install one of the many free Linux implementations on one of the several free virtual machine implementations for Windows? -- Dave Abrahams BoostPro Computing http://www.boostpro.com

On Mon, 22 Sep 2008 19:39:22 +0200, David Abrahams <dave@boostpro.com> wrote:
on Mon Sep 22 2008, Boris <boriss-AT-web.de> wrote:
On Mon, 22 Sep 2008 16:42:52 +0200, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
Boris wrote:
On Linux line 624 in boost_1_36_0/boost/test/impl/execution_monitor.ipp should be temporarily changed like I did on Solaris (not sure if you did this?). I did.
As the test cases try to start a program "helpers" shared libraries "helpers" depends on must be found. You might need to set and export LD_LIBRARY_PATH before you run the test cases. No, no need. helpers runs fine standalone.
Unfortunately I don't have a Linux server at hand and can't reproduce the problems.
Can you not install one of the many free Linux implementations on one of the several free virtual machine implementations for Windows?
I had hoped after building and testing everything on Solaris it will just work on Linux. ;) Well, I'll install Linux and come back when I've reproduced and fixed the problem. Boris

OK, I found the problem. The existing __GNUG__ branch in misc.hpp is also under a __sun guard that I didn't see, so it didn't pick up the changed path at all. All tests pass now. Sebastian

On Mon, 22 Sep 2008 20:15:31 +0200, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
OK, I found the problem. The existing __GNUG__ branch in misc.hpp is also under a __sun guard that I didn't see, so it didn't pick up the changed path at all.
All tests pass now.
Ah, thank you, Sebastian, I'm glad to hear that! Can you tell me how you updated misc.hpp now? I'll take over the new hardcoded path for Linux for the next Boost.Process release. Boris

----- Original Message ----- From: "Boris" <boriss@web.de> To: <boost@lists.boost.org> Sent: Monday, September 22, 2008 10:54 AM Subject: [boost] [process] How to run test cases
As Boost.Process 0.3 has been released it would be great if the test cases are run on various platforms. So far I've tested Boost.Process on WinXP with MSVC 9.0, Cygwin with g++ 3.4.4 and Solaris with g++ 3.4.6 and Sun C++ 5.9. To make it as easy as possible for others to run the test cases here's a short description of how to proceed.
Thanks for giving the platform/compiler tested so far.
Cygwin/GCC 3.4.4 ****************
On Cygwin it's important to know if the Boost libraries have been built for the POSIX or Windows API. By default Boost libraries on Cygwin use the Windows API. With the Windows API the Boost.Process test cases are not passed successfully though (there are compiler errors where I'm not sure currently if they are a Boost.Process problem and how they could be fixed). If you want to run the test cases on Cygwin you must (re-)build the Boost libraries to use the POSIX API:
$ cd ~/boost_1_36_0 $ ./bjam cxxflags=-DBOOST_POSIX_API
Afterwards you can run the test cases:
$ cd ~/boost_1_36_0/libs/process/test $ ../../../bjam cxxflags=-DBOOST_POSIX_API -q
Hi, why do we need to build the whole Boost? All the libraries don't build on cygwin with this flag. While building the whole Boost libraries and I got gcc.compile.c++ bin.v2/libs/filesystem/build/gcc-4.3.4/release/threading-multi/v2/src/v2_operations.o In file included from ./boost/filesystem/v2/config.hpp:31, from ./boost/filesystem/v2/operations.hpp:17, from libs\filesystem\v2\src\v2_operations.cpp:45: ./boost/system/api_config.hpp:28:5: error: #error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported and also on the Boost.Process tests gcc.compile.c++ ../../../bin.v2/libs/process/test/include_detail_windows_helpers.test/gcc-4.3.4/debug/threading-multi/include_detail_windows_helpers.o In file included from ../../../boost/system/config.hpp:14, from ../../../boost/process/config.hpp:25, from inclusion\detail_windows_helpers.cpp:14: ../../../boost/system/api_config.hpp:28:5: error: #error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported Best, Vicente
participants (4)
-
Boris
-
David Abrahams
-
Sebastian Redl
-
vicente.botet