| 1250 | } |
| 1251 | |
| 1252 | void |
| 1253 | PVCTestDriver::run_next_test() |
| 1254 | { |
| 1255 | unsigned a_index = i * 2; |
| 1256 | unsigned p_index = a_index + 1; |
| 1257 | |
| 1258 | if (p_index >= num_netvc_tests) { |
| 1259 | // We are done - // FIX - PASS or FAIL? |
| 1260 | if (errors == 0) { |
| 1261 | *pstatus = REGRESSION_TEST_PASSED; |
| 1262 | } else { |
| 1263 | *pstatus = REGRESSION_TEST_FAILED; |
| 1264 | } |
| 1265 | delete this; |
| 1266 | return; |
| 1267 | } |
| 1268 | completions_received = 0; |
| 1269 | i++; |
| 1270 | |
| 1271 | Dbg(dbg_ctl_pvc_test, "Starting test %s", netvc_tests_def[a_index].test_name); |
| 1272 | |
| 1273 | NetVCTest *p = new NetVCTest; |
| 1274 | NetVCTest *a = new NetVCTest; |
| 1275 | PluginVCCore *core = PluginVCCore::alloc(p, BUFFER_SIZE_INDEX_32K); |
| 1276 | |
| 1277 | p->init_test(NET_VC_TEST_PASSIVE, this, nullptr, r, &netvc_tests_def[p_index], "PluginVC", "pvc_test_detail"); |
| 1278 | PluginVC *a_vc = core->connect(); |
| 1279 | |
| 1280 | a->init_test(NET_VC_TEST_ACTIVE, this, a_vc, r, &netvc_tests_def[a_index], "PluginVC", "pvc_test_detail"); |
| 1281 | } |
| 1282 | |
| 1283 | int |
| 1284 | PVCTestDriver::main_handler(int /* event ATS_UNUSED */, void * /* data ATS_UNUSED */) |