Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1334)

Unified Diff: recipe_engine/simulation_test.py

Issue 2576163002: Fix _GEN_TEST_CACHE. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/simulation_test.py
diff --git a/recipe_engine/simulation_test.py b/recipe_engine/simulation_test.py
index d031acb75e9d0ef4a4216b401b3e6faedfe03365..544a9c474cba114677d5c0fdf66557bed4c12d0b 100644
--- a/recipe_engine/simulation_test.py
+++ b/recipe_engine/simulation_test.py
@@ -93,13 +93,14 @@ def RunRecipe(recipe_name, test_name):
from . import run
from . import step_runner
- if recipe_name not in _GEN_TEST_CACHE:
+ cache_key = (recipe_name, test_name)
+ if cache_key not in _GEN_TEST_CACHE:
recipe_script = _UNIVERSE.load_recipe(recipe_name)
test_api = loader.create_test_api(recipe_script.LOADED_DEPS, _UNIVERSE)
for test_data in recipe_script.gen_tests(test_api):
_GEN_TEST_CACHE[(recipe_name, test_data.name)] = copy.deepcopy(test_data)
- test_data = _GEN_TEST_CACHE[(recipe_name, test_name)]
+ test_data = _GEN_TEST_CACHE[cache_key]
config_types.ResetTostringFns()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698