1. 29 Mar, 2019 1 commit
    • Tom Pollard's avatar
      plugintestutils/runcli.py: Add TestArtifact() 'abstraction' class · d93763da
      Tom Pollard authored
      This adds the initial Artifact 'abstractions', taking existing
      test methods into a dedicated Artifact class. The class is
      accessed via an instance attribute of the generic Cli() fixture.
      This is in preperation for AaaP, to ensure existing tests pass
      whilst creating an entry point for further abstractions when
      necessary.
      d93763da
  2. 27 Mar, 2019 2 commits
  3. 25 Mar, 2019 2 commits
  4. 21 Mar, 2019 2 commits
    • Angelos Evripiotis's avatar
      _artifactcache: don't define CACHE_SIZE_FILE twice · 7d458be1
      Angelos Evripiotis authored
      No need to define CACHE_SIZE_FILE in _artifactcache, it is not used here
      by the main application, and it is already defined and used in
      _cas.cascache.
      
      Fixup the reference in tests to refer to _cas.cascache instead.
      7d458be1
    • 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
  5. 14 Mar, 2019 3 commits
  6. 01 Mar, 2019 5 commits
  7. 28 Feb, 2019 1 commit
  8. 19 Feb, 2019 3 commits
  9. 13 Feb, 2019 1 commit
  10. 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
  11. 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
  12. 24 Jan, 2019 3 commits
  13. 23 Jan, 2019 2 commits
    • 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
    • Tristan Van Berkom's avatar
      tests: Migrated cache quota test into artifactcache/cache_size.py · 0098a900
      Tristan Van Berkom authored
      Instead of sitting mysteriously alone in internals/utils.py
      0098a900
  14. 22 Jan, 2019 2 commits
    • 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
    • James Ennis's avatar
      Move push and pull to the new artifact subcommand group · a3fc350f
      James Ennis authored
      This commit also ensures that if we try to use the 'old' commands,
      BuildStream will fail and instruct the user to use the new command.
      a3fc350f
  15. 18 Jan, 2019 1 commit
  16. 16 Jan, 2019 1 commit
  17. 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
  18. 27 Nov, 2018 1 commit
  19. 19 Nov, 2018 1 commit
  20. 05 Nov, 2018 2 commits
  21. 16 Oct, 2018 1 commit
  22. 27 Sep, 2018 2 commits
  23. 21 Sep, 2018 1 commit