diff --git a/.gitignore b/.gitignore index 5981dfe..9507a69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,18 @@ -SOURCES/libseccomp-2.5.2.tar.gz +*~ +/libseccomp-1.0.0.tar.gz +/libseccomp-1.0.1.tar.gz +/libseccomp-2.0.0.tar.gz +/libseccomp-2.1.0.tar.gz +/libseccomp-2.1.1.tar.gz +/libseccomp-2.2.0.tar.gz +/libseccomp-2.2.1.tar.gz +/libseccomp-2.2.3.tar.gz +/libseccomp-2.3.0.tar.gz +/libseccomp-2.3.1.tar.gz +/libseccomp-2.3.2.tar.gz +/libseccomp-2.3.3.tar.gz +/libseccomp-2.4.1.tar.gz +/libseccomp-2.4.2.tar.gz +/libseccomp-2.4.3.tar.gz +/libseccomp-2.5.1.tar.gz /libseccomp-2.5.2.tar.gz diff --git a/tests/devel-usability/runtest.sh b/tests/devel-usability/runtest.sh new file mode 100755 index 0000000..831b2a1 --- /dev/null +++ b/tests/devel-usability/runtest.sh @@ -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 diff --git a/tests/devel-usability/test.c b/tests/devel-usability/test.c new file mode 100644 index 0000000..964eba7 --- /dev/null +++ b/tests/devel-usability/test.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) +{ + const struct scmp_version *version = seccomp_version(); + printf("Version: %d.%d.%d\n", version->major, version->minor, version->micro); + return 0; +} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..b5072de --- /dev/null +++ b/tests/tests.yml @@ -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