summaryrefslogtreecommitdiff
path: root/script/autobuild.py
Commit message (Collapse)AuthorAgeFilesLines
* script/autobuild.py: rm redundant empty str in optionsJoe Guo2019-06-201-20/+20
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: define cwd for builder and avoid chdirJoe Guo2019-06-201-5/+3
| | | | | | | | We can pass cwd in Popen, no need to chdir for each cmd. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: improve run_cmd with check_outputJoe Guo2019-06-201-4/+4
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add helper functions to simplify make test cmdJoe Guo2019-06-201-120/+131
| | | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: replace random-sleep.sh with python functionJoe Guo2019-06-201-33/+39
| | | | | | | | | | | | | The random-sleep.sh script is tricky, and there is no need to rely on another script just for random sleep. Using the python function, the random number generation will happen when load autobuild.py other than execute cmd, but shouldn't affect the result. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: rm unused mime type text/plain in tasksJoe Guo2019-06-201-294/+288
| | | | | | | | The mime type `text/plain` is repeated everywhere but not used any more. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: fix tasks indentJoe Guo2019-06-201-430/+467
| | | | | | | | Indent tasks at same level, make it easier to copy/move lines arround. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Fix autobuild for python3Volker Lendecke2019-06-181-1/+1
| | | | | | | | | "keys()" in python3 returns an unmodifiable view object. Two lines down we might want to modify it, which python3 does not allow. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* script/autobuild.py: define LCOV_CMD and run it after each make testJoe Guo2019-05-101-2/+35
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add ENABLE_COVERAGE placeholder in configure cmd optionJoe Guo2019-05-101-10/+10
| | | | | | | The value will be "--enable-coverage" or "". Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: replace more placeholders in cmds for coverageJoe Guo2019-05-101-0/+4
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add --enable-coverage optionJoe Guo2019-05-101-0/+3
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: mv optionparse to topJoe Guo2019-05-101-53/+53
| | | | | | | so the rest of the code can use the option values directly. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: mv find_git_root and gitroot to topJoe Guo2019-05-101-14/+16
| | | | | | | so the reset of the code can use gitroot directly. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: rename sdir to test_source_dirJoe Guo2019-05-101-7/+7
| | | | | Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Build also Samba AD with MIT KerberosAndreas Schneider2019-04-251-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* waf: build: Respect --disable-python for third_party modulesLutz Justen2019-04-241-0/+2
| | | | | | | | | | | | | | | | Skips installation of samba/third_party stuff into the python directory if --disable-python is set. Added test after install that confirms no python modules installed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13905 Signed-off-by: Lutz Justen <ljusten@google.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Apr 24 07:32:31 UTC 2019 on sn-devel-184
* selftest: rename schemaupgrade_dc (+pair) to schema_dcGarming Sam2019-04-121-4/+4
| | | | | | | | | | | | | | | | This is needed because the name of the autobuild job and the name of the selftest env end up in the socket path for ncalrpc sockets. The challenge is that (for example) /memdisk/autobuild/fl/b2424063/samba-schemaupgrade/bin/ab/schemaupgrade_pair_dc/ncalrpc/np/protected_storage does not fit in a struct sockaddr_un. Signed-off-by: Garming Sam <garming@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Apr 12 05:41:36 UTC 2019 on sn-devel-144
* selftest: split schemaupgrade testenv outAaron Haslett2019-04-111-0/+14
| | | | | | | | | | Schemaupgrade tests are particularly resource intensive and are causing runners to hit their memory and CPU limits, so we need to split them out. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* autobuild: attempt authenticated email if environment suggests itDouglas Bagnall2019-04-051-0/+6
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: try to distribute the tasks a bit moreStefan Metzmacher2019-02-271-21/+21
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: spread ad-dc tests over 6 autobuild/ci separate tasks/jobsStefan Metzmacher2019-02-271-12/+62
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: add samba-ad-member taskStefan Metzmacher2019-02-271-3/+15
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: run ad_dc_backup tests in samba-ad-dc-backupStefan Metzmacher2019-02-271-3/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: move maptoguest and simpleserver to 'samba-fileserver'Stefan Metzmacher2019-02-271-1/+7
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* autobuild: move nt4_dc_schannel out of 'samba'Stefan Metzmacher2019-02-271-1/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_backup alias to ad_dcStefan Metzmacher2019-02-271-0/+2
| | | | | | | | This will allow us to run really most tests in an isolated autobuild/ci task later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_default alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-0/+2
| | | | | | | | | | | This will allow us to run really most tests in an isolated autobuild/ci task later. This will apply to tests, which may not rely on the ntvfs backend, so the ad_dc_default alias can point to another environment in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add ad_dc_slowtests alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-0/+2
| | | | | | | | This will allow us to run really slow tests in an isolated autobuild/ci task later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest:Samba4: add fl2008dc as alias to ad_dc_ntvfsStefan Metzmacher2019-02-271-2/+5
| | | | | | | | | Using aliases it will be possible to split the large amount of tests which use ad_dc_ntvfs into multiple autobuild/ci tasks/jobs later. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Add basic sanity-check tests for nopython targetTim Beale2019-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were only checking samba compiled OK with --disable-python, not that it actually ran. The main problem is all the make test framework is based around subunit/smbtorture, neither of which we seem to build with disable-python. However, for just a simple sanity-check, we can just bypass all the subunit-filter work and just call the Perl code directly. This works OK as long as it's just simple shell script tests that we're running, as we can check the script's exit code directly. The main thing that we really want to test is that we can start up the smbd testenv and connect to it (i.e. a simple smbclient test). This patch adds a new 'make test-nopython' target. This disables the subunit filtering, and runs a small test-list that was generated manually. Note that currently this has the limitation that it doesn't support known failures or flapping tests. However, just checking that smd starts up OK is probably OK for now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 20 02:10:00 CET 2019 on sn-devel-144
* autobuild: Drop 'py2' flagTim Beale2019-02-151-9/+2
| | | | | | | This isn't used any more. It was only being set, never referenced. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Replace samba-buildpy2-only with samba-nopython-py2Tim Beale2019-02-151-8/+32
| | | | | | | | | | | | | For Samba 4.11, the minimum python2 functionality we will support (for now, at least - we may change our minds) is for the --disable-python target, i.e. if you're excluding all the python functionality from samba, then WAF should still support being built with python2. The use case here is old unix platforms that want to use smbd, but don't have python3 support. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Remove ${EXTRA_PYTHON} variableTim Beale2019-02-151-17/+8
| | | | | | | | We no longer build the python2 bindings, only python3. So we can get rid of this variable now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Tidy up unnecessary line-breaks in 'TESTS='Tim Beale2019-02-151-21/+10
| | | | | | | | Now that we've dropped the {PY3_ONLY} variable, there's no need for line-breaks in some of the 'TESTS=' values. We can tidy this up a bit. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Remove the PY3_ONLY variableTim Beale2019-02-151-13/+10
| | | | | | | | This variable is no longer needed as all the tests run using python3 now. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Update variable name to make more senseTim Beale2019-02-151-4/+4
| | | | | | | | | When we switched from python2 being the default to python3, we didn't update this variable name. It's now handling the python2 case, but it's a boolean flag named 'py3', which is rather confusing. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Drop py2 autobuild jobsTim Beale2019-02-151-6/+0
| | | | | | | | | | | | | | | | Samba v4.11 will no longer support python2, so let's drop the autobuild jobs. This will save some gitlab/sn-devel time and money, as it's less work for CI to do. Note that this highlights some previous inconsistencies: - samba-none-env-py2 was being built for gitlab but not sn-devel. - samba-nt4-py2 was being built for sn-devel but not gitlab I've left samba-buildpy2-only for now, which will be addressed in a subsequent patch. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script/autobuild.py: add 'lsb_release -a' and 'mount' to system-info.txtStefan Metzmacher2019-02-141-0/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* CI: split out "samba-ad-dc-ntvfs[-py2]" test targetsRalph Boehme2019-02-111-6/+20
| | | | | | | | | | | | | | | | | | | Many AD tests currently use the "samba" target. Split out a new target "samba-ad-dc-ntvfs" and have all tests that use the "ad_dc_ntvfs" env use the new target. This should greatly speed up the runtime for the "samba" target and avoid swapping. This reduces the total CI time by ~ 55%, I got an autobuild and a gitlab pipeline finished in just ~ 100 mins! Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Feb 11 14:10:12 CET 2019 on sn-devel-144
* autobuild: Split backup/restore testenvs out into separate jobTim Beale2019-02-051-0/+12
| | | | | | | | | | | | | | | | The samba-ad-dc-2 job was reaching its limits with the number of testenvs and what the resource-limited CI machines can handle. Samba processes were getting swapped out of memory, causing CI runs to fail. This patch splits the backup/restore testenv targets into a separate autobuild job: samba-ad-dc-backup. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Feb 5 12:23:31 CET 2019 on sn-devel-144
* autobuild: convert top_commit_msg to str for Py 3Douglas Bagnall2018-12-121-0/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: py3: cope with bytes when compiling system-info.txtDouglas Bagnall2018-12-121-3/+8
| | | | | | | The command output looks like b'foo\nbar' in string-space. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: We should run autobuild with python3 by defaultNoel Power2018-12-101-1/+1
| | | | | | | | | | | sn-devel autobuild runing autobuild.py (via git hooks I suppose) but if run directly (e.g. depending on script shebang) then 'python' aka python2 will run. This will cause an error when building some targets because the autobuild script itself sometimes builds paths based on the version of python executing the script e.g ${PYTHON_PREFIX}. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Convert old py3 tasks to py2Noel Power2018-12-101-8/+8
| | | | | | | | | Now that we are building with python3 by default we need to convert the old python3 test tasks to python2 (e.g. reverse how we used do it) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Adjust autobuild for PY2/PY3 get_python_lib behaviourNoel Power2018-12-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resuls of get_python_lib are different between python2 & python3 and this results in autobuild generating the wrong PYTHONPATH with python3. python2 ======= print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix')) /my/prefix/lib64/python2.7 python3 print ("%s" % get_python_lib(standard_lib=1, prefix='/my/prefix')) /my/prefix/lib/python3.6 But with addition of plat_specific param the results are the same python2 ======= print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix')) /my/prefix/lib64/python2.7/site-packages python3 ======= print ("%s" % get_python_lib(plat_specific=1, standard_lib=0, prefix='/my/prefix')) /my/prefix/lib64/python3.6/site-packages Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Modify old samba_buildpy3_only job to python2Noel Power2018-12-101-6/+6
| | | | | | | | Since autobuild now builds python3 by default we need to change the previously buildpy3 only job to python2 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* autobuild: Remove temporary purepy3 tasksNoel Power2018-12-101-82/+0
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* CI: Add new (TEMP) pure python3 autobuild jobs for samba-build & samba-nt4Noel Power2018-12-101-0/+39
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* script: Add new (temporary) pure python3 ad-dc testNoel Power2018-12-101-0/+15
| | | | | | | | | | | Ideally we want all the tests to run under python3 by default (no special task for this) and then convert the existing '-py3' tasks to run the python tests with python3. However at the moment the convertion process is not ready to do this, for a while we need to run separate autobuild tasks for this. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>