Skip to content

Commit 50bf997

Browse files
authored
Fix breakage from #16064 (#16082)
Skip the part of the test that assumes unix-style pathnames. See #16064 (comment)
1 parent a703ee7 commit 50bf997

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ jobs:
444444
# note we do *not* build all libraries and freeze the cache; as we run
445445
# only limited tests here, it's more efficient to build on demand
446446
- run-tests:
447-
test_targets: "other.test_emcc_cflags other.test_stdin other.test_bad_triple core2.test_sse1 core2.test_ccall other.test_closure_externs other.test_binaryen_debug other.test_js_optimizer_parse_error other.test_output_to_nowhere other.test_emcc_dev_null other.test_cmake* other.test_system_include_paths other.test_emar_response_file core2.test_utf16 other.test_special_chars_in_arguments other.test_toolchain_profiler other.test_realpath_nodefs other.test_response_file_encoding"
447+
test_targets: "other.test_emcc_cflags other.test_stdin other.test_bad_triple core2.test_sse1 core2.test_ccall other.test_closure_externs other.test_binaryen_debug other.test_js_optimizer_parse_error other.test_output_to_nowhere other.test_emcc_dev_null other.test_cmake* other.test_system_include_paths other.test_emar_response_file core2.test_utf16 other.test_special_chars_in_arguments other.test_toolchain_profiler other.test_realpath_nodefs other.test_response_file_encoding other.test_libc_progname"
448448
test-mac:
449449
executor: mac
450450
environment:

tests/other/test_libc_progname.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include <assert.h>
9+
#include <emscripten.h>
910
#include <stdio.h>
1011
#include <string.h>
1112

@@ -24,6 +25,11 @@ int main(void) {
2425
/* Ensure the basename contains no path separator. */
2526
assert(!strchr(__progname, '/'));
2627

28+
if (EM_ASM_INT({ return process.platform.startsWith("win") })) {
29+
// The rest of the test here assumes unix-style pathnames.
30+
return 0;
31+
}
32+
2733
/* Ensure the full path starts with the root directory. */
2834
assert(*__progname_full == '/');
2935

0 commit comments

Comments
 (0)