tests: fix fake_ntlm to run with a dynamic log directory

Ref: #10818
This commit is contained in:
Dan Fandrich 2023-03-29 12:20:02 -07:00
parent 8a298119f1
commit 0bdb95ecbf
8 changed files with 27 additions and 19 deletions

View file

@ -202,12 +202,12 @@ void win32_cleanup(void)
/* set by the main code to point to where the test dir is */
const char *path = ".";
FILE *test2fopen(long testno)
FILE *test2fopen(long testno, const char *logdir)
{
FILE *stream;
char filename[256];
/* first try the alternative, preprocessed, file */
msnprintf(filename, sizeof(filename), ALTTEST_DATA_PATH, ".", testno);
msnprintf(filename, sizeof(filename), ALTTEST_DATA_PATH, logdir, testno);
stream = fopen(filename, "rb");
if(stream)
return stream;