Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c71998d7
Commit
c71998d7
authored
Dec 22, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Dec 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr/tests: Use a temporary path to avoid failures.
parent
b74ef16d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
53 deletions
+13
-53
job.c
dlls/qmgr/tests/job.c
+13
-53
No files found.
dlls/qmgr/tests/job.c
View file @
c71998d7
...
...
@@ -28,65 +28,26 @@
/* Globals used by many tests */
static
const
WCHAR
test_displayName
[]
=
{
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
test_remoteNameA
[]
=
{
'r'
,
'e'
,
'm'
,
'o'
,
't'
,
'e'
,
'A'
,
0
};
static
const
WCHAR
test_remoteNameB
[]
=
{
'r'
,
'e'
,
'm'
,
'o'
,
't'
,
'e'
,
'B'
,
0
};
static
const
WCHAR
test_localNameA
[]
=
{
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'A'
,
0
};
static
const
WCHAR
test_localNameB
[]
=
{
'l'
,
'o'
,
'c'
,
'a'
,
'l'
,
'B'
,
0
};
static
WCHAR
*
test_currentDir
;
static
WCHAR
*
test_remotePathA
;
static
WCHAR
*
test_remotePathB
;
static
WCHAR
*
test_localPathA
;
static
WCHAR
*
test_localPathB
;
static
WCHAR
test_remotePathA
[
MAX_PATH
];
static
WCHAR
test_remotePathB
[
MAX_PATH
];
static
WCHAR
test_localPathA
[
MAX_PATH
];
static
WCHAR
test_localPathB
[
MAX_PATH
];
static
IBackgroundCopyManager
*
test_manager
;
static
IBackgroundCopyJob
*
test_job
;
static
GUID
test_jobId
;
static
BG_JOB_TYPE
test_type
;
static
BOOL
init_paths
(
void
)
static
VOID
init_paths
(
void
)
{
static
const
WCHAR
format
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
0
}
;
DWORD
n
;
WCHAR
tmpDir
[
MAX_PATH
]
;
WCHAR
prefix
[]
=
{
'q'
,
'm'
,
'g'
,
'r'
,
0
}
;
n
=
GetCurrentDirectoryW
(
0
,
NULL
);
if
(
n
==
0
)
{
skip
(
"Couldn't get current directory size
\n
"
);
return
FALSE
;
}
test_currentDir
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
*
sizeof
(
WCHAR
));
test_localPathA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
n
+
1
+
lstrlenW
(
test_localNameA
))
*
sizeof
(
WCHAR
));
test_localPathB
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
n
+
1
+
lstrlenW
(
test_localNameB
))
*
sizeof
(
WCHAR
));
test_remotePathA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
n
+
1
+
lstrlenW
(
test_remoteNameA
))
*
sizeof
(
WCHAR
));
test_remotePathB
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
n
+
1
+
lstrlenW
(
test_remoteNameB
))
*
sizeof
(
WCHAR
));
if
(
!
test_currentDir
||
!
test_localPathA
||
!
test_localPathB
||
!
test_remotePathA
||
!
test_remotePathB
)
{
skip
(
"Couldn't allocate memory for full paths
\n
"
);
return
FALSE
;
}
GetTempPathW
(
MAX_PATH
,
tmpDir
);
if
(
GetCurrentDirectoryW
(
n
,
test_currentDir
)
!=
n
-
1
)
{
skip
(
"Couldn't get current directory
\n
"
);
return
FALSE
;
}
wsprintfW
(
test_localPathA
,
format
,
test_currentDir
,
test_localNameA
);
wsprintfW
(
test_localPathB
,
format
,
test_currentDir
,
test_localNameB
);
wsprintfW
(
test_remotePathA
,
format
,
test_currentDir
,
test_remoteNameA
);
wsprintfW
(
test_remotePathB
,
format
,
test_currentDir
,
test_remoteNameB
);
return
TRUE
;
GetTempFileNameW
(
tmpDir
,
prefix
,
0
,
test_localPathA
);
GetTempFileNameW
(
tmpDir
,
prefix
,
0
,
test_localPathB
);
GetTempFileNameW
(
tmpDir
,
prefix
,
0
,
test_remotePathA
);
GetTempFileNameW
(
tmpDir
,
prefix
,
0
,
test_remotePathB
);
}
/* Generic test setup */
...
...
@@ -545,8 +506,7 @@ START_TEST(job)
};
const
test_t
*
test
;
if
(
!
init_paths
())
return
;
init_paths
();
CoInitialize
(
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment