[PATCH] shell32/tests: Don't use randomized paths in the shlexec test.
fgouget at codeweavers.com
Thu Mar 19 06:04:18 CDT 2020
In case of a failure it is necessary to show the path that was passed
to ShellExecute(). That means the paths must not be randomized so as
not to prevent the TestBot from detecting new failures.
Note that because of the registry modifications one cannot run two
instances of the test concurrently anyway.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
As a side effect this drops the ".tmp" extension but I don't think
that makes a difference.
dlls/shell32/tests/shlexec.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index eec1a63d383..f6f384bbe00 100644
@@ -2693,7 +2693,13 @@ static void init_test(void)
- GetTempFileNameA(filename, "wt", 0, tmpdir);
+ /* In case of a failure it is necessary to show the path that was passed to
+ * ShellExecute(). That means the paths must not be randomized so as not to
+ * prevent the TestBot from detecting new failures.
+ strcpy(tmpdir, filename);
+ strcat(tmpdir, "\\wtShlexecDir");
GetLongPathNameA(tmpdir, tmpdir, sizeof(tmpdir));
DeleteFileA( tmpdir );
rc = CreateDirectoryA( tmpdir, NULL );
@@ -2701,8 +2707,8 @@ static void init_test(void)
/* Set %TMPDIR% for the tests */
- rc = GetTempFileNameA(tmpdir, "wt", 0, child_file);
- ok(rc != 0, "got %d\n", rc);
+ strcpy(child_file, tmpdir);
+ strcat(child_file, "\\wtShlexecFile");
/* Set up the test files */
More information about the wine-devel