[PATCH 0/3] Waf: Semi-automatic generation of results for cross-answers files

Jeremy Allison jra at samba.org
Thu Apr 30 16:50:51 MDT 2015


On Thu, Apr 30, 2015 at 11:21:47PM +0300, Uri Simchoni wrote:
> One of the methods for cross-compiling samba is to provide a cross-answers file,
> which contains the results of configure tests which have to run on the target.
> However, there's no automation in getting the correct answer for the target.
> 
> This patchset adds an option to save the compiled test binaries in a directory,
> along with a modified cross-answers file, detailing the binary to run for each
> test with unknown result. A script is also supplied to run on the target, run
> the test binaries, and patch cross-answers file with the test result.
> 
> Typical workflow:
> 1. ./configure --cross-compile --cross-answers=<ca_file> --cross-test-dir=<some empty dir>
>    -  ca_file is name of the partially-filled or non-existant cross-answers file.
>    -  --cross-test-dir is the new switch
>    -  configure updates the cross-answers file as always and also copies all binaries
>       of tests with unknown result into the cross-test-dir. It also places there a
>       version of the cross-answers file which includes the name of binary to run for
>       each test.
> 2. Copy the supplied run-cross-tests.sh shell script into the cross-test-dir
> 3. Copy all files into the target (or have target mount the cross-test-dir
> 4. On target, cd into the dir where all files reside and run:
>    ./run-cross-tests.sh < <ca_file> > <new_ca_file>
>    - This step scans the cross-answers file, and for each test with unknown result,
>      runs the test binary and forms a proper result out of the exit status and
>      standard output.
> 
> Caveats:
> This is not bullet-proof - two tests relating to shared libraries also required
> copying a built shared library to the target, and hence fail. However, it is still
> an improvement over the current state of having to guess the result of 30-odd tests
> or manually run them.
> 
> Patch summary:
> Patch #1 is just a refactoring to make things easier.
> Patch #2 adds the --cross-test-dir option
> Patch #3 is the run-cross-tests.sh script

Oh this looks *great* - thanks. Improved cross compiling support
has been on my wish list for a long time !

Cheers,

	Jeremy.


More information about the samba-technical mailing list