--- a/src/core/model/test.h Sun Aug 07 16:52:49 2011 +0100
+++ b/src/core/model/test.h Mon Aug 08 08:33:29 2011 -0700
@@ -853,6 +853,13 @@
* \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);
--- a/src/mesh/test/dot11s/regression.cc Sun Aug 07 16:52:49 2011 +0100
+++ b/src/mesh/test/dot11s/regression.cc Mon Aug 08 08:33:29 2011 -0700
@@ -31,7 +31,9 @@
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);
--- a/src/mesh/test/flame/regression.cc Sun Aug 07 16:52:49 2011 +0100
+++ b/src/mesh/test/flame/regression.cc Mon Aug 08 08:33:29 2011 -0700
@@ -27,7 +27,9 @@
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;