Skip to content
Snippets Groups Projects
  1. Jun 17, 2020
  2. Jun 16, 2020
  3. Jun 15, 2020
  4. Jun 12, 2020
    • Simon McVittie's avatar
      tests: Add an integration test for running in a container · 1a9769dd
      Simon McVittie authored
      
      This requires resources external to pressure-vessel, and makes some
      assumptions about the container - but that's OK, because the first
      significant user of pressure-vessel is Steam Runtime 1 'scout', which
      is not exactly a moving target. We also do some of these checks in
      various OSs' virtual machines when we build Steam Runtime releases, but
      having this in-tree with the pressure-vessel source should shorten the
      testing cycle.
      
      See the doc-comment in tests/containers.py for usage.
      
      At the moment all tests require a working version of bubblewrap, but
      current/future work in the direction of pre-preparing a modified
      runtime on disk should mean that we can do a subset of these tests
      even if we cannot run bubblewrap. In particular, if we can do that
      inside a Docker container, that will make it a lot easier for CI to
      validate our assumptions on non-Debian-derived host operating systems.
      
      Attentive reviewers will notice that there's infrastructure here to
      be able to skip generating locales, but it isn't yet used. It will
      be used when we have more variations on the theme of "enter a scout
      container and run inside-scout.py", to avoid the time cost of
      generating locales every time - but at the moment we only have two
      runs, so the time taken to generate locales is not problematic.
      
      This test is a bit slow, and it's going to get slower as we add more
      thorough testing, so increase its timeout away from the Meson default.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      1a9769dd
    • Simon McVittie's avatar
      testutils: Move most test setup to be once per class · d5eed758
      Simon McVittie authored
      
      The result of this setup will be the same every time, so there isn't
      much point in repeating it. When we add tests with time-consuming setup
      like running steam-runtime-system-info, we'll only want to do that once.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      d5eed758
    • Simon McVittie's avatar
      testutils: Make sure the artifacts path is absolute · 0db2c839
      Simon McVittie authored
      
      If we're passing it across a container boundary, relative paths are
      going to get error-prone.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      0db2c839
    • Simon McVittie's avatar
      testutils: Exit 1 on failure · 360eeecd
      Simon McVittie authored
      
      At the moment the Python-based tests rely on being run under prove(1)
      so that their TAP output is parsed, but I'm about to add a test that
      enters a container and runs another test script inside the container,
      and using TAP for that is less obvious. Don't rely on our stdout being
      parsed as TAP.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      360eeecd
    • Simon McVittie's avatar
      build-relocatable-install: Don't redirect srcdir into DESTDIR if not there · d111a2e7
      Simon McVittie authored
      
      This enables us to use --srcdir=$(pwd) when running from a git checkout.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      d111a2e7
    • Simon McVittie's avatar
      build: Set the default prefix · 97d6b499
      Simon McVittie authored
      
      It'll be easier to set up a test environment if we default to the
      prefix into which we normally package it.
      
      Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
      97d6b499
Loading