Skip to content
Snippets Groups Projects
Commit 6fa671d7 authored by Peter Dimov's avatar Peter Dimov
Browse files

Pass regress.txt properly to the run rule

parent 09f1449d
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,10 @@ project
;
test-suite "xpressive"
: [ run regress.cpp : : : <toolset>msvc:<cxxflags>/bigobj <dependency>regress.txt ]
[ run regress_u.cpp : : : <toolset>msvc:<cxxflags>/bigobj <dependency>regress.txt ]
[ run c_traits.cpp : : : <toolset>msvc:<cxxflags>/bigobj <dependency>regress.txt ]
[ run c_traits_u.cpp : : : <toolset>msvc:<cxxflags>/bigobj <dependency>regress.txt ]
: [ run regress.cpp : : regress.txt : <toolset>msvc:<cxxflags>/bigobj ]
[ run regress_u.cpp : : regress.txt : <toolset>msvc:<cxxflags>/bigobj ]
[ run c_traits.cpp : : regress.txt : <toolset>msvc:<cxxflags>/bigobj ]
[ run c_traits_u.cpp : : regress.txt : <toolset>msvc:<cxxflags>/bigobj ]
[ run test1.cpp ]
[ run test2.cpp ]
[ run test3.cpp ]
......
......@@ -384,25 +384,13 @@ void run_test()
#endif
}
static char const * s_argv1;
///////////////////////////////////////////////////////////////////////////////
// open_test
bool open_test()
{
// This test-file is usually run from either $BOOST_ROOT/status, or
// $BOOST_ROOT/libs/xpressive/test. Therefore, the relative path
// to the data file this test depends on will be one of two
// possible paths.
// first assume we are being run from boost_root/status
in.open("../libs/xpressive/test/regress.txt");
if(!in.good())
{
// couldn't find the data file so try to find the data file from the test dir
in.clear();
in.open("./regress.txt");
}
in.open( s_argv1? s_argv1: "regress.txt" );
return in.good();
}
......@@ -432,6 +420,8 @@ void test_main()
//
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
s_argv1 = argv[1];
test_suite *test = BOOST_TEST_SUITE("basic regression test");
test->add(BOOST_TEST_CASE(&test_main));
return test;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment