Skip to content

Commit

Permalink
ci: use Testing Farm for running the testsuite
Browse files Browse the repository at this point in the history
Due to issues with the MacOS + Vagrant setup, selinux-testsuite has
migrated its CI to Testing Farm [1][2], so let's use it for running the
testsuite here, too.

We can import the test definitions from the testsuite repo and just add
a setup "test" at the beginning that builds and installs the userspace
from git.

[1] https://testing-farm.io/
[2] SELinuxProject/selinux-testsuite@d75675e

Signed-off-by: Ondrej Mosnacek <[email protected]>
Acked-by: James Carter <[email protected]>
  • Loading branch information
WOnder93 authored and bachradsusi committed Jan 16, 2025
1 parent 9833f0d commit ee667ed
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 314 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
17 changes: 17 additions & 0 deletions .github/workflows/tf_testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Run SELinux testsuite in Testing Farm

on: [push, pull_request]

jobs:
tf_testsuite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]
steps:
- name: Schedule test on Testing Farm
uses: sclorg/testing-farm-as-github-action@main
with:
api_key: ${{ secrets.TESTING_FARM_API_TOKEN }}
arch: ${{ matrix.arch }}
22 changes: 0 additions & 22 deletions .github/workflows/vm_testsuite.yml

This file was deleted.

1 change: 0 additions & 1 deletion scripts/ci/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/ci/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/ci/README.md

This file was deleted.

48 changes: 0 additions & 48 deletions scripts/ci/Vagrantfile

This file was deleted.

100 changes: 0 additions & 100 deletions scripts/ci/fedora-test-runner.sh

This file was deleted.

130 changes: 0 additions & 130 deletions scripts/ci/travis-kvm-setup.sh

This file was deleted.

48 changes: 48 additions & 0 deletions tmt/plans.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/ci:
summary: Run the testsuite with userspace from git
# Environment for the testsuite setup
environment:
STS_ROOT_DOMAIN: unconfined_t
STS_KERNEL: latest
discover:
- how: shell
tests:
- name: /prepare-selinux-userspace
summary: Build and install SELinux userspace from git
order: 0
duration: 10m
require:
- audit-libs-devel
- bison
- bzip2-devel
- CUnit-devel
- diffutils
- flex
- gcc
- gettext
- glib2-devel
- make
- libcap-devel
- libcap-ng-devel
- pam-devel
- pcre2-devel
- python3-devel
- python3-pip
- python3-setuptools
- python3-wheel
- swig
- xmlto
test: |
set -ex

# Build and replace userspace components
make clean distclean
make -j"$(nproc)" LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install
make -j"$(nproc)" LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install-pywrap
make -j"$(nproc)" LIBDIR=/usr/lib64 SHLIBDIR=/lib64 relabel
- how: fmf
url: https://github.com/SELinuxProject/selinux-testsuite
ref: main
filter: tag:-ci & tag:-nfs
execute:
how: tmt

0 comments on commit ee667ed

Please sign in to comment.