From c396683e90fdd56cb083f137875b6b0d01b45079 Mon Sep 17 00:00:00 2001 From: Andrii Dimov <adimov@magento.com> Date: Thu, 13 Oct 2016 14:22:51 +0300 Subject: [PATCH] MAGETWO-57697: ModuleDBChangeTest failed in develop branch --- dev/tests/static/get_github_changes.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dev/tests/static/get_github_changes.php b/dev/tests/static/get_github_changes.php index 7079c933a5b..f332208cd17 100644 --- a/dev/tests/static/get_github_changes.php +++ b/dev/tests/static/get_github_changes.php @@ -36,7 +36,7 @@ $fileExtensions = explode(',', isset($options['file-extensions']) ? $options['fi $mainline = 'mainline_' . (string)rand(0, 9999); $repo = getRepo($options, $mainline); -$branches = $repo->getBranches(); +$branches = $repo->getBranches('--remotes'); generateBranchesList($options['output-file'], $branches, $options['branch']); $changes = retrieveChangesAcrossForks($mainline, $repo, $options['branch']); $changedFiles = getChangedFiles($changes, $fileExtensions); @@ -73,7 +73,7 @@ function generateBranchesList($outputFile, $branches, $branchName) $branchesList = fopen($branchOutputFile, 'w'); fwrite($branchesList, $branchName . PHP_EOL); foreach ($branches as $branch) { - fwrite($branchesList, substr(strrchr($branch, '/'),1) . PHP_EOL); + fwrite($branchesList, substr(strrchr($branch, '/'), 1) . PHP_EOL); } fclose($branchesList); } @@ -105,7 +105,7 @@ function getChangedFiles(array $changes, array $fileExtensions) * * @param array $options * @param string $mainline - * @return array + * @return GitRepo * @throws Exception */ function getRepo($options, $mainline) @@ -227,11 +227,12 @@ class GitRepo /** * Returns branches * - * @return array + * @param string $source + * @return array|mixed */ - public function getBranches() + public function getBranches($source = '--all') { - $result = $this->call(sprintf('branch -r')); + $result = $this->call(sprintf('branch ' . $source)); return is_array($result) ? $result : []; } -- GitLab