- Timestamp:
- Oct 4, 2020 11:36:35 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r82968 r86437 71 71 self._asBuildUrls = []; # The URLs passed us on the command line. 72 72 self._asBuildFiles = []; # The downloaded file names. 73 self._fUnpackedBuildFiles = False; 73 74 self._fAutoInstallPuelExtPack = True; 74 75 … … 83 84 reporter.log(''); 84 85 reporter.log('vboxinstaller Options:'); 85 reporter.log(' --vbox-build <url[,url2[,.. ]]>');86 reporter.log(' --vbox-build <url[,url2[,...]]>'); 86 87 reporter.log(' Comma separated list of URL to file to download and install or/and'); 87 88 reporter.log(' unpack. URLs without a schema are assumed to be files on the'); … … 123 124 # 124 125 if not self._asBuildUrls: 125 reporter.error('No build files spec fiied ("--vbox-build file1[,file2[...]]")');126 reporter.error('No build files specified ("--vbox-build file1[,file2[...]]")'); 126 127 return False; 127 128 if not self._asSubDriver: … … 166 167 fRc = self._executeSubDriver([ 'verify', ]); 167 168 if fRc is True and 'execute' not in self.asActions and 'all' not in self.asActions: 168 fRc = self._executeSubDriver([ 'config', ] );169 fRc = self._executeSubDriver([ 'config', ], fPreloadASan = True); 169 170 return fRc; 170 171 … … 173 174 Execute the sub testdriver. 174 175 """ 175 return self._executeSubDriver(self.asActions );176 return self._executeSubDriver(self.asActions, fPreloadASan = True); 176 177 177 178 def actionCleanupAfter(self): … … 203 204 processes, and finally do the pid file processing (again). 204 205 """ 205 fRc1 = self._executeSubDriver([ 'abort', ], fMaySkip = False );206 fRc1 = self._executeSubDriver([ 'abort', ], fMaySkip = False, fPreloadASan = True); 206 207 fRc2 = self._killAllVBoxProcesses(); 207 208 fRc3 = TestDriverBase.actionAbort(self); … … 212 213 # Persistent variables. 213 214 # 214 ## @todo integrate into the base driver. Persisten accross scratch wipes?215 ## @todo integrate into the base driver. Persistent accross scratch wipes? 215 216 216 217 def __persistentVarCalcName(self, sVar): … … 373 374 return (iRc == 0, iRc); 374 375 375 def _executeSubDriver(self, asActions, fMaySkip = True): 376 def _findASanLibsForASanBuild(self): 377 """ 378 Returns a list of (address) santizier related libraries to preload 379 when launching the sub driver. 380 Returns empty list for non-asan builds or on platforms where this isn't needed. 381 """ 382 # Note! We include libasan.so.X in the VBoxAll tarball for asan builds, so we 383 # can use its presence both to detect an 'asan' build and to return it. 384 # Only the libasan.so.X library needs preloading at present. 385 if self.sHost in ('linux',): 386 sLibASan = self._findFile(r'libasan\.so\..*'); 387 if sLibASan: 388 return [sLibASan,]; 389 return []; 390 391 def _executeSubDriver(self, asActions, fMaySkip = True, fPreloadASan = True): 376 392 """ 377 393 Execute the sub testdriver with the specified action. … … 380 396 asArgs.append('--no-wipe-clean'); 381 397 asArgs.extend(asActions); 398 399 asASanLibs = []; 400 if fPreloadASan: 401 asASanLibs = self._findASanLibsForASanBuild(); 402 if asASanLibs: 403 os.environ['LD_PRELOAD'] = ':'.join(asASanLibs); 404 os.environ['LSAN_OPTIONS'] = 'detect_leaks=0'; # We don't want python leaks. vbox.py disables this. 405 406 rc = self._executeSync(asArgs, fMaySkip = fMaySkip); 407 408 del os.environ['LSAN_OPTIONS']; 409 del os.environ['LD_PRELOAD']; 410 return rc; 411 382 412 return self._executeSync(asArgs, fMaySkip = fMaySkip); 383 413 … … 425 455 # list. This allows us to use VBoxAll*.tar.gz files. 426 456 # 427 for sFile in list(self._asBuildFiles): 457 for sFile in list(self._asBuildFiles): # Note! We copy the list as _maybeUnpackArchive updates it. 428 458 if self._maybeUnpackArchive(sFile, fNonFatal = True) is not True: 429 459 reporter.testDone(fSkipped = True); 430 460 return None; # Failed to unpack. Probably local error, like busy 431 461 # DLLs on windows, no reason for failing the build. 462 self._fUnpackedBuildFiles = True; 432 463 433 464 # … … 497 528 oRegExp = re.compile(sRegExp); 498 529 530 reporter.log('_findFile: %s' % (sRegExp,)); 499 531 for sFile in self._asBuildFiles: 500 532 if oRegExp.match(os.path.basename(sFile)) and os.path.exists(sFile): 501 533 return sFile; 534 535 # If we didn't unpack the build files, search all the files in the scratch area: 536 if not self._fUnpackedBuildFiles: 537 for sDir, _, asFiles in os.walk(self.sScratchPath): 538 for sFile in asFiles: 539 #reporter.log('_findFile: considering %s' % (sFile,)); 540 if oRegExp.match(sFile): 541 return os.path.join(sDir, sFile); 502 542 503 543 if fMandatory:
Note:
See TracChangeset
for help on using the changeset viewer.