Commit:    a62a60a3282f495626ae5772a2d6321cbf353350
Author:    Anatol Belski <[email protected]>         Fri, 11 May 2018 17:14:28 +0200
Parents:   b6ff58a977a29419bf009dee9ff6f50eff2b89f6
Branches:  master

Link:       
http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=a62a60a3282f495626ae5772a2d6321cbf353350

Log:
Fix passing of PGO case options

Changed paths:
  M  include/BranchConfig.php
  M  include/BuildVC.php


Diff:
diff --git a/include/BranchConfig.php b/include/BranchConfig.php
index d085e59..adb45d8 100644
--- a/include/BranchConfig.php
+++ b/include/BranchConfig.php
@@ -85,13 +85,13 @@ class BranchConfig {
                return explode(",", $this->config["pgo_scenario"]);
        }
 
-       function getPgoCases()
+       function getPgoCases($build_name)
        {
-               if (!isset($this->config["pgo_cases"])) {
+               if (!isset($this->builds[$build_name]) || 
!isset($this->builds[$build_name]["pgo_cases"])) {
                        return NULL;
                }
 
-               return explode(",", $this->config["pgo_cases"]);
+               return explode(",", $this->builds[$build_name]["pgo_cases"]);
        }
 
        public static function getRequiredBuildsNum($path, $branch)
diff --git a/include/BuildVC.php b/include/BuildVC.php
index 07827c5..3443221 100644
--- a/include/BuildVC.php
+++ b/include/BuildVC.php
@@ -178,7 +178,7 @@ class BuildVC {
                $env["Path"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR 
. "deps" . DIRECTORY_SEPARATOR . "bin;" . $env["Path"];
 
                foreach ($this->branch->config->getPgoScenarios() as $scenario) 
{
-                       $cases = $this->branch->config->getPgoCases();
+                       $cases = 
$this->branch->config->getPgoCases($this->build_name);
                        $cmd = 'phpsdk_pgo --train --scenario=' . $scenario . 
($cases ? (" --cases=" . implode(",", $cases)) : "");
                        $ret = exec_single_log($cmd, $this->build_dir, $env);
                        if (!$ret || 0 !== (int)$ret["return_value"]) {


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to