From: Uri Simchoni Date: Mon, 4 May 2015 07:21:53 +0000 (+0300) Subject: autobuild: Add test for cross-compilation infrastructure X-Git-Tag: tevent-0.9.25~438 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88d1b44d150c5eaeea32c08f98c2b26f44dbeede;p=thirdparty%2Fsamba.git autobuild: Add test for cross-compilation infrastructure With added option to generate cross-answers by cross-execute script, a test is added to verify that at least for tested build environments, the infrastructure is self-consistent. The test runs samba configuration in three modes: 1. Native 2. Cross compile with cross-execute, using the build machine as its own target 3. Cross compile with cross-answers, using the answers generated in step 2 The build environments created by the three processes are then tested to be equal. Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett Reviewed-by: Alexander Bokovoy Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Wed May 20 14:10:05 CEST 2015 on sn-devel-104 --- diff --git a/script/autobuild.py b/script/autobuild.py index b2303f7b736..c697aad9bfc 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -23,6 +23,7 @@ cleanup_list = [] builddirs = { "ctdb" : "ctdb", "samba" : ".", + "samba-xc" : ".", "samba-ctdb" : ".", "samba-libs" : ".", "ldb" : "lib/ldb", @@ -36,7 +37,9 @@ builddirs = { "retry" : "." } -defaulttasks = [ "ctdb", "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ] +defaulttasks = [ "ctdb", "samba", "samba-xc", "samba-ctdb", "samba-libs", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ] + +samba_configure_params = " --picky-developer ${PREFIX} --with-profiling-data" tasks = { "ctdb" : [ ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"), @@ -48,13 +51,22 @@ tasks = { ("clean", "make clean", "text/plain") ], # We have 'test' before 'install' because, 'test' should work without 'install' - "samba" : [ ("configure", "./configure.developer --picky-developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-profiling-data", "text/plain"), + "samba" : [ ("configure", "./configure.developer --with-selftest-prefix=./bin/ab" + samba_configure_params, "text/plain"), ("make", "make -j", "text/plain"), ("test", "make test FAIL_IMMEDIATELY=1", "text/plain"), ("install", "make install", "text/plain"), ("check-clean-tree", "script/clean-source-tree.sh", "text/plain"), ("clean", "make clean", "text/plain") ], + # Test cross-compile infrastructure + "samba-xc" : [ ("configure-native", "./configure.developer --with-selftest-prefix=./bin/ab" + samba_configure_params, "text/plain"), + ("configure-cross-execute", "./configure.developer -b ./bin-xe --cross-compile --cross-execute=script/identity_cc.sh" \ + " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xe/ab" + samba_configure_params, "text/plain"), + ("configure-cross-answers", "./configure.developer -b ./bin-xa --cross-compile" \ + " --cross-answers=./bin-xe/cross-answers.txt --with-selftest-prefix=./bin-xa/ab" + samba_configure_params, "text/plain"), + ("compare-results", "script/compare_cc_results.py ./bin/c4che/default.cache.py ./bin-xe/c4che/default.cache.py ./bin-xa/c4che/default.cache.py", "text/plain")], + + "samba-ctdb" : [ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"), # make sure we have tdb around: @@ -519,7 +531,7 @@ A summary of the autobuild process is here: %s/autobuild.log ''' % (platform.node(), failed_task, errstr, log_base) - + if failed_task != 'rebase': text += ''' You can see logs of the failed task here: