Add some debug hooks to check for memory leaks, etc.

pull/193/head
Michael Sweet 7 years ago
parent 6ac1fb23f4
commit 26a33621ca
  1. 11
      testmxml.c

@ -708,8 +708,19 @@ main(int argc, /* I - Number of command-line args */
} }
} }
/*
* Debug hooks...
*/
if (getenv("TEST_DELAY") != NULL) if (getenv("TEST_DELAY") != NULL)
sleep(atoi(getenv("TEST_DELAY"))); sleep(atoi(getenv("TEST_DELAY")));
if (getenv("TEST_LEAKS") != NULL)
{
char command[1024];
snprintf(command, sizeof(command), "leaks %d", (int)getpid());
system(command);
}
/* /*
* Return... * Return...

Loading…
Cancel
Save