Skip to content

Commits on Source 6

  • Tom Pollard's avatar
    Add cli main & user conf option for 'cache-buildtrees' context · 118644b2
    Tom Pollard authored
    _context.py: Add cache_buildtrees global user context, the default
    of which is set to by default to 'always' via the addition of
    cache-buildtrees to userconfig.yaml cache group. 'failure' & 'never'
    can be given as valid options.
    
    app.py & cli.py: Add --cache-buildtrees as a bst main option, which
    when passed with a valid option can override the default or user
    defined context for cache_buildtrees.
    
    tests/completions/completions.py: Update for the added flag.
    118644b2
  • Tom Pollard's avatar
    _frontend/cli.py: Ensure failed buildtree warning is correct · b546bac1
    Tom Pollard authored
    not _cached_sucess() could resolve to true if the element wasn't
    cached at all. switch to _cached_failure() to ensure condition
    reflects expected artifact state
    b546bac1
  • Tom Pollard's avatar
    Provide configuration for the optional creation of buildtrees · d2029444
    Tom Pollard authored
    Artifacts can be cached explicitly with an empty `build tree` when
    built via the cli main options or user config for all or only
    successful build artifacts. Default behaviour is to still create
    and cache all expected buildtrees.
    
    element.py: _cache_artifact() Check if context for cache_buildtrees
    has been set to always or failure with a corresponding build
    result, if not skip attempting to export the build-root. Element
    types without a build-root are cached with an empty buildtree
    regardless. Update _stage_sources_at() to warn the user that the
    buildtree import is empty.
    
    tests/integration: Add test to artifact.py for the optional caching
    of buildtree content from bst build. Rename build-tree.py to
    shellbuildtrees.py to reflect included test cases, add test for
    empty buildtree warning and failure option.
    
    NEWS: Add entry for new option.
    d2029444
  • Jürg Billeter's avatar
    Merge branch 'tpollard/896' into 'master' · 54ec032a
    Jürg Billeter authored
    Optional creation of buildtrees
    
    Closes #896
    
    See merge request !1135
    54ec032a
  • Benjamin Schubert's avatar
    ec4bbf35
  • Benjamin Schubert's avatar
    Don't register exceptions when not running the testsuite · b41a82d3
    Benjamin Schubert authored
    This fix a problem with the garbage collector not being able to
    clean the MetaElements that are loaded.
    
    On small projects this is not a problem, but in bigger projects, this
    can save a few hundred of MBs at runtime
    
    The reason behind this is, whenever we have a "stack" element, which
    has no stack.yaml configuration, since it doesn't need it, we would
    get an exception thrown when initiating the first one, as loading the
    yaml file would fail.
    
    This would capture the frame in which this command was executed, which
    references meta_elements. Therefore, as long as another exception is not
    thrown, the garbage collector would not be able to clean all the
    MetaElements.
    b41a82d3
Loading