From b8b5aaea9217f0a2e0b9a48bfa6e6fc054d74d23 Mon Sep 17 00:00:00 2001 From: nodir Date: Fri, 4 Nov 2016 14:36:15 -0700 Subject: [PATCH] fix swarmbucket infra path Do not rely on buildbot config which goes up 4 directories. Everything should happen in the workdir. Also exclude any project-specific paths. This fixes the problem that swarmbucket builds expect git_cache to be in /b/git_cache. It should be in the CWD/git_cache. This will fix Windows builders. R=vadimsh@chromium.org BUG= Review-Url: https://codereview.chromium.org/2477033002 --- recipe_modules/infra_paths/example.expected/basic.json | 2 +- .../infra_paths/example.expected/paths_buildbot_linux.json | 2 +- .../infra_paths/example.expected/paths_buildbot_mac.json | 2 +- .../infra_paths/example.expected/paths_buildbot_win.json | 2 +- .../infra_paths/example.expected/paths_kitchen_linux.json | 2 +- .../infra_paths/example.expected/paths_kitchen_mac.json | 2 +- .../infra_paths/example.expected/paths_kitchen_win.json | 2 +- .../infra_paths/example.expected/paths_swarmbucket_linux.json | 2 +- .../infra_paths/example.expected/paths_swarmbucket_mac.json | 2 +- .../infra_paths/example.expected/paths_swarmbucket_win.json | 2 +- recipe_modules/infra_paths/example.py | 2 +- recipe_modules/infra_paths/path_config.py | 4 +++- 12 files changed, 14 insertions(+), 12 deletions(-) diff --git a/recipe_modules/infra_paths/example.expected/basic.json b/recipe_modules/infra_paths/example.expected/basic.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/basic.json +++ b/recipe_modules/infra_paths/example.expected/basic.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json b/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +++ b/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json b/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +++ b/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json b/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +++ b/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json b/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +++ b/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json b/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +++ b/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json b/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +++ b/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +++ b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +++ b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json index 75aa33833..46c37186d 100644 --- a/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +++ b/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json @@ -3,7 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_TEXT@[CACHE]@@@" + "@@@STEP_TEXT@[GIT_CACHE]@@@" ] }, { diff --git a/recipe_modules/infra_paths/example.py b/recipe_modules/infra_paths/example.py index 2cca4c791..d1d33a50c 100644 --- a/recipe_modules/infra_paths/example.py +++ b/recipe_modules/infra_paths/example.py @@ -13,7 +13,7 @@ DEPS = [ def RunSteps(api): api.step('show cache path', []) - api.step.active_result.presentation.step_text = str(api.path['cache']) + api.step.active_result.presentation.step_text = str(api.path['git_cache']) def GenTests(api): diff --git a/recipe_modules/infra_paths/path_config.py b/recipe_modules/infra_paths/path_config.py index 4ec1bc791..b3880106d 100644 --- a/recipe_modules/infra_paths/path_config.py +++ b/recipe_modules/infra_paths/path_config.py @@ -53,6 +53,8 @@ def infra_kitchen(c): c.base_paths[path] = c.base_paths['cache'] + (path,) -@CONFIG_CTX(includes=['infra_buildbot']) +@CONFIG_CTX() def infra_swarmbucket(c): + c.base_paths['root'] = c.CURRENT_WORKING_DIR c.base_paths['git_cache'] = c.base_paths['root'] + ('git_cache',) + c.base_paths['goma_cache'] = c.base_paths['root'] + ('goma_cache',)