- Timestamp:
- Mar 7, 2017 11:05:12 AM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testboxscript
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testboxscript/testboxcommons.py
r62484 r65970 107 107 fnLogger1('internal-error: Hit exception #2! %s' % (traceback.format_exc()), sCaller, sTsPrf); 108 108 109 if len(asInfo) > 0:109 if asInfo: 110 110 # Do the logging. 111 111 for sItem in asInfo: -
trunk/src/VBox/ValidationKit/testboxscript/testboxscript.py
r65196 r65970 89 89 asArgs = sys.argv[1:]; 90 90 asArgs.insert(0, sRealScript); 91 if sys.executable is not None and len(sys.executable) > 0:91 if sys.executable: 92 92 asArgs.insert(0, sys.executable); 93 93 … … 100 100 if asArgs[i] == '--': 101 101 break; 102 if sPidFile is not None and len(sPidFile) > 0:102 if sPidFile: 103 103 oPidFile = open(sPidFile, 'w'); 104 104 oPidFile.write(str(os.getpid())); -
trunk/src/VBox/ValidationKit/testboxscript/testboxscript_real.py
r62471 r65970 233 233 os.environ['TESTBOX_TIMEOUT_ABS'] = '0'; 234 234 235 if utils.getHostOs() is'win':235 if utils.getHostOs() == 'win': 236 236 os.environ['COMSPEC'] = os.path.join(os.environ['SystemRoot'], 'System32', 'cmd.exe'); 237 237 # Currently omitting any kBuild tools. … … 1009 1009 for sPrefix in ['sBuilds', 'sTestRsrc']: 1010 1010 sType = getattr(oOptions, sPrefix + 'ServerType'); 1011 if sType is None or len(sType.strip()) == 0:1011 if sType is None or not sType.strip(): 1012 1012 setattr(oOptions, sPrefix + 'ServerType', None); 1013 1013 elif sType not in ['cifs', 'nfs']: -
trunk/src/VBox/ValidationKit/testboxscript/testboxtasks.py
r65196 r65970 195 195 196 196 # If there is anything to flush, flush it. 197 if len(asBackLog) > 0:197 if asBackLog: 198 198 sBody = ''; 199 199 for sLine in asBackLog: … … 357 357 358 358 if asArgs[0].endswith('.py') and fWithInterpreter: 359 if sys.executable is not None and len(sys.executable) > 0:359 if sys.executable: 360 360 asArgs.insert(0, sys.executable); 361 361 else: … … 380 380 381 381 # EOF? 382 if len(sLine) == 0:382 if not sLine: 383 383 break; 384 384 … … 583 583 # Tell the script to clean up. 584 584 # 585 if len(self._sScriptCmdLine) > 0: # can be empty if cleanup crashed.585 if self._sScriptCmdLine: # can be empty if cleanup crashed. 586 586 (fRc, self._oChild) = self._spawnChild('cleanup-after'); 587 587 if fRc is True: … … 817 817 for sArchive in asArchives: 818 818 sArchive = sArchive.strip(); 819 if len(sArchive) == 0:819 if not sArchive: 820 820 continue; 821 821 -
trunk/src/VBox/ValidationKit/testboxscript/testboxupgrade.py
r62484 r65970 124 124 asArgs = [os.path.join(sUpgradeDir, 'testboxscript', 'testboxscript', 'testboxscript.py'), '--version' ]; 125 125 testboxcommons.log('Testing the new testbox script (%s)...' % (asArgs[0],)); 126 if sys.executable is not None and len(sys.executable) > 0:126 if sys.executable: 127 127 asArgs.insert(0, sys.executable); 128 128 oChild = subprocess.Popen(asArgs, shell = False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT);
Note:
See TracChangeset
for help on using the changeset viewer.