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
55b51f3b
Commit
55b51f3b
authored
May 31, 2009
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Add option -d to specify tests output directory.
parent
62ab6ab1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
main.c
programs/winetest/main.c
+15
-4
No files found.
programs/winetest/main.c
View file @
55b51f3b
...
@@ -612,7 +612,7 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
...
@@ -612,7 +612,7 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType,
}
}
static
char
*
static
char
*
run_tests
(
char
*
logname
)
run_tests
(
char
*
logname
,
char
*
outdir
)
{
{
int
i
;
int
i
;
char
*
strres
,
*
eol
,
*
nextline
;
char
*
strres
,
*
eol
,
*
nextline
;
...
@@ -659,8 +659,10 @@ run_tests (char *logname)
...
@@ -659,8 +659,10 @@ run_tests (char *logname)
report
(
R_FATAL
,
"Could not open logfile: %u"
,
GetLastError
());
report
(
R_FATAL
,
"Could not open logfile: %u"
,
GetLastError
());
/* try stable path for ZoneAlarm */
/* try stable path for ZoneAlarm */
if
(
!
outdir
)
{
strcpy
(
tempdir
,
tmppath
);
strcpy
(
tempdir
,
tmppath
);
strcat
(
tempdir
,
"wct"
);
strcat
(
tempdir
,
"wct"
);
if
(
!
CreateDirectoryA
(
tempdir
,
NULL
))
if
(
!
CreateDirectoryA
(
tempdir
,
NULL
))
{
{
if
(
!
GetTempFileNameA
(
tmppath
,
"wct"
,
0
,
tempdir
))
if
(
!
GetTempFileNameA
(
tmppath
,
"wct"
,
0
,
tempdir
))
...
@@ -669,6 +671,10 @@ run_tests (char *logname)
...
@@ -669,6 +671,10 @@ run_tests (char *logname)
if
(
!
CreateDirectoryA
(
tempdir
,
NULL
))
if
(
!
CreateDirectoryA
(
tempdir
,
NULL
))
report
(
R_FATAL
,
"Could not create directory: %s"
,
tempdir
);
report
(
R_FATAL
,
"Could not create directory: %s"
,
tempdir
);
}
}
}
else
strcpy
(
tempdir
,
outdir
);
report
(
R_DIR
,
tempdir
);
report
(
R_DIR
,
tempdir
);
xprintf
(
"Version 4
\n
"
);
xprintf
(
"Version 4
\n
"
);
...
@@ -749,6 +755,7 @@ run_tests (char *logname)
...
@@ -749,6 +755,7 @@ run_tests (char *logname)
report
(
R_STATUS
,
"Cleaning up"
);
report
(
R_STATUS
,
"Cleaning up"
);
CloseHandle
(
logfile
);
CloseHandle
(
logfile
);
logfile
=
0
;
logfile
=
0
;
if
(
!
outdir
)
remove_dir
(
tempdir
);
remove_dir
(
tempdir
);
heap_free
(
wine_tests
);
heap_free
(
wine_tests
);
heap_free
(
curpath
);
heap_free
(
curpath
);
...
@@ -816,6 +823,7 @@ usage (void)
...
@@ -816,6 +823,7 @@ usage (void)
" --help print this message and exit
\n
"
" --help print this message and exit
\n
"
" --version print the build version and exit
\n
"
" --version print the build version and exit
\n
"
" -c console mode, no GUI
\n
"
" -c console mode, no GUI
\n
"
" -d DIR Use DIR as temp directory (default: %%TEMP%%
\\
wct)"
" -e preserve the environment
\n
"
" -e preserve the environment
\n
"
" -h print this message and exit
\n
"
" -h print this message and exit
\n
"
" -p shutdown when the tests are done
\n
"
" -p shutdown when the tests are done
\n
"
...
@@ -828,7 +836,7 @@ usage (void)
...
@@ -828,7 +836,7 @@ usage (void)
int
main
(
int
argc
,
char
*
argv
[]
)
int
main
(
int
argc
,
char
*
argv
[]
)
{
{
char
*
logname
=
NULL
;
char
*
logname
=
NULL
,
*
outdir
=
NULL
;
const
char
*
extract
=
NULL
;
const
char
*
extract
=
NULL
;
const
char
*
cp
,
*
submit
=
NULL
;
const
char
*
cp
,
*
submit
=
NULL
;
int
reset_env
=
1
;
int
reset_env
=
1
;
...
@@ -915,6 +923,9 @@ int main( int argc, char *argv[] )
...
@@ -915,6 +923,9 @@ int main( int argc, char *argv[] )
extract_only
(
extract
);
extract_only
(
extract
);
break
;
break
;
case
'd'
:
outdir
=
argv
[
++
i
];
break
;
default:
default:
report
(
R_ERROR
,
"invalid option: -%c"
,
argv
[
i
][
1
]);
report
(
R_ERROR
,
"invalid option: -%c"
,
argv
[
i
][
1
]);
usage
();
usage
();
...
@@ -953,12 +964,12 @@ int main( int argc, char *argv[] )
...
@@ -953,12 +964,12 @@ int main( int argc, char *argv[] )
}
}
if
(
!
logname
)
{
if
(
!
logname
)
{
logname
=
run_tests
(
NULL
);
logname
=
run_tests
(
NULL
,
outdir
);
if
(
build_id
[
0
]
&&
!
nb_filters
&&
if
(
build_id
[
0
]
&&
!
nb_filters
&&
report
(
R_ASK
,
MB_YESNO
,
"Do you want to submit the test results?"
)
==
IDYES
)
report
(
R_ASK
,
MB_YESNO
,
"Do you want to submit the test results?"
)
==
IDYES
)
if
(
!
send_file
(
logname
)
&&
!
DeleteFileA
(
logname
))
if
(
!
send_file
(
logname
)
&&
!
DeleteFileA
(
logname
))
report
(
R_WARNING
,
"Can't remove logfile: %u"
,
GetLastError
());
report
(
R_WARNING
,
"Can't remove logfile: %u"
,
GetLastError
());
}
else
run_tests
(
logname
);
}
else
run_tests
(
logname
,
outdir
);
report
(
R_STATUS
,
"Finished"
);
report
(
R_STATUS
,
"Finished"
);
}
}
if
(
poweroff
)
if
(
poweroff
)
...
...
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