VirtualBox

Changeset 58280 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Oct 16, 2015 12:54:22 PM (9 years ago)
Author:
vboxsync
Message:

tstRTLocalIpc.cpp: You have to make it all the way to the RTTestSummaryAndDestroy, duh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTLocalIpc.cpp

    r57358 r58280  
    579579}
    580580
    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 
     581static int testBasics(void)
     582{
    597583    RTTestISub("Basics");
    598 
    599     RTAssertSetMayPanic(false);
    600 #ifdef DEBUG_andy
    601     RTAssertSetQuiet(false);
    602 #endif
    603584
    604585    /* Server-side. */
     
    629610    RTTESTI_CHECK_RC_RET(RTLocalIpcServerDestroy(ipcServer), VERR_INVALID_MAGIC, 1);
    630611
     612    return 0;
     613}
     614
     615int 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
    631637    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);
    638645
    639646    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette