bug 1232: NS_TEST_SOURCEDIR does not handle test subdirectories
This commit is contained in:
@@ -853,6 +853,13 @@ protected:
|
||||
* \param directory the directory where the test data is located
|
||||
*
|
||||
* In general, this method is invoked as SetDataDir (NS_TEST_SOURCEDIR);
|
||||
* However, if a module contains a test directory with subdirectories
|
||||
* (e.g. src/mesh/test), and the test data (e.g. pcap traces) is located
|
||||
* in one of these subdirectories, then the variable NS_TEST_SOURCEDIR
|
||||
* may not work and the user may want to explicitly pass in a
|
||||
* directory string.
|
||||
*
|
||||
* Note that NS_TEST_SOURCEDIR is set in src/wscript for each module
|
||||
*/
|
||||
void SetDataDir (std::string directory);
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ class Dot11sRegressionSuite : public TestSuite
|
||||
public:
|
||||
Dot11sRegressionSuite () : TestSuite ("devices-mesh-dot11s-regression", SYSTEM)
|
||||
{
|
||||
SetDataDir (NS_TEST_SOURCEDIR);
|
||||
// We do not use NS_TEST_SOURCEDIR variable here since mesh/test has
|
||||
// subdirectories
|
||||
SetDataDir (std::string ("src/mesh/test/dot11s"));
|
||||
AddTestCase (new PeerManagementProtocolRegressionTest);
|
||||
AddTestCase (new HwmpSimplestRegressionTest);
|
||||
AddTestCase (new HwmpReactiveRegressionTest);
|
||||
|
||||
@@ -27,7 +27,9 @@ class FlameRegressionSuite : public TestSuite
|
||||
public:
|
||||
FlameRegressionSuite () : TestSuite ("devices-mesh-flame-regression", SYSTEM)
|
||||
{
|
||||
SetDataDir (NS_TEST_SOURCEDIR);
|
||||
// We do not use NS_TEST_SOURCEDIR variable here since mesh/test has
|
||||
// subdirectories
|
||||
SetDataDir (std::string ("src/mesh/test/flame"));
|
||||
AddTestCase (new FlameRegressionTest);
|
||||
}
|
||||
} g_flameRegressionSuite;
|
||||
|
||||
Reference in New Issue
Block a user