> I've finally had some time to read over the Tests section, and it is a
> bit overwhelming.
> I'm going to describe the use cases for my patch and perhaps you can
> give me some guidance on adding an actual test.
>
> There are three, maybe four use cases:
> 1) native rpm (e.g. x86_64)
> 2) noarch rpm (a noarch package should contain scripts, artwork, etc,
> but no compiled code)
> 3) a non-native, but compatible rpm (e.g. building x86 on a multilib
> x86_64 system)
> 4) incompatible cross-compiled package (e.g. building for arm or ppc)
>
> in each case the way you know it worked is
> a) "make package" successfully produces an rpm file
> b) running "rpm -qip my_rpm_file.my_arch.rpm returns a description of the rpm,
>  including the line "Architecture: my_arch"

Sorry for the late reply.

I've finally had some time to go through the patch:
1) If I understand you correctly BuildArch should never be set except
in noarch case. This would mean that CPACK_RPM_PACKAGE_ARCHITECTURE
value should set --target and if set to noarch should also (if
necessary) set BuildArch as before. Your patch currently silently
ignores all user settings of CPACK_RPM_PACKAGE_ARCHITECTURE except
noarch,
2) Since you are already writing a patch for
CPACK_RPM_PACKAGE_ARCHITECTURE you should also add
CPACK_RPM_<component>_PACKAGE_ARCHITECTURE so that you can set the
architecture per component.

Regarding the tests:
1) You should add the test setup for noarch and auto defined and auto
detected architecture in
Tests/CPackComponentsForAll/MyLibCPackConfig-IgnoreGroup.cmake.in -
just define architecture for headers component (implement 2. from
above for this) and leave the rest of components to auto detection
provided by your patch,
2) Write result verification in
Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake - just extend
the tests at the bottom of this file since pqy query is already used
there.

I am not certain regarding where to put cross-compiled package test...
If rpmbuild is not testing the binaries that will get packed you can
simply set a nonexisting XYZ architecture to only one component - like
with noarch.

Regards,
Domen
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to