Add gating.yaml and tests
Resolves: rhbz#1938758 (check-gitbz workaround, this bz is unrelated)
This commit is contained in:
parent
51cab57c74
commit
950019dfcd
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
22
tests/devel-usability/runtest.sh
Executable file
22
tests/devel-usability/runtest.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
TEST_SOURCE=test.c
|
||||
TEST_TARGET="${TEST_SOURCE/\.c/}"
|
||||
|
||||
CXXFLAGS="$(rpm --eval '%{build_cxxflags}')"
|
||||
LDFLAGS="$(rpm --eval '%{build_ldflags}')"
|
||||
PKGFLAGS="$(pkg-config libseccomp --cflags --libs)"
|
||||
|
||||
# build target using distribution-specific flags
|
||||
gcc -Werror $CXXFLAGS $LDFLAGS $PKGFLAGS -o $TEST_TARGET $TEST_SOURCE
|
||||
|
||||
# test that target exists
|
||||
test -f ./$TEST_TARGET
|
||||
|
||||
# test that target is executable
|
||||
test -x ./$TEST_TARGET
|
||||
|
||||
# test that target runs successfully
|
||||
./$TEST_TARGET
|
9
tests/devel-usability/test.c
Normal file
9
tests/devel-usability/test.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#include <seccomp.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const struct scmp_version *version = seccomp_version();
|
||||
printf("Version: %d.%d.%d\n", version->major, version->minor, version->micro);
|
||||
return 0;
|
||||
}
|
14
tests/tests.yml
Normal file
14
tests/tests.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tests:
|
||||
- devel-usability
|
||||
required_packages:
|
||||
- gcc
|
||||
- rpm
|
||||
- redhat-rpm-config
|
||||
- pkgconf-pkg-config
|
||||
- libseccomp-devel
|
Loading…
Reference in New Issue
Block a user