Support alternate ways to specify GTest modes
Currently, the only way to activate other GTest modes (slow, thorough, etc) is using a command line argument to the test runner. This makes it difficult when integrating with meson's test support and other non-GTest based tests exist (e.g. when validating desktop and appdata files as tests, as is a common pattern in GNOME apps now), since you can't easily specify which tests should receive the extra command line arguments and which should not. In particular, I'd like quick tests to be the default under development and thorough tests to be the default under CI.
An easy way to do this would be to take notice of a G_TEST_MODE
or similar environment variable and use that as the default mode if set. It would be trivial then to make thorough tests the default when run under CI.