mirror of
https://github.com/reactos/buildbot_config.git
synced 2024-11-23 03:39:51 +00:00
[WORKER] Reboot Windows testers after every run of run_rostests
This works by putting the new `buildbot_start.cmd` into Scheduled Tasks (run on logon). It launches the BuildBot worker and waits for it to finish, then reboots the Windows VM. The BuildBot worker is reconfigured to watch the `shutdown.stamp` file in the basedir, and ask the Buildmaster for a graceful shutdown of the worker if that file's timestamp has changed. This works via BuildBot's allow_shutdown Worker config option. All of this together should gracefully reboot the Windows VM after every test, even when multiple tests are queued and without causing any BuildBot exceptions (which always happen on unexpected shutdowns). Dedicated to Timo, who asked me about this for months and also found the allow_shutdown option :)
This commit is contained in:
parent
ce63a5e757
commit
b7f59ec24d
@ -32,7 +32,7 @@ keepalive = 600
|
||||
umask = 0o22
|
||||
maxdelay = 300
|
||||
numcpus = None
|
||||
allow_shutdown = None
|
||||
allow_shutdown = 'file'
|
||||
maxretries = None
|
||||
|
||||
s = Worker(buildmaster_host, port, workername, passwd, basedir,
|
||||
|
7
worker/buildbot_start.cmd
Normal file
7
worker/buildbot_start.cmd
Normal file
@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
:: Start the worker, which is configured with allow_shutdown = 'file'
|
||||
:: Once a single test is done, it will initiate a graceful shutdown of the worker.
|
||||
start /wait C:\Python27\Scripts\buildbot-worker.exe start C:\buildbot_config\worker
|
||||
|
||||
:: Reboot for a clean next test run
|
||||
shutdown -r -t 0
|
@ -12,3 +12,7 @@ cd $WORKDIR
|
||||
mv ${ROSAUTOTEST_DIR}/rosautotest.exe . || exit $?
|
||||
cp $SOURCEDIR/../rosautotest.ini . || exit $?
|
||||
./rosautotest.exe /c "Build $1" /w
|
||||
|
||||
# Initiate a graceful shutdown of the BuildBot worker, which in turn
|
||||
# initiates a graceful reboot of the Windows VM.
|
||||
touch $SOURCEDIR/../../shutdown.stamp
|
||||
|
Loading…
Reference in New Issue
Block a user