From 999a899702ddfc1b58ab452bb7b4faec3275ae9c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 Oct 2015 14:35:33 +1300 Subject: [PATCH 1/5] autobuild: Give a clearer failure message This helps when autobuild.py is used in --tail mode and where there is neither e-mail nor access to the logs.tar.gz Working back to find where the error happened is typically quite difficult, as many failures are actually due to the cleanup. Signed-off-by: Andrew Bartlett --- script/autobuild.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/script/autobuild.py b/script/autobuild.py index c91ff2c..915cfc2 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -707,7 +707,25 @@ def email_success(elapsed_time, log_base=None): if options.email is not None: email_failure(status, failed_task, failed_stage, failed_tag, errstr, elapsed_time, log_base=options.log_base) +else: + elapsed_minutes = elapsed_time / 60.0 + print ''' + +#################################################################### + +AUTOBUILD FAILURE + +Your autobuild on %s failed after %.1f minutes +when trying to test %s with the following error: + + %s + +the autobuild has been abandoned. Please fix the error and resubmit. + +#################################################################### +''' % (platform.node(), elapsed_minutes, failed_task, errstr) + cleanup() print(errstr) print("Logs in logs.tar.gz") From dad28ce01c718812d362400121e26f7f81024b20 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 Oct 2015 14:10:57 +1300 Subject: [PATCH 2/5] dynconfig: Use replace.h and memory.h directly, not via includes.h includes.h brings in talloc.h, but this was recently removed as a dependency. Signed-off-by: Andrew Bartlett --- dynconfig/dynconfig.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dynconfig/dynconfig.c b/dynconfig/dynconfig.c index cf35bdb..9614152 100644 --- a/dynconfig/dynconfig.c +++ b/dynconfig/dynconfig.c @@ -18,8 +18,6 @@ along with this program. If not, see . */ -#include "includes.h" - /** * @file dynconfig.c * @@ -40,10 +38,9 @@ * table? There's kind of a chicken-and-egg situation there... **/ +#include "replace.h" #include "dynconfig.h" -#ifdef strdup -#undef strdup -#endif +#include "lib/util/memory.h" #define DEFINE_DYN_CONFIG_PARAM(name) \ const char *dyn_##name = name; \ From c2eb85ad9e7f008df5f7bc0aec5c4507c9bf750f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 22 Oct 2015 10:35:47 +1300 Subject: [PATCH 3/5] Put the static build in another stanza This will allow it to run on a different VM in travis-ci and so keep us below the 50min limit. Because we do not rebuild the libs (and real world static builds are likely to have internal libs), this changes us to build them internally. Signed-off-by: Andrew Bartlett --- script/autobuild.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/script/autobuild.py b/script/autobuild.py index 915cfc2..7d7bd67 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -26,6 +26,7 @@ "samba-xc" : ".", "samba-ctdb" : ".", "samba-libs" : ".", + "samba-static" : ".", "ldb" : "lib/ldb", "tdb" : "lib/tdb", "talloc" : "lib/talloc", @@ -37,7 +38,7 @@ "retry" : "." } -defaulttasks = [ "ctdb", "samba", "samba-xc", "samba-ctdb", "samba-libs", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ] +defaulttasks = [ "ctdb", "samba", "samba-xc", "samba-ctdb", "samba-libs", "samba-static", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ] samba_configure_params = " --picky-developer ${PREFIX} --with-profiling-data" @@ -120,21 +121,22 @@ # retry with all modules shared ("allshared-distclean", "make distclean", "text/plain"), ("allshared-configure", samba_libs_configure_samba + " --with-shared-modules=ALL", "text/plain"), - ("allshared-make", "make", "text/plain"), + ("allshared-make", "make", "text/plain")], - # retry with all modules static - ("allstatic-distclean", "make distclean", "text/plain"), - ("allstatic-configure", samba_libs_configure_samba + " --with-static-modules=ALL", "text/plain"), + "samba-static" : [ + ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"), + # build with all modules static + ("allstatic-configure", "./configure.developer " + samba_configure_params + " --with-static-modules=ALL", "text/plain"), ("allstatic-make", "make", "text/plain"), # retry without any required modules ("none-distclean", "make distclean", "text/plain"), - ("none-configure", samba_libs_configure_samba + " --with-static-modules=!FORCED,!DEFAULT --with-shared-modules=!FORCED,!DEFAULT", "text/plain"), + ("none-configure", "./configure.developer " + samba_configure_params + " --with-static-modules=!FORCED,!DEFAULT --with-shared-modules=!FORCED,!DEFAULT", "text/plain"), ("none-make", "make", "text/plain"), # retry with nonshared smbd and smbtorture ("nonshared-distclean", "make distclean", "text/plain"), - ("nonshared-configure", samba_libs_configure_base + " --bundled-libraries=talloc,tdb,pytdb,ldb,pyldb,tevent,pytevent --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd", "text/plain"), + ("nonshared-configure", "./configure.developer " + samba_configure_params + " --bundled-libraries=talloc,tdb,pytdb,ldb,pyldb,tevent,pytevent --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd", "text/plain"), ("nonshared-make", "make", "text/plain")], "ldb" : [ From deff736678b6d3eb46f6a778ecfe4abf5a001116 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 May 2015 13:44:45 +1200 Subject: [PATCH 4/5] Add metadata file for the Travis CI Open Source cloud build/test service Signed-off-by: Andrew Bartlett --- .travis.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5798a28 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +language: c +dist: trusty + +sudo: true + +cache: ccache + +# Everything except samba (long tests) +env: + - TASK=ctdb + - TASK=samba-xc + - TASK=samba-ctdb + - TASK=samba-libs + - TASK=samba-static + - TASK=ldb + - TASK=tdb + - TASK=talloc + - TASK=replace + - TASK=tevent + - TASK=pidl + +before_install: + - sudo apt-get update -qq + - sudo apt-get install --assume-yes screen git build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev libpam0g-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl bison debhelper docbook-xml docbook-xsl flex libaio-dev libbsd-dev libcap-dev libcups2-dev libncurses5-dev libpam0g-dev libpopt-dev libreadline-dev perl perl-modules libparse-yapp-perl pkg-config python-all-dev python-dnspython xsltproc zlib1g-dev autoconf + +script: + - git fetch --unshallow + - ./script/autobuild.py --tail --testbase=/tmp $TASK + From 0d56b8536ec7501b783271256d9508b5f076a3a9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 22 Oct 2015 14:57:10 +1300 Subject: [PATCH 5/5] autobuild: Use make -j on samba-libs build as well We need this build to be fast when split out as a seperate VM Signed-off-by: Andrew Bartlett --- script/autobuild.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/autobuild.py b/script/autobuild.py index 7d7bd67..ff6224e 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -121,23 +121,23 @@ # retry with all modules shared ("allshared-distclean", "make distclean", "text/plain"), ("allshared-configure", samba_libs_configure_samba + " --with-shared-modules=ALL", "text/plain"), - ("allshared-make", "make", "text/plain")], + ("allshared-make", "make -j", "text/plain")], "samba-static" : [ ("random-sleep", "script/random-sleep.sh 60 600", "text/plain"), # build with all modules static ("allstatic-configure", "./configure.developer " + samba_configure_params + " --with-static-modules=ALL", "text/plain"), - ("allstatic-make", "make", "text/plain"), + ("allstatic-make", "make -j", "text/plain"), # retry without any required modules ("none-distclean", "make distclean", "text/plain"), ("none-configure", "./configure.developer " + samba_configure_params + " --with-static-modules=!FORCED,!DEFAULT --with-shared-modules=!FORCED,!DEFAULT", "text/plain"), - ("none-make", "make", "text/plain"), + ("none-make", "make -j", "text/plain"), # retry with nonshared smbd and smbtorture ("nonshared-distclean", "make distclean", "text/plain"), ("nonshared-configure", "./configure.developer " + samba_configure_params + " --bundled-libraries=talloc,tdb,pytdb,ldb,pyldb,tevent,pytevent --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd", "text/plain"), - ("nonshared-make", "make", "text/plain")], + ("nonshared-make", "make -j", "text/plain")], "ldb" : [ ("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),