[Buildroot] [PATCH v2] libseccomp: Add new config option to build and install tests

Markos Chandras Markos.Chandras at imgtec.com
Mon Sep 21 08:39:20 UTC 2015


Hi Thomas,

On 09/20/2015 01:46 PM, Thomas Petazzoni wrote:
> Markos,
> 
> On Fri, 18 Sep 2015 09:19:31 +0100, Markos Chandras wrote:
> 
>> +ifeq ($(BR2_PACKAGE_LIBSECCOMP_TESTS),y)
>> +
>> +LIBSECCOMP_MAKE_OPTS += check-build
>> +
>> +define LIBSECCOMP_TESTS_INSTALL
>> +	mkdir -p $(TARGET_DIR)/usr/libseccomp/{tests,tools} && \
>> +	for x in tests tools; do \
>> +		find $(@D)/$$x -maxdepth 1 \( -name "*.tests" -o -perm -a=x \) \
>> +			-type f -exec cp {} $(TARGET_DIR)/usr/libseccomp/$$x/ \; ; \
> 
> This has the effect of installing one .py file for each test even if
> Python is not installed on the target. They are pretty small, so maybe
> we don't care, but it doesn't look really nice.

Hmm makes sense. I will rework it then.

> 
> Also, this whole thing seems pretty crappy in libseccomp. Why don't
> they have simply a --enable-tests option, which will simply do the
> right thing?

It's probably because this is yet another testsuite and like any other
package testsuite you don't really need it installed. it's supposed to
run as part of package verification during build and installation. but
for cross-builds, it's useful to have it on the target.

-- 
markos



More information about the buildroot mailing list