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
a0994a7d
Commit
a0994a7d
authored
May 16, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better usage message. Flush stderr before exiting.
parent
59008670
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
wtmain.c
programs/winetest/wtmain.c
+23
-7
No files found.
programs/winetest/wtmain.c
View file @
a0994a7d
...
@@ -79,6 +79,13 @@ static tls_data* get_tls_data(void)
...
@@ -79,6 +79,13 @@ static tls_data* get_tls_data(void)
return
data
;
return
data
;
}
}
static
void
exit_process
(
int
code
)
{
fflush
(
stderr
);
ExitProcess
(
code
);
}
/*
/*
* Checks condition.
* Checks condition.
* Parameters:
* Parameters:
...
@@ -231,7 +238,7 @@ static int run_test( const char *name )
...
@@ -231,7 +238,7 @@ static int run_test( const char *name )
if
(
!
(
test
=
find_test
(
name
)))
if
(
!
(
test
=
find_test
(
name
)))
{
{
fprintf
(
stderr
,
"Fatal: test '%s' does not exist.
\n
"
,
name
);
fprintf
(
stderr
,
"Fatal: test '%s' does not exist.
\n
"
,
name
);
ExitP
rocess
(
1
);
exit_p
rocess
(
1
);
}
}
successes
=
failures
=
todo_successes
=
todo_failures
=
0
;
successes
=
failures
=
todo_successes
=
todo_failures
=
0
;
tls_index
=
TlsAlloc
();
tls_index
=
TlsAlloc
();
...
@@ -250,6 +257,18 @@ static int run_test( const char *name )
...
@@ -250,6 +257,18 @@ static int run_test( const char *name )
}
}
/* Display usage and exit */
static
void
usage
(
const
char
*
argv0
)
{
const
struct
test
*
test
;
fprintf
(
stderr
,
"Usage: %s test_name
\n
"
,
argv0
);
fprintf
(
stderr
,
"
\n
Valid test names:
\n
"
);
for
(
test
=
winetest_testlist
;
test
->
name
;
test
++
)
fprintf
(
stderr
,
" %s
\n
"
,
test
->
name
);
exit_process
(
1
);
}
/* main function */
/* main function */
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
...
@@ -262,10 +281,7 @@ int main( int argc, char **argv )
...
@@ -262,10 +281,7 @@ int main( int argc, char **argv )
if
((
p
=
getenv
(
"WINETEST_DEBUG"
)))
winetest_debug
=
atoi
(
p
);
if
((
p
=
getenv
(
"WINETEST_DEBUG"
)))
winetest_debug
=
atoi
(
p
);
if
((
p
=
getenv
(
"WINETEST_REPORT_SUCCESS"
)))
winetest_report_success
=
\
if
((
p
=
getenv
(
"WINETEST_REPORT_SUCCESS"
)))
winetest_report_success
=
\
atoi
(
p
);
atoi
(
p
);
if
(
!
argv
[
1
])
if
(
!
argv
[
1
])
usage
(
argv
[
0
]
);
{
fprintf
(
stderr
,
"Usage: %s test_name
\n
"
,
argv
[
0
]
);
return
run_test
(
argv
[
1
]);
ExitProcess
(
1
);
}
ExitProcess
(
run_test
(
argv
[
1
])
);
}
}
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