tests/spawn-*.c: fix on Windows

Need to append ".exe" to the spawned binary name on Windows

https://bugzilla.gnome.org/show_bug.cgi?id=679683
This commit is contained in:
Dan Winship 2012-11-25 13:52:20 -05:00 committed by Matthias Clasen
parent 8d9969fe15
commit 602714a8da
3 changed files with 6 additions and 4 deletions

View File

@ -249,10 +249,12 @@ TEST_PROGS += 1bit-emufutex
TEST_PROGS += spawn-multithreaded
spawn_multithreaded_SOURCES = spawn-multithreaded.c
spawn_multithreaded_CFLAGS = -DEXEEXT=\"$(EXEEXT)\"
spawn_multithreaded_LDADD = $(progs_ldadd)
TEST_PROGS += spawn-singlethread
spawn_singlethread_SOURCES = spawn-singlethread.c
spawn_singlethread_CFLAGS = -DEXEEXT=\"$(EXEEXT)\"
spawn_singlethread_LDADD = $(progs_ldadd)
TEST_PROGS += gwakeup

View File

@ -222,11 +222,11 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
dirname = g_path_get_dirname (argv[0]);
echo_prog_path = g_build_filename (dirname, "test-spawn-echo", NULL);
echo_prog_path = g_build_filename (dirname, "test-spawn-echo" EXEEXT, NULL);
if (!g_file_test (echo_prog_path, G_FILE_TEST_EXISTS))
{
g_free (echo_prog_path);
echo_prog_path = g_build_filename (dirname, "lt-test-spawn-echo", NULL);
echo_prog_path = g_build_filename (dirname, "lt-test-spawn-echo" EXEEXT, NULL);
}
g_free (dirname);

View File

@ -194,11 +194,11 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
dirname = g_path_get_dirname (argv[0]);
echo_prog_path = g_build_filename (dirname, "test-spawn-echo", NULL);
echo_prog_path = g_build_filename (dirname, "test-spawn-echo" EXEEXT, NULL);
if (!g_file_test (echo_prog_path, G_FILE_TEST_EXISTS))
{
g_free (echo_prog_path);
echo_prog_path = g_build_filename (dirname, "lt-test-spawn-echo", NULL);
echo_prog_path = g_build_filename (dirname, "lt-test-spawn-echo" EXEEXT, NULL);
}
#ifndef SRCDIR
#define SRCDIR dirname