Changeset 58280 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Oct 16, 2015 12:54:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp
r57358 r58280 579 579 } 580 580 581 int main(int argc, char **argv) 582 { 583 if ( argc > 2 584 && !RTStrICmp(argv[1], "child")) 585 return mainChild(argc, argv); 586 587 RTTEST hTest; 588 RTEXITCODE rcExit = RTTestInitAndCreate("tstRTLocalIpc", &hTest); 589 if (rcExit) 590 return rcExit; 591 RTTestBanner(hTest); 592 593 char szExecPath[RTPATH_MAX]; 594 if (!RTProcGetExecutablePath(szExecPath, sizeof(szExecPath))) 595 RTStrCopy(szExecPath, sizeof(szExecPath), argv[0]); 596 581 static int testBasics(void) 582 { 597 583 RTTestISub("Basics"); 598 599 RTAssertSetMayPanic(false);600 #ifdef DEBUG_andy601 RTAssertSetQuiet(false);602 #endif603 584 604 585 /* Server-side. */ … … 629 610 RTTESTI_CHECK_RC_RET(RTLocalIpcServerDestroy(ipcServer), VERR_INVALID_MAGIC, 1); 630 611 612 return 0; 613 } 614 615 int main(int argc, char **argv) 616 { 617 if ( argc > 2 618 && !RTStrICmp(argv[1], "child")) 619 return mainChild(argc, argv); 620 621 RTTEST hTest; 622 RTEXITCODE rcExit = RTTestInitAndCreate("tstRTLocalIpc", &hTest); 623 if (rcExit) 624 return rcExit; 625 RTTestBanner(hTest); 626 627 char szExecPath[RTPATH_MAX]; 628 if (!RTProcGetExecutablePath(szExecPath, sizeof(szExecPath))) 629 RTStrCopy(szExecPath, sizeof(szExecPath), argv[0]); 630 631 bool fMayPanic = RTAssertSetMayPanic(false); 632 bool fQuiet = RTAssertSetQuiet(false); 633 testBasics(); 634 RTAssertSetMayPanic(fMayPanic); 635 RTAssertSetQuiet(fQuiet); 636 631 637 if (RTTestErrorCount(hTest) == 0) 632 { 633 RTTESTI_CHECK_RC_RET(testServerListenAndCancel(hTest, szExecPath), VINF_SUCCESS, 1); 634 RTTESTI_CHECK_RC_RET(testSessionConnection(hTest, szExecPath), VINF_SUCCESS, 1); 635 RTTESTI_CHECK_RC_RET(testSessionWait(hTest, szExecPath), VINF_SUCCESS, 1); 636 RTTESTI_CHECK_RC_RET(testSessionData(hTest, szExecPath), VINF_SUCCESS, 1); 637 } 638 testServerListenAndCancel(hTest, szExecPath); 639 if (RTTestErrorCount(hTest) == 0) 640 testSessionConnection(hTest, szExecPath); 641 if (RTTestErrorCount(hTest) == 0) 642 testSessionWait(hTest, szExecPath); 643 if (RTTestErrorCount(hTest) == 0) 644 testSessionData(hTest, szExecPath); 638 645 639 646 /*
Note:
See TracChangeset
for help on using the changeset viewer.