Commit: 7a4d416b7f795358ee5784414e33f1cf9fd1ede3 Author: Anatol Belski <[email protected]> Mon, 30 Oct 2017 07:40:54 +0100 Parents: 78297905d0b9b2de0a53358bd173fa54e161366b Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=7a4d416b7f795358ee5784414e33f1cf9fd1ede3 Log: Make PGO scenarios confgurable from rmtools Changed paths: M include/BranchConfig.php M include/BuildVC.php Diff: diff --git a/include/BranchConfig.php b/include/BranchConfig.php index 966076f..1ebb31f 100644 --- a/include/BranchConfig.php +++ b/include/BranchConfig.php @@ -73,4 +73,14 @@ class BranchConfig { return ''; } } + + function getPgoScenarios() + { + if (!isset($this->config["pgo_scenario"])) { + /* TODO obtain all from SDK. */ + return array("default", "cache"); + } + + return explode(",", $this->config["pgo_scenario"]); + } } diff --git a/include/BuildVC.php b/include/BuildVC.php index d409703..1e42990 100644 --- a/include/BuildVC.php +++ b/include/BuildVC.php @@ -154,7 +154,7 @@ class BuildVC { $env = $this->env; $env["Path"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR . "deps" . DIRECTORY_SEPARATOR . "bin;" . $env["Path"]; - foreach (array("default", "cache") as $scenario) { + foreach ($this->branch->config->getPgoScenarios() as $scenario) { $cmd = 'phpsdk_pgo --train --scenario=' . $scenario; $ret = exec_single_log($cmd, $this->build_dir, $env); if (!$ret || 0 != $ret["return_value"]) { -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
