Chromium Code Reviews| Index: recipe_engine/test.py |
| diff --git a/recipe_engine/test.py b/recipe_engine/test.py |
| index 0a12c0c57be5bf3a185babd9a810328f605688da..2924b206e684ff3b3738f9885ab45175148460fa 100644 |
| --- a/recipe_engine/test.py |
| +++ b/recipe_engine/test.py |
| @@ -409,8 +409,10 @@ def get_tests(test_filter=None): |
| # a weird recipe generates tests non-deterministically. The recipe |
| # engine should be robust against such user recipe code where |
| # reasonable. |
| - _GEN_TEST_CACHE[(recipe_name, test_data.name)] = copy.deepcopy( |
| - test_data) |
| + key = (recipe_name, test_data.name) |
| + if key in _GEN_TEST_CACHE: |
| + raise ValueError('Duplicate test found: %s' % test_data.name) |
|
iannucci1
2017/04/19 18:12:42
I think the error should indicate which recipe the
Paweł Hajdan Jr.
2017/04/19 18:17:06
It does, please see the test:
Exception: While ge
|
| + _GEN_TEST_CACHE[key] = copy.deepcopy(test_data) |
| test_description = TestDescription( |
| recipe_name, test_data.name, expect_dir, covers) |