openscap icon indicating copy to clipboard operation
openscap copied to clipboard

Build / test under Fedora

Open maage opened this issue 3 years ago • 1 comments

Because my other PR got dinged by some other build issues, here is my take to slightly improve spec file and testing. See: https://github.com/OpenSCAP/openscap/pull/1881

I tried to change some tests to skip in my mock build environment as it runs w/o network, systemd and is chrooted env. See: https://github.com/OpenSCAP/openscap/pull/1886

Then I tried to make tests actually run parallel, but it was no go. Too many of them use shared file names like test_file. And because they are not parametrized it was too much work. So I modified spec not to use parallel ctest runs.

I simplified bugs fixed under Fedora. As I was unable to test these under CentOS I used if block.

I converted BuildRequires to use pkgconfig and tried to minimize list.

As oscap is really complex C/C++ program I decided to compile it with ASAN/UBSAN and found couple of simple issues. See: https://github.com/OpenSCAP/openscap/pull/1885

Because there is some stylish choices I made and was not able to see out full tests okayed, with-perl, yaml-filter and so on, this is still draft.

maage avatar Sep 04 '22 20:09 maage

It seems there is at least some kind of issue of tests and build system change to ninja.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Run upstream test suite against installed openscap
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 08:13:06 ] :: [  BEGIN   ] :: Running 'export OSCAP_FULL_VALIDATION=1'
:: [ 08:13:06 ] :: [   PASS   ] :: Command 'export OSCAP_FULL_VALIDATION=1' (Expected 0, got 0)
:: [ 08:13:07 ] :: [  BEGIN   ] :: Running 'export CUSTOM_OSCAP=/usr/bin/oscap'
:: [ 08:13:07 ] :: [   PASS   ] :: Command 'export CUSTOM_OSCAP=/usr/bin/oscap' (Expected 0, got 0)
:: [ 08:13:07 ] :: [  BEGIN   ] :: Running 'cmake --build /root/rpmbuild/BUILD/openscap-1.3.7/redhat-linux-build --target test -- ARGS='--output-on-failure''
ninja: error: unknown target 'ARGS=--output-on-failure'
:: [ 08:13:07 ] :: [   FAIL   ] :: Command 'cmake --build /root/rpmbuild/BUILD/openscap-1.3.7/redhat-linux-build --target test -- ARGS='--output-on-failure'' (Expected 0, got 1)
:: [ 08:13:07 ] :: [   LOG    ] :: Bundling logs
:: [ 08:13:07 ] :: [   INFO   ] :: rlBundleLogs: Adding '/root/rpmbuild/BUILD/openscap-1.3.7/redhat-linux-build/tests' as '_root_rpmbuild_BUILD_openscap-1.3.7_redhat-linux-build_tests'
tar: Removing leading `/' from member names
:: [ 08:13:07 ] :: [   INFO   ] :: Sending /tmp/test_outputs_all.tar.gz as tmp-test_outputs_all.tar.gz
File '/tmp/tmp.nHbvxKIKHc/tmp-test_outputs_all.tar.gz' stored to '/var/ARTIFACTS/work-packiteEd2ZH/packit/execute/data/Sanity/smoke-test/data'.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 1s
::   Assertions: 2 good, 1 bad
::   RESULT: FAIL (Run upstream test suite against installed openscap)

maage avatar Sep 19 '22 16:09 maage

Closing due to the lack of activity.

evgenyz avatar Feb 09 '24 14:02 evgenyz