summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Turney <[email protected]>2020-03-25 13:22:30 +0000
committerMarge Bot <[email protected]>2020-04-15 21:10:11 +0000
commit0158f73f086e0fe1b29a1e7bba995acce71d6bb9 (patch)
tree70d67a8385817f5e9783c3b45bed7b9f79e9e1b2 /src
parentbefe2ff3a610c468fb0bbb67624cc5b531a3fefe (diff)
Fix util/process test on Cygwin
It seems meson returns the filename with extension for full_path(), even though Cygwin does it's best to pretend the file doesn't have that extension. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4514>
Diffstat (limited to 'src')
-rw-r--r--src/util/process_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/process_test.c b/src/util/process_test.c
index 00703df6034..ef7e2b4d4ad 100644
--- a/src/util/process_test.c
+++ b/src/util/process_test.c
@@ -75,6 +75,11 @@ test_util_get_process_exec_path (void)
error = true;
return;
}
+#ifdef __CYGWIN__
+ int i = strlen(build_path) - 4;
+ if ((i > 0) && (strcmp(&build_path[i], ".exe") == 0))
+ build_path[i] = 0;
+#endif
expect_equal_str(build_path, path, "util_get_process_name");
}