Changeset d14da0a in rtems-source-builder


Ignore:
Timestamp:
Apr 28, 2020, 1:05:20 AM (6 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, master
Children:
47880bb
Parents:
d5ad667
git-author:
Chris Johns <chrisj@…> (04/28/20 01:05:20)
git-committer:
Chris Johns <chrisj@…> (04/28/20 01:07:35)
Message:

rtems-kernel: Install tests when tests are built

The tests in RTEMS are not installed so if a user requests the
tests be built install them. Given the RSB cleans up building the
tests and not installing does nothing.

  • Fix the options handling the kernel build to be consistent

Updates #3956

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtems/config/tools/rtems-kernel-common.cfg

    rd5ad667 rd14da0a  
    133133              https://git.rtems.org/rtems/snapshot/rtems-%{rtems_kernel_version}.tar.bz2
    134134
     135#
     136# Check the various --with/--without options we support. These are
     137# turned into the internal settings.
     138#
     139# --target                       : The architecture
     140# --with-rtems-bsp               : The BSP
     141# --without-rtems-bsp            : Not supported
     142# --with-rtems-tests             : Supported, samples/yes/no
     143# --without-rtems-tests          : Supported, forced to no
     144# --with-rtems-smp               : Supported
     145# --without-rtems-smp            : Don't care
     146# --with-rtems-legacy-network    : Supported
     147# --without-rtems-legacy-network : Don't care
     148# --with-rtems-bspopts           : Supported, quote for a list
     149# --without-rtems-bspopts        : Don't care
     150#
     151%if %{defined without_rtemsbsp}
     152 %error Option --without-rtemsbsp is not supported.
     153%endif
     154%if %{defined without_rtems_tests}
     155 %define with_rtems_tests no
     156%endif
     157%if %{defined with_rtems_tests}
     158 %if %{with_rtems_tests} == 1
     159  %define with_rtems_tests yes
     160 %endif
     161 %if %{with_rtems_tests} == yes || \
     162     %{with_rtems_tests} == no || \
     163     %{with_rtems_tests} == samples
     164  %define rtems_tests %{with_rtems_tests}
     165 %endif
     166%else
     167 %error invalid with-rtems-tests value
     168%endif
     169%if %{defined with_rtems_smp}
     170 %define rtems_smp 1
     171%endif
     172%if %{defined with_rtems_legacy_network}
     173 %define rtems_networking 1
     174%endif
     175%if %{defined with_rtems_bspopts}
     176 %define rtems_bspopts %{with_rtems_bspopts}
     177%endif
     178
     179#
    135180# If C++ defined for the tool set use it to control RTEMS's setting..
    136181#
     
    140185
    141186#
    142 # Default set up.
     187# Default set up. Override these in a BSP if you want a
     188# specific setup.
    143189#
    144190%ifn %{defined rtems_posix}
     
    149195%endif
    150196%ifn %{defined rtems_cxx}
    151  %define rtems_cxx 0
     197 %define rtems_cxx 1
    152198%endif
    153199%ifn %{defined rtems_tests}
    154200 %define rtems_tests samples
    155201%endif
    156 %ifn %{defined bspopts}
    157  %define bspopts %{nil}
    158 %endif
    159 
    160 %if %{rtems_tests} == disable
    161  %define rtems_tests_opt --disable-tests
    162 %else
    163  %define rtems_tests_opt --enable-tests=%{rtems_tests}
    164 %endif
    165 
    166 #
    167 # Check the various --with/--without options we support.
    168 #
    169 # --target          : The architecture
    170 # --with-rtems-bsp  : The BSP
    171 # --with-tests      : Supported, samples/yes/no
    172 # --without-tests   : Not supported
    173 # --with-smp        : Supported
    174 # --without-smp     : Not care
    175 #
    176 #
    177 %if %{defined without_rtemsbsp}
    178  %error Option --without-rtemsbsp is not supported.
    179 %endif
    180 %if %{defined without_rtems_tests}
    181  %define with_rtems_tests no
     202%ifn %{defined rtems_bspopts}
     203 %define rtems_bspopts %{nil}
    182204%endif
    183205
     
    214236    --target=%{_target} \
    215237    --enable-rtemsbsp="%{rtems_bsp}" \
     238    %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
    216239    %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \
    217240    %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \
    218     %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \
    219     %{?with_rtems_tests:--enable-tests=%{with_rtems_tests}} \
    220     %{?with_rtems_smp:--enable-smp} \
     241    %{?rtems_tests:--enable-tests=%{rtems_tests}} \
     242    %{?rtems_smp:--enable-smp} \
    221243    --prefix=%{_prefix} --bindir=%{_bindir} \
    222244    --exec-prefix=%{_exec_prefix} \
    223245    --includedir=%{_includedir} --libdir=%{_libdir} \
    224246    --mandir=%{_mandir} --infodir=%{_infodir} \
    225     %{bspopts}
     247    %{rtems_bspopts}
    226248
    227249  %{__make} %{?_smp_mflags} all
     
    234256  %{__make} DESTDIR=$SB_BUILD_ROOT install
    235257
     258  %if %{rtems_tests} != no
     259   %define rtems_test_install %{_target}/%{rtems_bsp}/tests
     260   mkdir -p $SB_BUILD_ROOT/%{_prefix}/%{rtems_test_install}
     261   find . -name \*.exe -and -not -name \*.norun.exe \
     262      -exec cp -v \{\} $SB_BUILD_ROOT/%{_prefix}/%{rtems_test_install}/ \;
     263  %endif
     264
    236265  cd ..
Note: See TracChangeset for help on using the changeset viewer.