gtestutils: allow specifying mode through the environment

Meson makes it somewhat hard to pass different command line arguments
to the tests according to whether they should be run in quick mode or
slow mode.

Allow the user to specify the test mode using a G_TEST_MODE environment
variable, which can also be turned into a Meson test setup using

  add_test_setup('slow', env: ['G_TEST_MODE=slow'])

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
10 jobs for gtestutils-env-mode in 13 minutes and 52 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Style Check
passed #1120391
check-todos

00:04:59

passed #1120390
style-check-diff

00:05:22

 
  Build
passed #1120394
cross-android_api21_arm64

00:03:38

passed #1120395
cross-android_api28_arm64

00:03:36

passed #1120396
cross-mingw64

00:04:23

passed #1120393
debian-stable-x86_64

00:04:20

passed #1120392
fedora-x86_64

00:10:14

passed #1120397
win32-ps
msys2-mingw32

00:09:13

passed #1120398
win32-ps
vs2017-x64

00:08:10

 
  Coverage
passed #1120399
coverage

00:03:37

76.2%