libbsd: Conditional compilation of tests
Chris Johns
chrisj at rtems.org
Tue Oct 5 07:48:12 UTC 2021
On 5/10/21 10:27 am, Kinsey Moore wrote:
> Currently debugger01 is the only user of the test-if-library in libbsd and it
> doesn't seem to work as expected. The configure step that detects libdebugger
> occurs and succeeds as it should for the zynq a9 qemu BSP, but debugger01.exe
> never gets compiled. I found this behavior while working on the implementation
> for libdebugger for AArch64. Is there some configuration that I'm missing to
> actually enable that test? Changing it to an unconditional test yields a
> successfully compiled debugger01.exe.
>
> Perhaps someone that has more familiarity with the waf configure scripts can
> tell me what I'm missing.
More than likely :)
This is the generator for 'test-if-library' ...
https://git.rtems.org/rtems-libbsd/tree/builder.py?h=6-freebsd-12#n1184
which is ...
https://git.rtems.org/rtems-libbsd/tree/builder.py?h=6-freebsd-12#n658
Now the easy bit of the hard part ....
https://git.rtems.org/rtems-libbsd/tree/waf_libbsd.py?h=6-freebsd-12#n166
which is adding 'True or' which leads to the hard part ... lots of data you need
to look over. Look for the debugger01 test.
The builder comes from ..
https://git.rtems.org/rtems-libbsd/tree/wscript?h=6-freebsd-12#n76
The output adding True creates is the `self.data` as the comment says and that
is the internal view of the libbsd build and sources that is parsed to
constructs the waf build. It is also used to manage the source merge to and from
FreeBSD.
The data is inserted into the build here so track the debugger insert ...
https://git.rtems.org/rtems-libbsd/tree/waf_libbsd.py?h=6-freebsd-12#n91
Finally the tests are generated here ...
https://git.rtems.org/rtems-libbsd/tree/waf_libbsd.py?h=6-freebsd-12#n627
Maybe something is wrong in this last part so the bld.program is not happening.
I hope this helps.
Chris
More information about the devel
mailing list