tests: Collect common code from embedded-test main executables

This all seems to have been written by Red Hat or by Collabora, so we
have permission to relicense it under the MIT/X11 license, and we
might as well do so.

Signed-off-by: Simon McVittie <smcv@collabora.com>
12 jobs for test-main-boilerplate in 28 minutes and 41 seconds (queued for 54 minutes and 38 seconds)
Status Job ID Name Coverage
  Build
manual #65504
allowed to fail manual
build:buster
passed #65498
build:cmake

00:02:40

passed #65495
build:debug

00:07:33

manual #65500
allowed to fail manual
build:i686-w64-mingw32-cmake
passed #65499
build:i686-w64-mingw32-debug

00:04:35

manual #65503
allowed to fail manual
build:jessie
manual #65497
allowed to fail manual
build:legacy
passed #65494
build:production

00:05:37

manual #65496
allowed to fail manual
build:reduced
passed #65501
build:x86_64-w64-mingw32

00:04:42

passed #65502
build:x86_64-w64-mingw32-cmake-debug

00:03:31

manual #65505
allowed to fail manual
build:xenial