Commit 808f5c8d authored by Alexandre Julliard's avatar Alexandre Julliard

winetest: Remove the per-file revision info, we now use the global commit id.

parent 156dad05
......@@ -271,7 +271,7 @@ ws2_32_test.exe: $(DLLDIR)/ws2_32/tests/ws2_32_test.exe$(DLLEXT)
winetest.res: $(TESTBINS)
clean::
$(RM) tests.rc dist.res winetest-dist winetest-dist.exe $(TESTBINS)
$(RM) dist.res winetest-dist winetest-dist.exe $(TESTBINS)
# Rules for building distributable executable
......@@ -288,9 +288,6 @@ winetest-dist: $(WINEWRAPPER)
winetest-dist.exe: $(OBJS) dist.res.o Makefile.in
$(CC) $(APPMODE) $(OBJS) dist.res.o -o $@ $(DELAYIMPORTS:%=-l%) $(ALL_LIBS)
tests.rc: maketest Makefile.in
$(SRCDIR)/maketest $(TOPSRCDIR) > $@ || ($(RM) $@ && exit 1)
dist.res: winetest.rc tests.rc build.id build.nfo tests.url winetest.ico $(TESTBINS)
dist.res: winetest.rc build.nfo tests.url winetest.ico $(TESTBINS)
@DEPENDENCIES@ # everything below this line is overwritten by make depend
......@@ -19,10 +19,6 @@
*/
#include "winetest.rc"
#include "tests.rc"
/* @makedep: build.id */
WINE_BUILD STRINGRES "build.id"
/* @makedep: build.nfo */
BUILD_INFO STRINGRES "build.nfo"
......
......@@ -49,16 +49,9 @@ struct wine_test
char *exename;
};
struct rev_info
{
const char* file;
const char* rev;
};
char *tag = NULL;
static struct wine_test *wine_tests;
static int nr_of_files, nr_of_tests;
static struct rev_info *rev_infos = NULL;
static const char whitespace[] = " \t\r\n";
static const char testexe[] = "_test.exe";
......@@ -219,43 +212,6 @@ static const char* get_test_source_file(const char* test, const char* subtest)
return buffer;
}
static const char* get_file_rev(const char* file)
{
const struct rev_info* rev;
for(rev = rev_infos; rev->file; rev++) {
if (strcmp(rev->file, file) == 0) return rev->rev;
}
return "-";
}
static void extract_rev_infos (void)
{
char revinfo[256], *p;
int size = 0, i;
unsigned int len;
HMODULE module = GetModuleHandle (NULL);
for (i = 0; TRUE; i++) {
if (i >= size) {
size += 100;
rev_infos = xrealloc (rev_infos, size * sizeof (*rev_infos));
}
memset(rev_infos + i, 0, sizeof(rev_infos[i]));
len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo));
if (len == 0) break; /* end of revision info */
if (len >= sizeof(revinfo) - 1)
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);
}
}
static void* extract_rcdata (LPTSTR name, int type, DWORD* size)
{
HRSRC rsrc;
......@@ -454,10 +410,9 @@ run_test (struct wine_test* test, const char* subtest, const char *tempdir)
{
int status;
const char* file = get_test_source_file(test->name, subtest);
const char* rev = get_file_rev(file);
char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
xprintf ("%s:%s start %s %s\n", test->name, subtest, file, rev);
xprintf ("%s:%s start %s -\n", test->name, subtest, file);
status = run_ex (cmd, NULL, tempdir, 120000);
free (cmd);
xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
......@@ -544,10 +499,8 @@ run_tests (char *logname)
report (R_DIR, tempdir);
xprintf ("Version 4\n");
strres = extract_rcdata (MAKEINTRESOURCE(WINE_BUILD), STRINGRES, &strsize);
xprintf ("Tests from build ");
if (LoadStringA( 0, IDS_BUILD_ID, build, sizeof(build) )) xprintf( "%s\n", build );
else if (strres) xprintf ("%.*s", strsize, strres);
else xprintf ("-\n");
strres = extract_rcdata (MAKEINTRESOURCE(TESTS_URL), STRINGRES, &strsize);
xprintf ("Archive: ");
......@@ -640,9 +593,6 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
int poweroff = 0;
int interactive = 1;
/* initialize the revision information first */
extract_rev_infos();
cmdLine = strtok (cmdLine, whitespace);
while (cmdLine) {
if (cmdLine[0] != '-' || cmdLine[2]) {
......
#!/bin/sh
TOPSRCDIR="$1"
shift
echo "/* Automatically generated -- do not edit! */"
echo "STRINGTABLE {"
i=0
cd $TOPSRCDIR
if [ -d .git ]
then
git-ls-files -c -s --abbrev=10 -- "dlls/*/tests/*.c" |\
sed -ne "s|^[0-7]* \([0-9a-f]*\) [0-9] \(.*\)$|\2:\1|p"
else
for dir in dlls/*/tests; do
sed -ne "s|^/\([^.]*.c\)/\([^/]*\).*|$dir/\1:\2|p" $dir/CVS/Entries 2>/dev/null
done
fi |\
while read line; do
echo "REV_INFO+$i \"$line\""
i=`expr $i + 1`
done
echo "}"
......@@ -51,9 +51,5 @@
/* String resources */
#define WINE_BUILD 10000
#define BUILD_INFO 10001
#define TESTS_URL 10002
/* Revision info strings start from this index: */
#define REV_INFO 30000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment