@@ -74,11 +74,13 @@ int registerTests(
74
74
boost::unit_test::test_suite& _suite,
75
75
boost::filesystem::path const & _basepath,
76
76
boost::filesystem::path const & _path,
77
+ std::string const & _ipcPath,
77
78
TestCase::TestCaseCreator _testCaseCreator
78
79
)
79
80
{
80
81
int numTestsAdded = 0 ;
81
82
fs::path fullpath = _basepath / _path;
83
+ TestCase::Config config{fullpath.string (), _ipcPath};
82
84
if (fs::is_directory (fullpath))
83
85
{
84
86
test_suite* sub_suite = BOOST_TEST_SUITE (_path.filename ().string ());
@@ -87,7 +89,7 @@ int registerTests(
87
89
fs::directory_iterator ()
88
90
))
89
91
if (fs::is_directory (entry.path ()) || TestCase::isTestFilename (entry.path ().filename ()))
90
- numTestsAdded += registerTests (*sub_suite, _basepath, _path / entry.path ().filename (), _testCaseCreator);
92
+ numTestsAdded += registerTests (*sub_suite, _basepath, _path / entry.path ().filename (), _ipcPath, _testCaseCreator);
91
93
_suite.add (sub_suite);
92
94
}
93
95
else
@@ -96,13 +98,13 @@ int registerTests(
96
98
97
99
filenames.emplace_back (new string (_path.string ()));
98
100
_suite.add (make_test_case (
99
- [fullpath , _testCaseCreator]
101
+ [config , _testCaseCreator]
100
102
{
101
103
BOOST_REQUIRE_NO_THROW ({
102
104
try
103
105
{
104
106
stringstream errorStream;
105
- if (!_testCaseCreator (fullpath. string () )->run (errorStream))
107
+ if (!_testCaseCreator (config )->run (errorStream))
106
108
BOOST_ERROR (" Test expectation mismatch.\n " + errorStream.str ());
107
109
}
108
110
catch (boost::exception const & _e)
@@ -142,6 +144,7 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
142
144
master,
143
145
options.testPath / ts.path ,
144
146
ts.subpath ,
147
+ options.ipcPath ,
145
148
ts.testCaseCreator
146
149
) > 0 , std::string (" no " ) + ts.title + " tests found" );
147
150
}
0 commit comments