diff --git a/recipes/recipe_modules/infra_paths/example.expected/basic.json b/recipes/recipe_modules/infra_paths/example.expected/basic.json index 2b403b0a5..3ed0a0454 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/basic.json +++ b/recipes/recipe_modules/infra_paths/example.expected/basic.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[CACHE]/git@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'start_dir': ('/', 'b', 'FakeTestingCWD'), 'cache': ('/', 'b', 'c'), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json index 02ec764ee..d9b7f0063 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json index 02ec764ee..d9b7f0063 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json index 02ec764ee..d9b7f0063 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'depot_tools': ('depot_tools',), 'build_internal': ('build_internal',), 'cache': ('build', 'slave', 'cache'), 'goma_cache': ('build', 'slave', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'build': ('build',), 'git_cache': ('build', 'slave', 'cache_dir'), 'root': (), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json new file mode 100644 index 000000000..b366b44fb --- /dev/null +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_linux.json @@ -0,0 +1,15 @@ +[ + { + "cmd": [], + "name": "show cache path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@", + "@@@STEP_LOG_END@result@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json new file mode 100644 index 000000000..b366b44fb --- /dev/null +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_mac.json @@ -0,0 +1,15 @@ +[ + { + "cmd": [], + "name": "show cache path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@", + "@@@STEP_LOG_END@result@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json new file mode 100644 index 000000000..b366b44fb --- /dev/null +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_generic_win.json @@ -0,0 +1,15 @@ +[ + { + "cmd": [], + "name": "show cache path", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'builder'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git'), 'tmp_base': ('/',)}@@@", + "@@@STEP_LOG_END@result@@@" + ] + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json index 02ec764ee..7c7a128d9 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json index 02ec764ee..7c7a128d9 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json index 02ec764ee..7c7a128d9 100644 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +++ b/recipes/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json @@ -3,8 +3,7 @@ "cmd": [], "name": "show cache path", "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", + "@@@STEP_LOG_LINE@result@base_paths: {'builder_cache': ('/', 'b', 'c', 'b'), 'goma_deps_cache': ('/', 'b', 'c', 'goma_deps_cache'), 'cache': ('/', 'b', 'c'), 'goma_cache': ('/', 'b', 'c', 'goma_cache'), 'start_dir': ('/', 'b', 'FakeTestingCWD'), 'git_cache': ('/', 'b', 'c', 'git_cache'), 'root': ('/', 'b', 'FakeTestingCWD'), 'tmp_base': ('/',)}@@@", "@@@STEP_LOG_END@result@@@" ] }, diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json b/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json deleted file mode 100644 index 02ec764ee..000000000 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "cmd": [], - "name": "show cache path", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", - "@@@STEP_LOG_END@result@@@" - ] - }, - { - "name": "$result", - "recipe_result": null, - "status_code": 0 - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json b/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json deleted file mode 100644 index 02ec764ee..000000000 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "cmd": [], - "name": "show cache path", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", - "@@@STEP_LOG_END@result@@@" - ] - }, - { - "name": "$result", - "recipe_result": null, - "status_code": 0 - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json b/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json deleted file mode 100644 index 02ec764ee..000000000 --- a/recipes/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "cmd": [], - "name": "show cache path", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@result@[CACHE]@@@", - "@@@STEP_LOG_LINE@result@[GIT_CACHE]@@@", - "@@@STEP_LOG_END@result@@@" - ] - }, - { - "name": "$result", - "recipe_result": null, - "status_code": 0 - } -] \ No newline at end of file diff --git a/recipes/recipe_modules/infra_paths/example.py b/recipes/recipe_modules/infra_paths/example.py index 6679aad5d..056304e7b 100644 --- a/recipes/recipe_modules/infra_paths/example.py +++ b/recipes/recipe_modules/infra_paths/example.py @@ -16,8 +16,7 @@ DEPS = [ def RunSteps(api): api.step('show cache path', []) api.step.active_result.presentation.logs['result'] = [ - str(api.path['cache']), - str(api.infra_paths.default_git_cache_dir), + 'base_paths: %r' % (api.path.c.base_paths,), ] @@ -25,7 +24,7 @@ def GenTests(api): yield api.test('basic') for platform in ('linux', 'mac', 'win'): - for path_config in ('buildbot', 'kitchen', 'swarmbucket'): + for path_config in ('buildbot', 'kitchen', 'generic'): yield ( api.test('paths_%s_%s' % (path_config, platform)) + api.platform.name(platform) + diff --git a/recipes/recipe_modules/infra_paths/path_config.py b/recipes/recipe_modules/infra_paths/path_config.py index 9d419451d..e63783a2e 100644 --- a/recipes/recipe_modules/infra_paths/path_config.py +++ b/recipes/recipe_modules/infra_paths/path_config.py @@ -51,6 +51,8 @@ def infra_kitchen(c): c.base_paths[path] = c.base_paths['cache'] + (path,) -@CONFIG_CTX(includes=['infra_buildbot']) -def infra_swarmbucket(c): - c.base_paths['git_cache'] = c.START_DIR + ('git_cache',) +@CONFIG_CTX() +def infra_generic(c): + c.base_paths['builder_cache'] = c.base_paths['cache'] + ('builder',) + c.base_paths['git_cache'] = c.base_paths['cache'] + ('git',) + c.base_paths['goma_cache'] = c.base_paths['cache'] + ('goma',)