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
cbe0e499
Commit
cbe0e499
authored
Mar 20, 2004
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Mar 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add revision support to winetest.exe.
parent
af373042
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
2 deletions
+85
-2
Makefile.in
programs/winetest/Makefile.in
+3
-0
main.c
programs/winetest/main.c
+73
-2
maketest
programs/winetest/maketest
+9
-0
No files found.
programs/winetest/Makefile.in
View file @
cbe0e499
...
@@ -47,6 +47,9 @@ TESTBINS = $(TESTS:%=%_test.exe$(DLLEXT))
...
@@ -47,6 +47,9 @@ TESTBINS = $(TESTS:%=%_test.exe$(DLLEXT))
winetest.rc
:
maketest Makefile.in
winetest.rc
:
maketest Makefile.in
$(SRCDIR)
/maketest
$(TESTBINS)
>
$@
||
(
$(RM)
$@
&&
exit
1
)
$(SRCDIR)
/maketest
$(TESTBINS)
>
$@
||
(
$(RM)
$@
&&
exit
1
)
revision.info
:
(
cd
$(TOPSRCDIR)
;
for
file
in
dlls/
*
/tests/
*
.c
;
do
rev
=
`
cvs
stat
"
$$
file"
|
grep
"Working"
|
awk
'{print $$3}'
`
;
echo
"
$$
file:
$$
rev"
;
done
)
>
$@
||
(
$(RM)
$@
&&
exit
1
)
winetest.res
:
$(TESTBINS)
winetest.res
:
$(TESTBINS)
clean
::
clean
::
...
...
programs/winetest/main.c
View file @
cbe0e499
...
@@ -49,7 +49,14 @@ struct wine_test
...
@@ -49,7 +49,14 @@ struct wine_test
char
*
exename
;
char
*
exename
;
};
};
struct
rev_info
{
const
char
*
file
;
const
char
*
rev
;
};
static
struct
wine_test
*
wine_tests
;
static
struct
wine_test
*
wine_tests
;
static
struct
rev_info
*
rev_infos
;
static
const
char
*
wineloader
;
static
const
char
*
wineloader
;
...
@@ -115,6 +122,65 @@ void remove_dir (const char *dir)
...
@@ -115,6 +122,65 @@ void remove_dir (const char *dir)
dir
,
GetLastError
());
dir
,
GetLastError
());
}
}
const
char
*
get_test_source_file
(
const
char
*
test
,
const
char
*
subtest
)
{
static
const
char
*
special_dirs
[][
2
]
=
{
{
"gdi32"
,
"gdi"
},
{
"kernel32"
,
"kernel"
},
{
"user32"
,
"user"
},
{
"winspool.drv"
,
"winspool"
},
{
"ws2_32"
,
"winsock"
},
{
0
,
0
}
};
static
char
buffer
[
MAX_PATH
];
int
i
;
for
(
i
=
0
;
special_dirs
[
i
][
0
];
i
++
)
{
if
(
strcmp
(
test
,
special_dirs
[
i
][
0
])
==
0
)
{
test
=
special_dirs
[
i
][
1
];
break
;
}
}
snprintf
(
buffer
,
sizeof
(
buffer
),
"dlls/%s/tests/%s.c"
,
test
,
subtest
);
fprintf
(
stderr
,
"file=%s
\n
"
,
buffer
);
return
buffer
;
}
const
char
*
get_file_rev
(
const
char
*
file
)
{
const
struct
rev_info
*
rev
;
for
(
rev
=
rev_infos
;
rev
->
file
;
rev
++
)
{
fprintf
(
stderr
,
" ?{%s:%s)
\n
"
,
rev
->
file
,
rev
->
rev
);
if
(
strcmp
(
rev
->
file
,
file
)
==
0
)
return
rev
->
rev
;
}
return
""
;
}
void
extract_rev_infos
()
{
char
revinfo
[
256
],
*
p
;
int
size
=
0
,
i
=
0
,
len
;
HMODULE
module
=
GetModuleHandle
(
NULL
);
for
(
i
=
0
;
TRUE
;
i
++
)
{
if
(
i
>=
size
)
{
size
+=
100
;
rev_infos
=
xrealloc
(
rev_infos
,
size
);
}
memset
(
rev_infos
+
i
,
0
,
sizeof
(
rev_infos
[
i
]));
len
=
LoadStringA
(
module
,
i
+
30000
,
revinfo
,
sizeof
(
revinfo
));
if
(
len
==
0
)
break
;
/* end of revision info */
if
(
len
>=
sizeof
(
revinfo
))
report
(
R_FATAL
,
"Revision info too long."
);
if
(
!
(
p
=
strrchr
(
revinfo
,
':'
)))
report
(
R_FATAL
,
"Revision info malformed (i=%d)"
,
i
);
*
p
=
0
;
rev_infos
[
i
].
file
=
strdup
(
revinfo
);
rev_infos
[
i
].
rev
=
strdup
(
p
+
1
);
}
while
(
1
);
}
void
*
extract_rcdata
(
int
id
,
DWORD
*
size
)
void
*
extract_rcdata
(
int
id
,
DWORD
*
size
)
{
{
HRSRC
rsrc
;
HRSRC
rsrc
;
...
@@ -236,9 +302,11 @@ get_subtests (const char *tempdir, struct wine_test *test, int id)
...
@@ -236,9 +302,11 @@ get_subtests (const char *tempdir, struct wine_test *test, int id)
int
run_test
(
struct
wine_test
*
test
,
const
char
*
subtest
)
int
run_test
(
struct
wine_test
*
test
,
const
char
*
subtest
)
{
{
int
status
;
int
status
;
const
char
*
argv
[]
=
{
"wine"
,
test
->
exename
,
subtest
,
NULL
};
const
char
*
argv
[]
=
{
"wine"
,
test
->
exename
,
subtest
,
NULL
};
const
char
*
file
=
get_test_source_file
(
test
->
name
,
subtest
);
const
char
*
rev
=
get_file_rev
(
file
);
xprintf
(
"%s:%s start
\n
"
,
test
->
name
,
subtest
);
xprintf
(
"%s:%s start
%s %s
\n
"
,
test
->
name
,
subtest
,
file
,
rev
);
if
(
test
->
is_elf
)
if
(
test
->
is_elf
)
status
=
spawnvp
(
_P_WAIT
,
wineloader
,
argv
);
status
=
spawnvp
(
_P_WAIT
,
wineloader
,
argv
);
else
else
...
@@ -386,6 +454,9 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
...
@@ -386,6 +454,9 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
char
*
tag
=
NULL
,
*
cp
;
char
*
tag
=
NULL
,
*
cp
;
const
char
*
submit
=
NULL
;
const
char
*
submit
=
NULL
;
/* initialize the revision information first */
extract_rev_infos
();
cmdLine
=
mystrtok
(
cmdLine
);
cmdLine
=
mystrtok
(
cmdLine
);
while
(
cmdLine
)
{
while
(
cmdLine
)
{
if
(
*
cmdLine
==
'-'
)
if
(
*
cmdLine
==
'-'
)
...
...
programs/winetest/maketest
View file @
cbe0e499
...
@@ -15,6 +15,15 @@ do
...
@@ -15,6 +15,15 @@ do
i
=
`
expr
$i
+ 1
`
i
=
`
expr
$i
+ 1
`
echo
"
$i
\"
$test
\"
"
echo
"
$i
\"
$test
\"
"
done
done
if
[
-f
revision.info
]
;
then
i
=
0
for
line
in
`
cat
revision.info
`
;
do
i
=
`
expr
$i
+ 1
`
echo
"
$i
+30000
\"
$line
\"
"
done
fi
echo
"}"
echo
"}"
i
=
0
i
=
0
...
...
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