Paul Vriens : winetest: Pass correct working directory to the tests.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jan 5 13:36:05 CST 2007
Module: wine
Branch: master
Commit: 5b692005e8514417cb7592b3d008ae660e24915d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b692005e8514417cb7592b3d008ae660e24915d
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Thu Jan 4 21:35:23 2007 +0100
winetest: Pass correct working directory to the tests.
---
programs/winetest/main.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 62dda0d..c2f6881 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -266,7 +266,7 @@ extract_test (struct wine_test *test, co
value of WaitForSingleObject.
*/
static int
-run_ex (char *cmd, const char *out, DWORD ms)
+run_ex (char *cmd, const char *out, const char *tempdir, DWORD ms)
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
@@ -289,7 +289,7 @@ run_ex (char *cmd, const char *out, DWOR
}
if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0,
- NULL, NULL, &si, &pi)) {
+ NULL, tempdir, &si, &pi)) {
status = -2;
} else {
CloseHandle (pi.hThread);
@@ -358,7 +358,7 @@ get_subtests (const char *tempdir, struc
extract_test (test, tempdir, res_name);
cmd = strmake (NULL, "%s --list", test->exename);
- run_ex (cmd, subname, 5000);
+ run_ex (cmd, subname, tempdir, 5000);
free (cmd);
subfile = fopen (subname, "r");
@@ -407,7 +407,7 @@ get_subtests (const char *tempdir, struc
}
static void
-run_test (struct wine_test* test, const char* subtest)
+run_test (struct wine_test* test, const char* subtest, const char *tempdir)
{
int status;
const char* file = get_test_source_file(test->name, subtest);
@@ -415,7 +415,7 @@ run_test (struct wine_test* test, const
char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
xprintf ("%s:%s start %s %s\n", test->name, subtest, file, rev);
- status = run_ex (cmd, NULL, 120000);
+ status = run_ex (cmd, NULL, tempdir, 120000);
free (cmd);
xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
}
@@ -538,7 +538,7 @@ run_tests (char *logname)
for (j = 0; j < test->subtest_count; j++) {
report (R_STEP, "Running: %s:%s", test->name,
test->subtests[j]);
- run_test (test, test->subtests[j]);
+ run_test (test, test->subtests[j], tempdir);
}
}
report (R_DELTA, 0, "Running: Done");
More information about the wine-cvs
mailing list