1. 25 Mar, 2019 1 commit
  2. 21 Mar, 2019 1 commit
    • Angelos Evripiotis's avatar
      tests: str(datafiles) instead of a longer thing · f2b15d86
      Angelos Evripiotis authored
      Replace some popular copypasta.
      
      This important-looking invocation:
      
          os.path.join(datafiles.dirname, datafiles.basename)
      
      is equivalent to this shorter invocation:
      
          project = str(datafiles)
      
      It seems like it's very popular copypasta, replace it with the shorter
      one thus:
      
          # Use 'gsed' or 'sed' etc. as appropriate for your system.
          git config --global alias.sub '!f() { git grep --name-only --null "$1" | gxargs --null gsed --in-place --expression "s/$1/$2/g" ; }; f'
          git sub 'os.path.join(datafiles.dirname, datafiles.basename)' 'str(datafiles)'
      f2b15d86
  3. 14 Mar, 2019 2 commits
    • Raoul Hidalgo Charman's avatar
      Integrate source cache with rest of buildstream · 6a1e7461
      Raoul Hidalgo Charman authored
      This involve introducing new Consistency states `STAGED` and `BOTH` that
      represent when the source is just in the local CAS and in both the local
      CAS and unstaged in the source directory.
      
      Sources are staged for each element into the local CAS during the fetch
      stage. If the sources are in the local consistency state `STAGED` when
      wanting to open a workspace, the original sources are fetched.
      
      Relavant tests this affects have been changed.
      
      Part of #440
      6a1e7461
    • Raoul Hidalgo Charman's avatar
      CASQuota: move clean method here · cbc5af53
      Raoul Hidalgo Charman authored
      We need the clean method to be able to remove source refs as well.
      
      Part of #440
      cbc5af53
  4. 01 Mar, 2019 3 commits
  5. 28 Feb, 2019 1 commit
  6. 19 Feb, 2019 3 commits
  7. 08 Feb, 2019 1 commit
    • Phil Dawson's avatar
      Expose basic api for testing external plugins. · b4d4c4f5
      Phil Dawson authored
      We want external plugins to be able to make use of the core testing utils.
      This commit exposes the basic utilities which are currently in use in
      bst-external plugins. If necessary, more utilities could be exposed in the
      future.
      
      Moves the following files from tests/testutils/ to
      buildstream/plugintestingutils/:
      o runcli.py
      o integration.py
      
      As part of this, this commit makes the following changes to runcli.py
      and integration.py:
      o runcli.py: Fix linting errors
      o runcli.py: Add user facing documentation
      o Integration.py: Add user facing documentation
      b4d4c4f5
  8. 25 Jan, 2019 1 commit
    • Tristan Van Berkom's avatar
      _artifactcache.py: Don't require the quota to be available on disk. · 22b3a0c1
      Tristan Van Berkom authored
      Instead only rely on the headroom to be enough to protect against
      out of space conditions. The headroom can become configurable as
      a separate step is required.
      
      The changes to achieve this are:
      
        * Rename ArtifactCache.has_quota_exceeded() to ArtifactCache.full().
      
        * ArtifactCache.full() now also reports True if the available
          space on the artifact cache volume is smaller than the headroom.
      
          This ensures jobs get triggered to cleanup the cache when
          reaching the end of the disk.
      
        * When loading the artifact quota, it is now only an error if
          the quota exceeds the overall disk space, not if it does not
          fit in the available space.
      
          It is still a warning if the quota does not fit in the
          available space on the artifact cache volume.
      
        * Updated scheduler.py and buildqueue.py for the API rename
      
        * tests: Updated the artifactcache/expiry.py test for its
          expectations in this regard.
      
          Added a new test to test an error when quota was specified to
          exceed total disk space, and adjusted the existing tests to
          expect a warning when the quota does not fit in the available
          space.
      
      This fixes issue #733 and #869.
      22b3a0c1
  9. 24 Jan, 2019 3 commits
  10. 23 Jan, 2019 1 commit
    • Tristan Van Berkom's avatar
      _artifactcache.py: Raise ArtifactError() when quota size exceeds disk space. · 9be31641
      Tristan Van Berkom authored
      This is not an error related to loading data, like a parse error
      in the quota specification is, but a problem raised by the artifact
      cache - this allows us to assert more specific machine readable
      errors in test cases (instead of checking the string in stderr, which
      this patch also fixes).
      
      This also removes a typo from the error message in the said error.
      
        * tests/artifactcache/cache_size.py
      
          Updated test case to expect the artifact error, which consequently
          changes the test case to properly assert a machine readable error
          instead of asserting text in the stderr (which is the real, secret
          motivation behind this patch).
      
        * tests/artifactcache/expiry.py: Reworked test_invalid_cache_quota()
      
          Now expect the artifact error for the tests which check configurations
          which create caches too large to fit on the disk.
      9be31641
  11. 22 Jan, 2019 1 commit
    • James Ennis's avatar
      Mark 'old' checkout command as obsolete · fbd15939
      James Ennis authored
      This commit marks 'bst checkout' as a 'hidden' command. If used,
      the user will be prompted to use the new 'bst artifact checkout'
      command.
      
      All tests which used 'bst checkout' have been modified to use
      the new artifact sub-command.
      
      This partially solves #822.
      fbd15939
  12. 18 Jan, 2019 1 commit
  13. 16 Jan, 2019 1 commit
  14. 13 Dec, 2018 1 commit
    • Benjamin Schubert's avatar
      Mock storage space checks for tests. · d03bf316
      Benjamin Schubert authored
      Fix #530
      
      - Extract free space computation in a function for easier
      mocking
      - Mock space computation during cache quota tests
      - Mock cache size during cachque quota tests
      - Add two more tests when the configuration would require
      to much storage space
      d03bf316
  15. 14 Sep, 2018 3 commits
  16. 10 Sep, 2018 1 commit
  17. 23 Aug, 2018 1 commit
  18. 16 Aug, 2018 1 commit
  19. 02 Aug, 2018 2 commits
  20. 18 Jul, 2018 1 commit