Running WineTest every day the easy way
Francois Gouget
fgouget at free.fr
Thu Sep 17 20:21:18 CDT 2015
So this time I've done things in the right order: first publish the code
and then announce it.
So here's wt-daily, a script to "orchestrate all the daily WineTest runs
and related tasks."
Here's the 'quickstart guide':
git clone https://github.com/fgouget/wt-daily.git
cd wt-daily
vi wt-daily.config
In this file set the following environment variables:
email="your email address here"
tag="a-tag"
desc="A description of your system for Wine developers"
shutdown="suspend"
Then when you know you won't be needing your computer for a while, just
type ./wt-daily. This will update and rebuild Wine, run the tests and
finally suspend your machine.
It's that simple!
If you'd rather not suspend your machine you can set shutdown to
"poweroff", "reboot" or even leave it out to keep the computer on.
By default wt-daily will ask for your green light before starting the
tests. So you can start it while still using the computer and click 'Ok'
once you take off. To have the tests run automatically (e.g. from cron),
pass --auto-test on the command line or set default_options="--auto-test"
in the configuration file.
If you have a 64-bit system then you can also set the {tag,desc}wow32
and {tag,desc}wow64 variables to run the tests in a mixed 32/64-bit
WinePrefix. If you have a Mac, set the {tag,desc}mac variables to run
the tests using the Mac driver instead of (or in addition to) X11.
The script should work on OS/X though I have obviously not tested it in
a long time. I'ĺl be happy to get feedback on that, particularly in the
form of patches.
Now you can totally stop reading here. But there's a ton more that the
script can do. Read on if you want to discover more.
You can have the script start an application that will prevent the tests
from running until you close it. I used that to run the tests on a
MythTV client box. Wine would get updated and rebuilt in the background
while I was watching TV and once that was done the script would run the
tests and finally power off the computer.
You can also take an image of a suitably configured Windows partition
and have wt-daily restore that image to the partition, reboot to Windows
which will automatically run WineTest (you'll find the batch script for
that in the repository), then reboot back to Linux (or shutdown the
computer).
This functionality is used on the cw1-hd6800 and xw2-gtx560 CodeWeavers
boxes to run the tests on Linux, then Windows 8.1 and then Windows 10.
All automatically. The script actually runs every hour and skips the
tests (and rebooting) if nothing changed since the last run.
I also have this Windows image thing set up on my fg-acer64 laptop but
there I interactively select which Windows image to restore, with a
choice of Windows 8, 8.1 and 10 (or nothing if I don't feel like going
through a reboot).
You can also extend wt-daily to add non Wine tasks. For instance on my
laptops it runs another script that synchronizes the Documents folder
with my desktop and runs 'git fetch --all' in all my Git repositories.
This way the next time I go offline everything is up to date.
The repository also contains a number or scripts that you may find
useful in your own automation tasks as they support not just Linux but
OS/X too.
wt-image Creates, checks, restores or reboots to a disk image.
wt-bot Update, build and check the Wine source code, and run the tests.
wt-make Seeks to automatically fully use CPU and I/O parallelism when running make.
wt-ask Asks a simple Yes/No question to the user.
wt-notify Displays a notification to the user.
wt-power Powers off, reboots, suspends or hibernates the computer.
wt-screensaver Controls the screensaver. In particular it can prevent it from triggering.
wt-nice Runs the specified command with the lowest possible CPU and I/O priority.
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
Linux: the choice of a GNU generation
More information about the wine-devel
mailing list