Changeset 2405 for pjproject/trunk/tests/cdash/builder.py
- Timestamp:
- Jan 1, 2009 12:11:17 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/tests/cdash/builder.py
r2404 r2405 336 336 class MSVCTestBuilder(TestBuilder): 337 337 """\ 338 This class creates list of tests suitable for Visual Studio builds. 339 338 This class creates list of tests suitable for Visual Studio builds. 339 You need to set the MSVC environment variables (typically by calling 340 vcvars32.bat) prior to running this class. 341 340 342 """ 341 def __init__(self, config, vs_config="Release|Win32", build_config_name="",343 def __init__(self, config, target="Release|Win32", build_config_name="", 342 344 config_site="", exclude=[], not_exclude=[]): 343 345 """\ 344 346 Parameters: 345 347 config - BaseConfig instance 346 vs_config- Visual Studio build configuration to build.348 target - Visual Studio build configuration to build. 347 349 Sample: "Debug|Win32", "Release|Win32". 348 350 build_config_name - Optional name to be added as suffix to the build … … 359 361 config_site=config_site, exclude=exclude, 360 362 not_exclude=not_exclude) 361 self. vs_config = vs_config.lower()363 self.target = target.lower() 362 364 363 365 def build_tests(self): 364 366 365 (vsbuild,sys) = self. vs_config.split("|",2)367 (vsbuild,sys) = self.target.split("|",2) 366 368 367 369 build_name = sys + "-" + vs_get_version() + "-" + vsbuild … … 371 373 372 374 vccmd = "vcbuild.exe /nologo /nohtmllog /nocolor /rebuild " + \ 373 "pjproject-vs8.sln " + " \"" + self. vs_config+ "\""375 "pjproject-vs8.sln " + " \"" + self.target + "\"" 374 376 375 377 suffix = "-i386-win32-vc8-" + vsbuild … … 397 399 398 400 401 # 402 # Symbian test configurator 403 # 404 class SymbianTestBuilder(TestBuilder): 405 """\ 406 This class creates list of tests suitable for Symbian builds. You need to 407 set the command line build settings prior to running this class (typically 408 that involves setting the EPOCROOT variable and current device). 409 410 """ 411 def __init__(self, config, target="gcce urel", build_config_name="", 412 config_site="", exclude=[], not_exclude=[]): 413 """\ 414 Parameters: 415 config - BaseConfig instance 416 target - Symbian target to build. Default is "gcce urel". 417 build_config_name - Optional name to be added as suffix to the build 418 name. Sample: "APS", "VAS", etc. 419 config_site - Contents to be put on config_site.h 420 exclude - List of regular expression patterns for tests 421 that will be excluded from the run 422 not_exclude - List of regular expression patterns for tests 423 that will be run regardless of whether they 424 match the excluded pattern. 425 426 """ 427 TestBuilder.__init__(self, config, build_config_name=build_config_name, 428 config_site=config_site, exclude=exclude, 429 not_exclude=not_exclude) 430 self.target = target.lower() 431 432 def build_tests(self): 433 434 # Check that EPOCROOT is set 435 if not "EPOCROOT" in os.environ: 436 print "Error: EPOCROOT environment variable is not set" 437 sys.exit(1) 438 epocroot = os.environ["EPOCROOT"] 439 # EPOCROOT must have trailing backslash 440 if epocroot[-1] != "\\": 441 epocroot = epocroot + "\\" 442 os.environ["EPOCROOT"] = epocroot 443 sdk1 = epocroot.split("\\")[-2] 444 445 # Check that correct device is set 446 proc = subprocess.Popen("devices", stdout=subprocess.PIPE, 447 stderr=subprocess.STDOUT, shell=True) 448 sdk2 = "" 449 while True: 450 line = proc.stdout.readline() 451 if line.find("- default") > 0: 452 sdk2 = line.split(":",1)[0] 453 break 454 proc.wait() 455 456 if sdk1 != sdk2: 457 print "Error: default SDK in device doesn't match EPOCROOT" 458 print "Default device SDK =", sdk2 459 print "EPOCROOT SDK =", sdk1 460 sys.exit(1) 461 462 build_name = sdk2.replace("_", "-") + "-" + \ 463 self.target.replace(" ", "-") 464 465 if self.build_config_name: 466 build_name = build_name + "-" + self.build_config_name 467 468 cmdline = "cmd /C \"cd build.symbian && bldmake bldfiles && abld build %s\"" % (self.target) 469 470 cmds = [] 471 cmds.extend(update_ops) 472 cmds.extend([Operation(Operation.BUILD, cmdline)]) 473 474 self.ccdash_args = [] 475 suffix = "" 476 for c in cmds: 477 c.cmdline = c.cmdline.replace("$SUFFIX", suffix) 478 args = c.encode(self.config.base_dir) 479 args.extend(["-U", self.config.url, 480 "-S", self.config.site, 481 "-T", self.stamp(), 482 "-B", build_name, 483 "-G", self.config.group]) 484 args.extend(self.config.options) 485 self.ccdash_args.append(args) 486
Note: See TracChangeset
for help on using the changeset viewer.