How do I build tests with my NEW BSP?

Because I have a new BSP, I cannot use rsb to build it (it fetches new source and my BSP isn’t in that source). I can build it with waf however so in my clone of the repo I do

./waf configure --prefix=<my rtems prefix>
... configures ...
./waf build
... builds and installs it into my "installed" RTEMS ...

So that’s great, but it doesn’t build the samples. One place I read said to
add RTEMS_SAMPLES = True to my config.ini file (waf says “unknown option”). The rsb has a switch --with-rtems-tests=samples but waf doesn’t know about that switch. I tried to pull the code out of the ../testsuites/samples folder in the repo but it doesn’t have a waf script so I made one up, and then I added -I<my repo>/testsuites/support/include/ to the C flags but it also couldn’t find a bunch of test utilites that it wanted to link to.

Is there a preferred way to do this? Or am I going to re-create an independent tree with the samples and testsuite code in it so that I can build it with waf ?

What does:

find build -name \*.exe

print?

That seems to find them, hmmm.

And the samples hello.exe is failing in exactly the same way as my version of hello world does so that tells me it’s something about the BSP that is screwing up.

On to eliminate more variables.

Great they are being built.

It is good to get the test executable down to hello.exe. The test code has a call to printf to output the message to the console but the tests use a linker trick to map the stdio call to the low RTEMS printk call that goes directly to the BSP’s low level console output calls to help make it simpler.

And to close this one one, when I configured the BSP I needed to add
BUILD_SAMPLES = True
In the config.ini file and that causes it to build the tests. I found that option by looking at ./waf bspoptions and searching through the result for BSP I was building and looking at the options available for that BSP.