Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.4 KiB

  1. if (!$__SPGENVPM ) { use spg::env; }
  2. if (!$__IITBUILDPM ) { use iit::build; }
  3. if (!$__IITBUILDCOMPONENTVCPM ) { use iit::buildcomponentvc; }
  4. sub BeginBuildCustom
  5. {
  6. my($rc) = 1;
  7. if (IsMemberOf("BBT", @lArgs))
  8. {
  9. if (!IsMemberOf("ICECAP", @lArgs) && IsMemberOf("ICECAP", @lAllowedBuilds))
  10. {
  11. push(@lArgs, "ICECAP");
  12. }
  13. }
  14. return($rc);
  15. }
  16. sub EndBuildCustom
  17. {
  18. my($tmpStrBuildMsg) = $strBuildMsg;
  19. $strBuildMsg = "";
  20. my($nGoodBuilds) = $nTotalBuilds - $nFailedBuilds;
  21. my($nGoodMSIs) = $nTotalMSIs - $nFailedMSIs;
  22. my($nPercentBuildPass) = (($nTotalBuilds == 0) ? 0 : $nGoodBuilds * 100 / $nTotalBuilds);
  23. $nPercentBuildPass =~ s/(\.\d).*/$1/;
  24. my($nPercentMSIPass) = (($nTotalMSIs == 0) ? 0 : $nGoodMSIs * 100 / $nTotalMSIs);
  25. $nPercentMSIPass =~ s/(\.\d).*/$1/;
  26. my($sBVTCompKills) = "";
  27. if (@lBVTCompKills != ())
  28. {
  29. $sBVTCompKills = "\n* BVT".((@lBVTCompKills == 1) ? "" : "s")." ".join(", ", @lBVTCompKills)." failed to "
  30. ."terminate, results above are based on BVTs that completed\n\n";
  31. }
  32. my($sBVTCompBFails) = "";
  33. if (@lBVTCompBFails != ())
  34. {
  35. $sBVTCompBFails = "\n* BVT".((@lBVTCompBFails == 1) ? "" : "s")." ".join(", ", @lBVTCompBFails).".dll failed to "
  36. ."build, results above are based on BVT components that built successfully\n\n";
  37. }
  38. PrintL("<table cellspacing=3 cellpadding=2 border=4>\n<tr>\n"
  39. ."<td><b>Build Success</b></td>"
  40. ."<td bgcolor="
  41. .(($nPercentBuildPass == 100) ? "green" : (($nPercentBuildPass > 80) ? "yellow" : "red"))
  42. .">",
  43. PL_MSG | PL_NOSTD);
  44. PrintLTip("<b>".$nPercentBuildPass."%</b>", $nGoodBuilds." of ".$nTotalBuilds, PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  45. PrintL("</td>"
  46. ."</tr>"
  47. ."<tr>"
  48. ."<td><b>MSI Build Success</b></td>"
  49. ."<td bgcolor="
  50. .(($nPercentMSIPass > 90) ? "green" : (($nPercentMSIPass > 60) ? "yellow" : "red"))
  51. .">",
  52. PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  53. PrintLTip("<b>".$nPercentMSIPass."%</b>", $nGoodMSIs." of ".$nTotalMSIs, PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  54. PrintL("</td>"
  55. ."</tr>"
  56. ."<tr>"
  57. ."<td><b>BVT Success</b></td>"
  58. ."<td bgcolor="
  59. .(($g_nBVTPassedPercent == 100) ? "green" : (($g_nBVTPassedPercent > 50) ? "yellow" : "red"))
  60. .">",
  61. PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  62. PrintL("<b>".$g_nBVTPassedPercent."%"."</b>", PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  63. PrintL("</td></tr></table>\n<BR>", PL_MSG | PL_NOSTD | PL_MSGCONCAT);
  64. if ($sBVTCompKills)
  65. {
  66. PrintL("<dd>".$sBVTCompKills, PL_MSG | PL_NOSTD | PL_RED | PL_BOLD);
  67. }
  68. if ($sBVTCompBFails)
  69. {
  70. PrintL("<dd>".$sBVTCompBFails."<BR><BR>", PL_MSG | PL_NOSTD | PL_RED | PL_BOLD);
  71. }
  72. $strBuildMsg .= $tmpStrBuildMsg;
  73. # official build only fails if msi build fails
  74. if ($bOfficialBuild && ($bcStatus & BC_FAILED))
  75. {
  76. $bcStatus -= BC_FAILED;
  77. $bBuildFailed = 0;
  78. }
  79. elsif ($bNothingDone)
  80. {
  81. $bcStatus |= BC_NOTHINGDONE;
  82. }
  83. if ($bBVTFailed)
  84. {
  85. $bcStatus |= BC_BVTFAILED;
  86. }
  87. if ($bCopyFailed)
  88. {
  89. $bcStatus |= BC_COPYFAILED;
  90. }
  91. if ($bcStatus & BC_CABFAILED)
  92. {
  93. $bcStatus |= BC_FAILED;
  94. $bBuildFailed = 1;
  95. }
  96. }
  97. $__SPGBUILDPM = 1;
  98. 1;