Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1bc6b962
Commit
1bc6b962
authored
Sep 07, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetest: Add extra quiet mode that only outputs data for failed tests.
parent
4b590b21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
main.c
programs/winetest/main.c
+21
-8
No files found.
programs/winetest/main.c
View file @
1bc6b962
...
...
@@ -64,6 +64,7 @@ static const char testexe[] = "_test.exe";
static
char
build_id
[
64
];
static
BOOL
is_wow64
;
static
int
failures
;
static
int
quiet_mode
;
/* filters for running only specific tests */
static
char
**
filters
;
...
...
@@ -717,15 +718,11 @@ run_ex (char *cmd, HANDLE out_file, const char *tempdir, DWORD ms, BOOL nocritic
DWORD
wait
,
status
,
flags
;
UINT
old_errmode
;
/* Flush to disk so we know which test caused Windows to crash if it does */
if
(
out_file
)
FlushFileBuffers
(
out_file
);
GetStartupInfoA
(
&
si
);
si
.
dwFlags
=
STARTF_USESTDHANDLES
;
si
.
hStdInput
=
GetStdHandle
(
STD_INPUT_HANDLE
);
si
.
hStdOutput
=
out_file
?
out_file
:
GetStdHandle
(
STD_OUTPUT_HANDLE
)
;
si
.
hStdError
=
out_file
?
out_file
:
GetStdHandle
(
STD_ERROR_HANDLE
)
;
si
.
hStdOutput
=
out_file
;
si
.
hStdError
=
out_file
;
if
(
nocritical
)
{
old_errmode
=
SetErrorMode
(
0
);
...
...
@@ -862,11 +859,26 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch
else
{
int
status
;
DWORD
pid
,
start
=
GetTickCount
();
DWORD
pid
,
s
ize
,
s
tart
=
GetTickCount
();
char
*
cmd
=
strmake
(
NULL
,
"%s %s"
,
test
->
exename
,
subtest
);
report
(
R_STEP
,
"Running: %s:%s"
,
test
->
name
,
subtest
);
xprintf
(
"%s:%s start %s
\n
"
,
test
->
name
,
subtest
,
file
);
status
=
run_ex
(
cmd
,
out_file
,
tempdir
,
120000
,
FALSE
,
&
pid
);
/* Flush to disk so we know which test caused Windows to crash if it does */
FlushFileBuffers
(
out_file
);
if
(
quiet_mode
>
1
)
{
char
*
data
,
tmpname
[
MAX_PATH
];
HANDLE
tmpfile
=
create_temp_file
(
tmpname
);
status
=
run_ex
(
cmd
,
tmpfile
,
tempdir
,
120000
,
FALSE
,
&
pid
);
if
(
status
)
{
data
=
flush_temp_file
(
tmpname
,
tmpfile
,
&
size
);
WriteFile
(
out_file
,
data
,
size
,
&
size
,
NULL
);
free
(
data
);
}
else
close_temp_file
(
tmpname
,
tmpfile
);
}
else
status
=
run_ex
(
cmd
,
out_file
,
tempdir
,
120000
,
FALSE
,
&
pid
);
if
(
status
==
-
2
)
status
=
-
GetLastError
();
free
(
cmd
);
xprintf
(
"%s:%s:%04x done (%d) in %ds
\n
"
,
test
->
name
,
subtest
,
pid
,
status
,
(
GetTickCount
()
-
start
)
/
1000
);
...
...
@@ -1372,6 +1384,7 @@ int __cdecl main( int argc, char *argv[] )
case
'q'
:
report
(
R_QUIET
);
interactive
=
0
;
quiet_mode
++
;
break
;
case
's'
:
if
(
!
(
submit
=
argv
[
++
i
]))
...
...
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