|
25 |
class DceManagerTestCase : public TestCase |
25 |
class DceManagerTestCase : public TestCase |
26 |
{ |
26 |
{ |
27 |
public: |
27 |
public: |
28 |
DceManagerTestCase (std::string filename, Time maxDuration, std::string stdinFilename, bool useNet, bool useK); |
28 |
DceManagerTestCase (std::string filename, Time maxDuration, std::string stdinFilename, |
|
|
29 |
bool useNet, bool useK); |
29 |
private: |
30 |
private: |
30 |
virtual void DoRun (void); |
31 |
virtual void DoRun (void); |
31 |
static void Finished (int *pstatus, uint16_t pid, int status); |
32 |
static void Finished (int *pstatus, uint16_t pid, int status); |
|
37 |
bool m_useNet; |
38 |
bool m_useNet; |
38 |
}; |
39 |
}; |
39 |
|
40 |
|
40 |
DceManagerTestCase::DceManagerTestCase (std::string filename, Time maxDuration, std::string stdin, bool useNet, bool useK) |
41 |
DceManagerTestCase::DceManagerTestCase (std::string filename, Time maxDuration, |
41 |
: TestCase ("Check that process \"" + filename + "\" completes correctly."), |
42 |
std::string stdin, bool useNet, bool useK) |
42 |
m_filename (filename), m_stdinFilename ( stdin), m_maxDuration ( maxDuration ), m_useKernel (useK), m_useNet (useNet) |
43 |
: TestCase ("Check that process \"" + filename + |
|
|
44 |
(useK ? " (kernel" : " (ns3)") + |
45 |
"\" completes correctly."), |
46 |
m_filename (filename), |
47 |
m_stdinFilename (stdin), |
48 |
m_maxDuration (maxDuration), |
49 |
m_useKernel (useK), |
50 |
m_useNet (useNet) |
43 |
{ |
51 |
{ |
44 |
// mtrace (); |
52 |
// mtrace (); |
45 |
} |
53 |
} |
|
83 |
apps = dce.Install (nodes.Get (0)); |
91 |
apps = dce.Install (nodes.Get (0)); |
84 |
apps.Start (Seconds (3.0)); |
92 |
apps.Start (Seconds (3.0)); |
85 |
|
93 |
|
86 |
//dceManager.SetTaskManagerAttribute( "FiberManagerType", StringValue ( "UcontextFiberManager" ) ); |
|
|
87 |
} else |
94 |
} else |
88 |
{ |
95 |
{ |
89 |
dceManager.Install (nodes); |
96 |
dceManager.Install (nodes); |
|
164 |
{ "test-random", 0, "", false }, |
171 |
{ "test-random", 0, "", false }, |
165 |
{ "test-local-socket", 0, "", false }, |
172 |
{ "test-local-socket", 0, "", false }, |
166 |
{ "test-poll", 3200, "", true }, |
173 |
{ "test-poll", 3200, "", true }, |
167 |
// { "test-tcp-socket", 320, "", true }, |
174 |
{ "test-tcp-socket", 320, "", true }, |
168 |
{ "test-exec", 0, "" , false}, |
175 |
{ "test-exec", 0, "" , false}, |
169 |
/* { "test-raw-socket", 320, "", true },*/ |
176 |
/* { "test-raw-socket", 320, "", true },*/ |
170 |
{ "test-iperf", 0, "" , false}, |
177 |
{ "test-iperf", 0, "" , false}, |
|
193 |
|
200 |
|
194 |
for (unsigned int i = 0; i < sizeof(tests)/sizeof(testPair); i++) |
201 |
for (unsigned int i = 0; i < sizeof(tests)/sizeof(testPair); i++) |
195 |
{ |
202 |
{ |
196 |
AddTestCase (new DceManagerTestCase (tests[i].name, Seconds (tests[i].duration), tests[i].stdinfile, tests[i].useNet, useKernel () ) ); |
203 |
AddTestCase (new DceManagerTestCase (tests[i].name, Seconds (tests[i].duration), |
|
|
204 |
tests[i].stdinfile, |
205 |
tests[i].useNet, |
206 |
useKernel ())); |
197 |
} |
207 |
} |
198 |
} |
208 |
} |
199 |
|
209 |
|