Skip to content

Commit

Permalink
Patching mwrap for debugging CI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
lhearachel committed Jan 2, 2025
1 parent 1489216 commit 8b003d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $(VENV_ACTIVATE):
. $(VENV_ACTIVATE) ; pip install -r requirements.txt

$(BUILD)/build.ninja: $(ROOT_INI) $(DOT_MWCONFIG) $(VENV_ACTIVATE) | $(BUILD)
MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(VENV_MESON) setup \
. $(VENV_ACTIVATE) ; MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(MESON) setup \
--wrap-mode=nopromote \
--native-file=meson/$(NATIVE) \
--native-file=$(ROOT_INI) \
Expand Down
7 changes: 7 additions & 0 deletions tools/cw/mwrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ int _tmain(int argc, _TCHAR *argv[])

// Add the wine command if requested
_TCHAR *wine = utftotc(cfg.wine);
printf("cfg.wine: %s\n", cfg.wine);
printf("wine: %s\n", wine);
if (wine) {
new_argc += 1;
new_argv = realloc(new_argv, sizeof(*new_argv) * (new_argc + 1));
Expand Down Expand Up @@ -612,6 +614,11 @@ int _tmain(int argc, _TCHAR *argv[])
printf("\n");
}
pid_t pid;
printf("new argv:");
for (size_t i = 0; i < new_argc; i++) {
printf(" %s", new_argv[i]);
}
printf("\n");
if (posix_spawn(&pid, new_argv[0], NULL, NULL, new_argv, environ) != 0) {
perror(PROGRAM_NAME ": posix_spawn");
exit(EXIT_FAILURE);
Expand Down

0 comments on commit 8b003d0

Please sign in to comment.