glib/gio/tests/appinfo-test-actions.desktop
Marco Trevisan (Treviño) 02de235059 tests/desktop-app-info: Use unique temporary paths for action files
desktop-app-info test may fail when repeated with multiple concurrent
processes because the actions test relies on checking the existence of
in the shared build directory, so by doing something like:

  meson test -C _build desktop-app-info -t 0.3 --repeat 80

We may end up in timeout errors, because we are waiting for files that
have been already deleted by other processes.

To avoid this, let's rely on writing the files on `$G_TEST_TMPDIR` env
variable, that is always set and unique, given that we're using the
G_TEST_OPTION_ISOLATE_DIRS test option.
2022-09-13 02:44:25 +02:00

17 lines
399 B
Desktop File

[Desktop Entry]
Type=Application
Actions=frob;tweak;twiddle;broken;
Exec=true
[Desktop Action frob]
Name=Frobnicate
Exec=sh -c '[ -d "$G_TEST_TMPDIR" ] && touch "$G_TEST_TMPDIR/frob"'
[Desktop Action tweak]
Name=Tweak
Exec=sh -c '[ -d "$G_TEST_TMPDIR" ] && touch "$G_TEST_TMPDIR/tweak"'
[Desktop Action twiddle]
Name=Twiddle
Exec=sh -c '[ -d "$G_TEST_TMPDIR" ] && touch "$G_TEST_TMPDIR/twiddle"'