Fix scoped options initialization in test

Review Request #2850 - Created Sept. 20, 2015 and submitted

Peiyu Wang
benjyw, jsirois, stuhood

This is to fix the task scoped options not being initialized for tests,
discovered from debugging

TL;DR a new option was added to CacheSetup subsystem and subsequently passed to
CacheFactory contructor, previous options are also passed but not used so
failing to pass them in test hasn't caused us any trouble until now.

Two issues in context initialization for scoped options in test, one is
how it is used, the other is in fakes.create_options_for_optionables

  • for_task_types is needed so subsystem CacheSetup can be discovered and
  • For task scopes' with more than two enclosing scopes, like
    cache.goal1.task1,, not all enclosing scopes are present.
    In the cache.goal1.task1 case, the intermediate scope cache.goal1 is missing.
    This causes cache.goal1.task1 fail to initialize. Implemented a simplified
    version of Options.complete_scopes in fakes, so scopes initialization can
    happen in their enclosing order, i.e. cache, cache.goal1, cache.goal1.task1

And with the fix

now passed
previously failed

I am confused about the coverage drop " Coverage decreased (-1.7%) to 73.86%", it's supposed not to change anything
about coverage.


  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Benjy Weinberger
Peiyu Wang
Benjy Weinberger
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 07f0235fced6823134839c81e52fcd0e735c9ab9