Francois Gouget : shell32/tests: Don't use randomized paths in the shlexec test.
Module: wine Branch: master Commit: 30f84ef51e5c4bc885b71f15e71aa11b9ba57c0d URL: https://source.winehq.org/git/wine.git/?a=commit;h=30f84ef51e5c4bc885b71f15e... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Mar 19 12:04:18 2020 +0100 shell32/tests: Don't use randomized paths in the shlexec test. 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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 eec1a63d38..f6f384bbe0 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -2693,7 +2693,13 @@ static void init_test(void) strcpy(filename, "c:\\"); else GetTempPathA(sizeof(filename), filename); - 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 */ SetEnvironmentVariableA("TMPDIR", tmpdir); - rc = GetTempFileNameA(tmpdir, "wt", 0, child_file); - ok(rc != 0, "got %d\n", rc); + strcpy(child_file, tmpdir); + strcat(child_file, "\\wtShlexecFile"); init_event(child_file); /* Set up the test files */
participants (1)
-
Alexandre Julliard