Skip to content

CI: Avoid changing uid, except when running installed-tests

Simon McVittie requested to merge smcv/dbus:gitlab-ci into master
  • CI: Don't change ownership of source directory

    These CI scripts were originally used on Travis-CI, which starts all builds as an ordinary user that has the ability to become root via sudo. On Gitlab-CI, we don't need that: we start as uid 0, and can do the whole CI run like that. This also means we get somewhat better test coverage, because some of our unit tests benefit from being run as uid 0.

    The only test coverage we lose by being uid 0 is that test_pending_fd_timeout() in test/dbus-daemon.c is skipped, because uid 0 bypasses the limit that's under test there.

  • CI: Re-clone the git repository every time

    This cleans up checkouts that were subjected to chown -R prior to this.

    Resolves: #447 (closed)

  • CI: Remove vestigial support for re-running tests in a Docker container

    Travis CI needed this, but Gitlab-CI always runs our tests in a Docker container of our choice, so there's never any need to enter another (and it's not allowed anyway).

  • CI: Re-run some tests as root or as non-root, as appropriate

    On Gitlab-CI we're always running the overall script as root (and therefore we'll only enter the code path to re-run as non-root), but when using these scripts for manual testing they might be run as non-root to begin with.


We can revert the second commit after a few days or weeks, when old checkout directories on all shared runners have been cleaned up.

/cc @rhabacker

Merge request reports