Changeset 70488 in vbox for trunk/src/VBox/ValidationKit/utils/TestExecServ
- Timestamp:
- Jan 8, 2018 8:40:45 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120102
- Location:
- trunk/src/VBox/ValidationKit/utils/TestExecServ
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecService.cpp
r69111 r70488 58 58 #include <iprt/time.h> 59 59 #include <iprt/uuid.h> 60 61 #ifndef RT_OS_WINDOWS 62 # include <iprt/zip.h> 63 #endif 60 #include <iprt/zip.h> 64 61 65 62 #include "TestExecServiceInternal.h" … … 198 195 * @todo implement signals and stuff. */ 199 196 static bool volatile g_fTerminate = false; 197 /** Verbosity level. */ 198 uint32_t g_cVerbose = 1; 199 200 200 201 201 /** … … 742 742 } 743 743 744 #ifndef RT_OS_WINDOWS745 744 /** 746 745 * Unpacks a tar file. … … 797 796 return rc; 798 797 } 799 #endif800 798 801 799 /** … … 2763 2761 static RTEXITCODE txsMainLoop(void) 2764 2762 { 2763 if (g_cVerbose > 0) 2764 RTMsgInfo("txsMainLoop: start...\n"); 2765 2765 RTEXITCODE enmExitCode = RTEXITCODE_SUCCESS; 2766 2766 while (!g_fTerminate) … … 2773 2773 if (RT_FAILURE(rc)) 2774 2774 continue; 2775 if (g_cVerbose > 0) 2776 RTMsgInfo("txsMainLoop: CMD: %.8s...", pPktHdr->achOpcode); 2775 2777 2776 2778 /* … … 2834 2836 else if (txsIsSameOpcode(pPktHdr, "GET FILE")) 2835 2837 rc = txsDoGetFile(pPktHdr); 2836 #ifndef RT_OS_WINDOWS2837 2838 else if (txsIsSameOpcode(pPktHdr, "UNPKFILE")) 2838 2839 rc = txsDoUnpackFile(pPktHdr); 2839 #endif2840 2840 /* Misc: */ 2841 2841 else 2842 2842 rc = txsReplyUnknown(pPktHdr); 2843 2843 2844 if (g_cVerbose > 0) 2845 RTMsgInfo("txsMainLoop: CMD: %.8s -> %Rrc", pPktHdr->achOpcode, rc); 2844 2846 RTMemFree(pPktHdr); 2845 2847 } 2846 2848 2849 if (g_cVerbose > 0) 2850 RTMsgInfo("txsMainLoop: end\n"); 2847 2851 return enmExitCode; 2848 2852 } … … 2896 2900 static RTEXITCODE txsAutoUpdateStage2(int argc, char **argv, bool *pfExit, const char *pszUpgrading) 2897 2901 { 2902 if (g_cVerbose > 0) 2903 RTMsgInfo("Auto update stage 2..."); 2904 2898 2905 /* 2899 2906 * Copy the current executable onto the original. … … 2980 2987 static RTEXITCODE txsAutoUpdateStage1(int argc, char **argv, uint32_t cSecsCdWait, bool *pfExit) 2981 2988 { 2989 if (g_cVerbose > 1) 2990 RTMsgInfo("Auto update stage 1..."); 2991 2982 2992 /* 2983 2993 * Figure names of the current service image and the potential upgrade. … … 3022 3032 uint64_t cNsElapsed = RTTimeNanoTS() - nsStart; 3023 3033 if (cNsElapsed >= cSecsCdWait * RT_NS_1SEC_64) 3034 { 3035 if (g_cVerbose > 0) 3036 RTMsgInfo("Auto update: Giving up waiting for media."); 3024 3037 return RTEXITCODE_SUCCESS; 3038 } 3025 3039 RTThreadSleep(500); 3026 3040 } … … 3063 3077 { 3064 3078 RTFileReadAllFree(pvUpgrade, cbUpgrade); 3079 if (g_cVerbose > 0) 3080 RTMsgInfo("Auto update: Not necessary."); 3065 3081 return RTEXITCODE_SUCCESS; 3066 3082 } … … 3302 3318 { "--foreground", 'f', RTGETOPT_REQ_NOTHING }, 3303 3319 { "--daemonized", 'Z', RTGETOPT_REQ_NOTHING }, 3320 { "--quiet", 'q', RTGETOPT_REQ_NOTHING }, 3321 { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, 3304 3322 }; 3305 3323 … … 3391 3409 case 'w': 3392 3410 cSecsCdWait = Val.u32; 3411 break; 3412 3413 case 'q': 3414 g_cVerbose = 0; 3415 break; 3416 3417 case 'v': 3418 g_cVerbose++; 3393 3419 break; 3394 3420 … … 3448 3474 if (fDaemonize && !*pfExit) 3449 3475 { 3476 if (g_cVerbose > 0) 3477 RTMsgInfo("Daemonizing..."); 3450 3478 rc = RTProcDaemonize(argv, "--daemonized"); 3451 3479 if (RT_FAILURE(rc)) … … 3482 3510 if (RT_FAILURE(rc)) 3483 3511 return RTMsgErrorExit(RTEXITCODE_FAILURE, "RTUuidCreate failed: %Rrc", rc); 3512 if (g_cVerbose > 0) 3513 RTMsgInfo("Instance UUID: %RTuuid", &g_InstanceUuid); 3484 3514 3485 3515 /* -
trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceInternal.h
r69111 r70488 212 212 extern TXSTRANSPORT const g_TestDevTransport; 213 213 214 extern uint32_t g_cVerbose; 215 214 216 RT_C_DECLS_END 215 217
Note:
See TracChangeset
for help on using the changeset viewer.