util/u_process: implement util_get_process_name for Windows
There's not yet any users of this function on Windows, but it prints a warning during builds, and seems easy enough to implement. So let's add a trivial implementation. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7548>
This commit is contained in:
committed by
Marge Bot
parent
d442a99238
commit
1a5400a9e9
@@ -52,10 +52,14 @@ expect_equal_str(const char *expected, const char *actual, const char *test)
|
||||
static void
|
||||
test_util_get_process_name (void)
|
||||
{
|
||||
#if !DETECT_OS_WINDOWS
|
||||
const char* name = util_get_process_name();
|
||||
expect_equal_str("process_test", name, "util_get_process_name");
|
||||
#endif
|
||||
#if DETECT_OS_WINDOWS
|
||||
const char *expected = "process_test.exe";
|
||||
#else
|
||||
const char *expected = "process_test";
|
||||
#endif
|
||||
|
||||
const char *name = util_get_process_name();
|
||||
expect_equal_str(expected, name, "util_get_process_name");
|
||||
}
|
||||
|
||||
/* This test gets the real path from Meson (BUILD_FULL_PATH env var),
|
||||
|
||||
Reference in New Issue
Block a user