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

Alexandre Julliard julliard at winehq.org
Tue May 27 06:03:36 CDT 2008


Module: wine
Branch: master
Commit: 808f5c8dedc4793aa96419b5d95b54ed3f725505
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=808f5c8dedc4793aa96419b5d95b54ed3f725505

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May 27 11:32:34 2008 +0200

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

---

 programs/winetest/Makefile.in |    7 +----
 programs/winetest/dist.rc     |    4 ---
 programs/winetest/main.c      |   52 +----------------------------------------
 programs/winetest/maketest    |   25 -------------------
 programs/winetest/resource.h  |    4 ---
 5 files changed, 3 insertions(+), 89 deletions(-)

diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in
index 03c5dae..e7c6fb6 100644
--- a/programs/winetest/Makefile.in
+++ b/programs/winetest/Makefile.in
@@ -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
diff --git a/programs/winetest/dist.rc b/programs/winetest/dist.rc
index 111bf9c..e7080db 100644
--- a/programs/winetest/dist.rc
+++ b/programs/winetest/dist.rc
@@ -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"
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index 90c4449..b83d03c 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -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]) {
diff --git a/programs/winetest/maketest b/programs/winetest/maketest
deleted file mode 100755
index ff4d88b..0000000
--- a/programs/winetest/maketest
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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 "}"
diff --git a/programs/winetest/resource.h b/programs/winetest/resource.h
index a40c089..4b21491 100644
--- a/programs/winetest/resource.h
+++ b/programs/winetest/resource.h
@@ -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




More information about the wine-cvs mailing list