diff --git a/rostests/win32/kernel32/directory.rbuild b/rostests/win32/kernel32/directory.rbuild index 76bca91aaba..8919418f6fa 100644 --- a/rostests/win32/kernel32/directory.rbuild +++ b/rostests/win32/kernel32/directory.rbuild @@ -1,6 +1,6 @@ - + diff --git a/rostests/win32/kernel32/tests/kernel32.rbuild b/rostests/win32/kernel32/tests/kernel32.rbuild index f0812f2131a..d0c1243f342 100644 --- a/rostests/win32/kernel32/tests/kernel32.rbuild +++ b/rostests/win32/kernel32/tests/kernel32.rbuild @@ -1,3 +1,6 @@ + + + . . @@ -20,3 +23,4 @@ CreateFile.c + diff --git a/rostests/win32/smss/smss.rbuild b/rostests/win32/smss/smss.rbuild index 20ff30e2965..c1d1dc15a38 100644 --- a/rostests/win32/smss/smss.rbuild +++ b/rostests/win32/smss/smss.rbuild @@ -1,6 +1,6 @@ - + diff --git a/rostests/win32/testsets.rbuild b/rostests/win32/testsets.rbuild index dab72d01171..24a94a863c7 100644 --- a/rostests/win32/testsets.rbuild +++ b/rostests/win32/testsets.rbuild @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/rostests/win32/user32/drawcaption/drawcaption.rbuild b/rostests/win32/user32/drawcaption/drawcaption.rbuild index 9593d201568..10c7ae459fa 100644 --- a/rostests/win32/user32/drawcaption/drawcaption.rbuild +++ b/rostests/win32/user32/drawcaption/drawcaption.rbuild @@ -1,3 +1,6 @@ + + + . @@ -27,3 +30,4 @@ capicon.c capicon.rc + \ No newline at end of file diff --git a/rostests/win32/user32/user32.rbuild b/rostests/win32/user32/user32.rbuild index b2097ac0df8..dcb5c66ed7b 100644 --- a/rostests/win32/user32/user32.rbuild +++ b/rostests/win32/user32/user32.rbuild @@ -1,6 +1,6 @@ - + diff --git a/rostests/winetests/directory.rbuild b/rostests/winetests/directory.rbuild index 983cb14b7b4..f35fb77eb6a 100644 --- a/rostests/winetests/directory.rbuild +++ b/rostests/winetests/directory.rbuild @@ -124,4 +124,9 @@ + diff --git a/rostests/winetests/rpcrt4/rpcrt4.rbuild b/rostests/winetests/rpcrt4/rpcrt4.rbuild index 5e8209495e0..c1044b37d9a 100644 --- a/rostests/winetests/rpcrt4/rpcrt4.rbuild +++ b/rostests/winetests/rpcrt4/rpcrt4.rbuild @@ -1,27 +1,31 @@ - - server.idl - - - server.idl - - - . - . - - wine - pseh - ole32 - uuid - rpcrt4_winetest_server - rpcrt4_winetest_client - rpcrt4 - kernel32 - ntdll - cstub.c - generated.c - ndr_marshall.c - rpc.c - rpc_async.c - server.c - testlist.c - + + + + + server.idl + + + server.idl + + + . + . + + wine + pseh + ole32 + uuid + rpcrt4_winetest_server + rpcrt4_winetest_client + rpcrt4 + kernel32 + ntdll + cstub.c + generated.c + ndr_marshall.c + rpc.c + rpc_async.c + server.c + testlist.c + + \ No newline at end of file diff --git a/rostests/winetests/winetest/dist.rc b/rostests/winetests/winetest/dist.rc index 50a22886126..34e2bf17f43 100644 --- a/rostests/winetests/winetest/dist.rc +++ b/rostests/winetests/winetest/dist.rc @@ -15,11 +15,17 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "winetest.rc" +#include "tests.rc" -WINE_BUILD STRINGRES "build.id" -BUILD_INFO STRINGRES "build.nfo" -TESTS_URL STRINGRES "tests.url" +/* @makedep: build.id */ +//WINE_BUILD STRINGRES "build.id" + +/* @makedep: build.nfo */ +//BUILD_INFO STRINGRES "build.nfo" + +/* @makedep: tests.url */ +//TESTS_URL STRINGRES "tests.url" diff --git a/rostests/winetests/winetest/gui.c b/rostests/winetests/winetest/gui.c index b0178a68c36..b7386791f49 100644 --- a/rostests/winetests/winetest/gui.c +++ b/rostests/winetests/winetest/gui.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include @@ -130,7 +130,7 @@ guiStep (va_list ap) { const int pgID = IDC_ST0 + progressGroup * 2; char *str = vstrmake (NULL, ap); - + progressCurr++; SetDlgItemText (dialog, pgID, str); SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS, @@ -323,7 +323,7 @@ EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return CallWindowProcA (DefEditProc, hwnd, msg, wParam, lParam); } -static BOOL CALLBACK +static INT_PTR CALLBACK AskTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { int len; @@ -376,7 +376,7 @@ qAsk (va_list ap) return MBdefault (va_arg (ap, int)); } -static BOOL CALLBACK +static INT_PTR CALLBACK AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -390,7 +390,7 @@ AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return FALSE; } -static BOOL CALLBACK +static INT_PTR CALLBACK DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -518,7 +518,7 @@ report (enum report_type t, ...) } } } - + va_start (ap, t); if (t < sizeof text_funcs / sizeof text_funcs[0] && t < sizeof GUI_funcs / sizeof GUI_funcs[0]) ret = funcs[t](ap); diff --git a/rostests/winetests/winetest/main.c b/rostests/winetests/winetest/main.c index c00853523c4..ce5b5adc04a 100644 --- a/rostests/winetests/winetest/main.c +++ b/rostests/winetests/winetest/main.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * This program is dedicated to Anna Lindh, * Swedish Minister of Foreign Affairs. @@ -39,6 +39,7 @@ #include "winetest.h" #include "resource.h" +#include struct wine_test { @@ -57,8 +58,43 @@ struct rev_info 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"; + +static char * get_file_version(char * file_name) +{ + static char version[32]; + DWORD size; + DWORD handle; + + size = GetFileVersionInfoSizeA(file_name, &handle); + if (size) { + char * data = xmalloc(size); + if (data) { + if (GetFileVersionInfoA(file_name, handle, size, data)) { + static char backslash[] = "\\"; + VS_FIXEDFILEINFO *pFixedVersionInfo; + UINT len; + if (VerQueryValueA(data, backslash, (LPVOID *)&pFixedVersionInfo, &len)) { + sprintf(version, "%d.%d.%d.%d", + pFixedVersionInfo->dwFileVersionMS >> 16, + pFixedVersionInfo->dwFileVersionMS & 0xffff, + pFixedVersionInfo->dwFileVersionLS >> 16, + pFixedVersionInfo->dwFileVersionLS & 0xffff); + } else + sprintf(version, "version not available"); + } else + sprintf(version, "unknown"); + free(data); + } else + sprintf(version, "failed"); + } else + sprintf(version, "version not available"); + + return version; +} static int running_under_wine (void) { @@ -96,6 +132,8 @@ static void print_version (void) { OSVERSIONINFOEX ver; BOOL ext; + int is_win2k3_r2; + const char *(*wine_get_build_id)(void); ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); if (!(ext = GetVersionEx ((OSVERSIONINFO *) &ver))) @@ -112,6 +150,13 @@ static void print_version (void) ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber, ver.dwPlatformId, ver.szCSDVersion); + wine_get_build_id = (void *)GetProcAddress(GetModuleHandleA("ntdll.dll"), "wine_get_build_id"); + if (wine_get_build_id) xprintf( " WineBuild=%s\n", wine_get_build_id() ); + + is_win2k3_r2 = GetSystemMetrics(SM_SERVERR2); + if(is_win2k3_r2) + xprintf(" R2 build number=%d\n", is_win2k3_r2); + if (!ext) return; xprintf (" wServicePackMajor=%d\n wServicePackMinor=%d\n" @@ -159,10 +204,7 @@ static void remove_dir (const char *dir) static const char* get_test_source_file(const char* test, const char* subtest) { static const char* special_dirs[][2] = { - { "gdi32", "gdi"}, { "kernel32", "kernel" }, - { "msacm32", "msacm" }, - { "user32", "user" }, { "winspool.drv", "winspool" }, - { "ws2_32", "winsock" }, { 0, 0 } + { 0, 0 } }; static char buffer[MAX_PATH]; int i; @@ -181,7 +223,7 @@ static const char* get_test_source_file(const char* test, const char* subtest) 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; } @@ -205,7 +247,7 @@ static void extract_rev_infos (void) len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo)); if (len == 0) break; /* end of revision info */ - if (len >= sizeof(revinfo) - 1) + 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); @@ -215,13 +257,13 @@ static void extract_rev_infos (void) } } -static void* extract_rcdata (int id, int type, DWORD* size) +static void* extract_rcdata (LPTSTR name, int type, DWORD* size) { HRSRC rsrc; HGLOBAL hdl; LPVOID addr; - - if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) || + + if (!(rsrc = FindResource (NULL, name, MAKEINTRESOURCE(type))) || !(*size = SizeofResource (0, rsrc)) || !(hdl = LoadResource (0, rsrc)) || !(addr = LockResource (hdl))) @@ -231,26 +273,19 @@ static void* extract_rcdata (int id, int type, DWORD* size) /* Fills in the name and exename fields */ static void -extract_test (struct wine_test *test, const char *dir, int id) +extract_test (struct wine_test *test, const char *dir, LPTSTR res_name) { BYTE* code; DWORD size; FILE* fout; - int strlen, bufflen = 128; char *exepos; - code = extract_rcdata (id, TESTRES, &size); - if (!code) report (R_FATAL, "Can't find test resource %d: %d", - id, GetLastError ()); - test->name = xmalloc (bufflen); - while ((strlen = LoadStringA (NULL, id, test->name, bufflen)) - == bufflen - 1) { - bufflen *= 2; - test->name = xrealloc (test->name, bufflen); - } - if (!strlen) report (R_FATAL, "Can't read name of test %d.", id); + code = extract_rcdata (res_name, TESTRES, &size); + if (!code) report (R_FATAL, "Can't find test resource %s: %d", + res_name, GetLastError ()); + test->name = xstrdup( res_name ); test->exename = strmake (NULL, "%s/%s", dir, test->name); - exepos = strstr (test->name, "_test.exe"); + exepos = strstr (test->name, testexe); if (!exepos) report (R_FATAL, "Not an .exe file: %s", test->name); *exepos = 0; test->name = xrealloc (test->name, exepos - test->name + 1); @@ -269,7 +304,7 @@ extract_test (struct wine_test *test, const char *dir, int id) value of WaitForSingleObject. */ static int -run_ex (char *cmd, const char *out, DWORD ms) +run_ex (char *cmd, const char *out, const char *tempdir, DWORD ms) { STARTUPINFO si; PROCESS_INFORMATION pi; @@ -277,8 +312,7 @@ run_ex (char *cmd, const char *out, DWORD ms) DWORD wait, status; GetStartupInfo (&si); - si.wShowWindow = SW_HIDE; - si.dwFlags = STARTF_USESHOWWINDOW; + si.dwFlags = 0; if (out) { fd = open (out, O_WRONLY | O_CREAT, 0666); @@ -292,8 +326,8 @@ run_ex (char *cmd, const char *out, DWORD ms) close (fd); } - if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0, - NULL, NULL, &si, &pi)) { + if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, + NULL, tempdir, &si, &pi)) { status = -2; } else { CloseHandle (pi.hThread); @@ -346,7 +380,7 @@ run_ex (char *cmd, const char *out, DWORD ms) } static void -get_subtests (const char *tempdir, struct wine_test *test, int id) +get_subtests (const char *tempdir, struct wine_test *test, LPTSTR res_name) { char *subname, *cmd; FILE *subfile; @@ -360,9 +394,9 @@ get_subtests (const char *tempdir, struct wine_test *test, int id) subname = tempnam (0, "sub"); if (!subname) report (R_FATAL, "Can't name subtests file."); - extract_test (test, tempdir, id); + extract_test (test, tempdir, res_name); cmd = strmake (NULL, "%s --list", test->exename); - run_ex (cmd, subname, 5000); + run_ex (cmd, subname, tempdir, 5000); free (cmd); subfile = fopen (subname, "r"); @@ -411,7 +445,7 @@ get_subtests (const char *tempdir, struct wine_test *test, int id) } static void -run_test (struct wine_test* test, const char* subtest) +run_test (struct wine_test* test, const char* subtest, const char *tempdir) { int status; const char* file = get_test_source_file(test->name, subtest); @@ -419,7 +453,7 @@ run_test (struct wine_test* test, const char* subtest) char *cmd = strmake (NULL, "%s %s", test->exename, subtest); xprintf ("%s:%s start %s %s\n", test->name, subtest, file, rev); - status = run_ex (cmd, NULL, 120000); + status = run_ex (cmd, NULL, tempdir, 120000); free (cmd); xprintf ("%s:%s done (%d)\n", test->name, subtest, status); } @@ -432,14 +466,43 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType, return TRUE; } +static BOOL CALLBACK +extract_test_proc (HMODULE hModule, LPCTSTR lpszType, + LPTSTR lpszName, LONG_PTR lParam) +{ + const char *tempdir = (const char *)lParam; + char dllname[MAX_PATH]; + HMODULE dll; + + /* Check if the main dll is present on this system */ + CharLowerA(lpszName); + strcpy(dllname, lpszName); + *strstr(dllname, testexe) = 0; + + dll = LoadLibraryExA(dllname, NULL, LOAD_LIBRARY_AS_DATAFILE); + if (!dll) { + xprintf (" %s=dll is missing\n", dllname); + return TRUE; + } + FreeLibrary(dll); + + xprintf (" %s=%s\n", dllname, get_file_version(dllname)); + + get_subtests( tempdir, &wine_tests[nr_of_files], lpszName ); + nr_of_tests += wine_tests[nr_of_files].subtest_count; + nr_of_files++; + return TRUE; +} + static char * run_tests (char *logname) { - int nr_of_files = 0, nr_of_tests = 0, i; + int i; char *tempdir, *shorttempdir; int logfile; char *strres, *eol, *nextline; DWORD strsize; + char build[64]; SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); @@ -475,18 +538,19 @@ run_tests (char *logname) report (R_FATAL, "Could not create directory: %s", tempdir); report (R_DIR, tempdir); - xprintf ("Version 3\n"); - strres = extract_rcdata (WINE_BUILD, STRINGRES, &strsize); + xprintf ("Version 4\n"); + strres = extract_rcdata (MAKEINTRESOURCE(WINE_BUILD), STRINGRES, &strsize); xprintf ("Tests from build "); - if (strres) xprintf ("%.*s", strsize, strres); + 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 (TESTS_URL, STRINGRES, &strsize); + strres = extract_rcdata (MAKEINTRESOURCE(TESTS_URL), STRINGRES, &strsize); xprintf ("Archive: "); if (strres) xprintf ("%.*s", strsize, strres); else xprintf ("-\n"); xprintf ("Tag: %s\n", tag); xprintf ("Build info:\n"); - strres = extract_rcdata (BUILD_INFO, STRINGRES, &strsize); + strres = extract_rcdata (MAKEINTRESOURCE(BUILD_INFO), STRINGRES, &strsize); while (strres) { eol = memchr (strres, '\n', strsize); if (!eol) { @@ -502,7 +566,7 @@ run_tests (char *logname) } xprintf ("Operating system version:\n"); print_version (); - xprintf ("Test output:\n" ); + xprintf ("Dll info:\n" ); report (R_STATUS, "Counting tests"); if (!EnumResourceNames (NULL, MAKEINTRESOURCE(TESTRES), @@ -513,10 +577,15 @@ run_tests (char *logname) report (R_STATUS, "Extracting tests"); report (R_PROGRESS, 0, nr_of_files); - for (i = 0; i < nr_of_files; i++) { - get_subtests (tempdir, wine_tests+i, i); - nr_of_tests += wine_tests[i].subtest_count; - } + nr_of_files = 0; + nr_of_tests = 0; + if (!EnumResourceNames (NULL, MAKEINTRESOURCE(TESTRES), + extract_test_proc, (LPARAM)tempdir)) + report (R_FATAL, "Can't enumerate test files: %d", + GetLastError ()); + + xprintf ("Test output:\n" ); + report (R_DELTA, 0, "Extracting: Done"); report (R_STATUS, "Running tests"); @@ -528,7 +597,7 @@ run_tests (char *logname) for (j = 0; j < test->subtest_count; j++) { report (R_STEP, "Running: %s:%s", test->name, test->subtests[j]); - run_test (test, test->subtests[j]); + run_test (test, test->subtests[j], tempdir); } } report (R_DELTA, 0, "Running: Done"); @@ -545,15 +614,16 @@ run_tests (char *logname) static void usage (void) { - fprintf (stderr, "\ -Usage: winetest [OPTION]...\n\n\ - -c console mode, no GUI\n\ - -e preserve the environment\n\ - -h print this message and exit\n\ - -q quiet mode, no output at all\n\ - -o FILE put report into FILE, do not submit\n\ - -s FILE submit FILE, do not run tests\n\ - -t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n"); + fprintf (stderr, +"Usage: winetest [OPTION]...\n\n" +" -c console mode, no GUI\n" +" -e preserve the environment\n" +" -h print this message and exit\n" +" -p shutdown when the tests are done\n" +" -q quiet mode, no output at all\n" +" -o FILE put report into FILE, do not submit\n" +" -s FILE submit FILE, do not run tests\n" +" -t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n"); } int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, @@ -562,6 +632,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, char *logname = NULL; const char *cp, *submit = NULL; int reset_env = 1; + int poweroff = 0; int interactive = 1; /* initialize the revision information first */ @@ -583,8 +654,12 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, reset_env = 0; break; case 'h': + case '?': usage (); exit (0); + case 'p': + poweroff = 1; + break; case 'q': report (R_QUIET); interactive = 0; @@ -618,15 +693,24 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, cmdLine = strtok (NULL, whitespace); } if (!submit) { + static CHAR platform_windows[] = "WINETEST_PLATFORM=windows", + platform_wine[] = "WINETEST_PLATFORM=wine", + debug_yes[] = "WINETEST_DEBUG=1", + interactive_no[] = "WINETEST_INTERACTIVE=0", + report_success_no[] = "WINETEST_REPORT_SUCCESS=0"; + CHAR *platform; + report (R_STATUS, "Starting up"); if (!running_on_visible_desktop ()) report (R_FATAL, "Tests must be run on a visible desktop"); - if (reset_env && (putenv ("WINETEST_PLATFORM=windows") || - putenv ("WINETEST_DEBUG=1") || - putenv ("WINETEST_INTERACTIVE=0") || - putenv ("WINETEST_REPORT_SUCCESS=0"))) + platform = running_under_wine () ? platform_wine : platform_windows; + + if (reset_env && (putenv (platform) || + putenv (debug_yes) || + putenv (interactive_no) || + putenv (report_success_no))) report (R_FATAL, "Could not reset environment: %d", errno); if (!tag) { @@ -647,5 +731,21 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, } else run_tests (logname); report (R_STATUS, "Finished"); } + if (poweroff) + { + HANDLE hToken; + TOKEN_PRIVILEGES npr; + + /* enable the shutdown privilege for the current process */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) + { + LookupPrivilegeValueA(0, SE_SHUTDOWN_NAME, &npr.Privileges[0].Luid); + npr.PrivilegeCount = 1; + npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); + CloseHandle(hToken); + } + ExitWindowsEx(EWX_SHUTDOWN | EWX_POWEROFF | EWX_FORCEIFHUNG, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER); + } exit (0); } diff --git a/rostests/winetests/winetest/maketest b/rostests/winetests/winetest/maketest new file mode 100644 index 00000000000..ff4d88b009f --- /dev/null +++ b/rostests/winetests/winetest/maketest @@ -0,0 +1,25 @@ +#!/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/rostests/winetests/winetest/resource.h b/rostests/winetests/winetest/resource.h index 32c58a924ca..a40c089416f 100644 --- a/rostests/winetests/winetest/resource.h +++ b/rostests/winetests/winetest/resource.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #define IDI_WINE 1 @@ -24,6 +24,8 @@ #define IDD_ABOUT 101 #define IDD_TAG 102 +#define IDC_STATIC -1 + #define IDC_ST0 1000 #define IDC_PB0 1001 #define IDC_ST1 1002 @@ -40,6 +42,8 @@ #define IDC_EDIT 4000 #define IDC_ABOUT 4001 +#define IDS_BUILD_ID 1 + /* Resource types */ #define TESTRES 1000 diff --git a/rostests/winetests/winetest/send.c b/rostests/winetests/winetest/send.c index 2e6e11c8a10..4707d45a23c 100644 --- a/rostests/winetests/winetest/send.c +++ b/rostests/winetests/winetest/send.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include @@ -107,7 +107,7 @@ send_file (const char *name) SOCKET s; FILE *f; #define BUFLEN 8192 - unsigned char buffer[BUFLEN+1]; + char buffer[BUFLEN+1]; size_t bytes_read, total, filesize; char *str; int ret; @@ -137,11 +137,11 @@ send_file (const char *name) } fseek (f, 0, SEEK_END); filesize = ftell (f); - if (filesize > 1024*1024) { + if (filesize > 1.5*1024*1024) { report (R_WARNING, - "File too big (%.1f MB > 1 MB); submitting partial report.", + "File too big (%.1f MB > 1.5 MB); submitting partial report.", filesize/1024.0/1024); - filesize = 1024*1024; + filesize = 1.5*1024*1024; } fseek (f, 0, SEEK_SET); @@ -178,7 +178,7 @@ send_file (const char *name) if (send_buf (s, body2, sizeof body2 - 1)) { report (R_WARNING, "Error sending trailer: %d, %d", errno, WSAGetLastError ()); - goto abort2; + goto abort1; } report (R_DELTA, 0, "Network transfer: Done"); diff --git a/rostests/winetests/winetest/tests.rc b/rostests/winetests/winetest/tests.rc index 0450c1852e6..c2a2d77ba83 100644 --- a/rostests/winetests/winetest/tests.rc +++ b/rostests/winetests/winetest/tests.rc @@ -1,8 +1,8 @@ /* Automatically generated -- do not edit! */ #include "resource.h" STRINGTABLE { -0 "advapi32_test.exe" -1 "comctl32_test.exe" +0 "advapi32_winetest.exe" +1 "comctl32_winetest.exe" } -0 TESTRES "../../../../../output-i386/regtests/winetest/advapi32/advapi32_test.exe" -1 TESTRES "output-i386/regtests/winetest/comctl32/comctl32_test.exe" +0 TESTRES "output-i386/modules/rostests/winetests/advapi32/advapi32_winetest.exe" +1 TESTRES "output-i386/modules/rostests/winetests/comctl32/comctl32_winetest.exe" diff --git a/rostests/winetests/winetest/util.c b/rostests/winetests/winetest/util.c index 72a7c654a2e..12c607347f9 100644 --- a/rostests/winetests/winetest/util.c +++ b/rostests/winetests/winetest/util.c @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include @@ -40,6 +40,13 @@ void *xrealloc (void *op, size_t len) return p; } +char *xstrdup( const char *str ) +{ + char *res = strdup( str ); + if (!res) report (R_FATAL, "Out of memory."); + return res; +} + static char *vstrfmtmake (size_t *lenp, const char *fmt, va_list ap) { size_t size = 1000; diff --git a/rostests/winetests/winetest/winetest.h b/rostests/winetests/winetest/winetest.h index 2f2c58a8cd8..043e5ed8770 100644 --- a/rostests/winetests/winetest/winetest.h +++ b/rostests/winetests/winetest/winetest.h @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __WINETESTS_H @@ -30,6 +30,7 @@ void fatal (const char* msg); void warning (const char* msg); void *xmalloc (size_t len); void *xrealloc (void *op, size_t len); +char *xstrdup( const char *str ); void xprintf (const char *fmt, ...); char *vstrmake (size_t *lenp, va_list ap); char *strmake (size_t *lenp, ...); diff --git a/rostests/winetests/winetest/winetest.ico b/rostests/winetests/winetest/winetest.ico new file mode 100644 index 00000000000..169e1794255 Binary files /dev/null and b/rostests/winetests/winetest/winetest.ico differ diff --git a/rostests/winetests/winetest/winetest.rbuild b/rostests/winetests/winetest/winetest.rbuild new file mode 100644 index 00000000000..d060cdedfbe --- /dev/null +++ b/rostests/winetests/winetest/winetest.rbuild @@ -0,0 +1,19 @@ + + + + . + 0x600 + 0x501 + comctl32 + version + user32 + gdi32 + advapi32 + ws2_32 + kernel32 + gui.c + main.c + send.c + util.c + dist.rc + diff --git a/rostests/winetests/winetest/winetest.rc b/rostests/winetests/winetest/winetest.rc index d2414839dcf..def3c0a3903 100644 --- a/rostests/winetests/winetest/winetest.rc +++ b/rostests/winetests/winetest/winetest.rc @@ -15,16 +15,24 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +#include +#include +#include + #include "resource.h" -#include "tests.rc" + +#ifdef BUILD_SHA1 +STRINGTABLE +BEGIN + IDS_BUILD_ID BUILD_SHA1 +END +#endif IDD_TAG DIALOG 0, 0, 150, 65 -STYLE WS_POPUP +STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "No tag supplied" BEGIN CTEXT "Please supply a tag for your report. You can use letters, digits, dashes and periods." @@ -44,7 +52,7 @@ BEGIN CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0, 5, 40, 150, 15 LTEXT "Network transfer:", IDC_ST2, 10, 60, 140, 10 CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0, 5, 70, 150, 10 - + LTEXT "Tag:", IDC_STATIC, 10, 89, 100, 10 EDITTEXT IDC_TAG, 25, 88, 125, 10, ES_READONLY @@ -72,75 +80,90 @@ BEGIN DEFPUSHBUTTON "Close", IDCANCEL, 55, 40, 40, 14 END -/* BINRES wine.ico */ -IDI_WINE ICON "wine.ico" -/* { - '00 00 01 00 02 00 20 20 10 00 00 00 00 00 E8 02' - '00 00 26 00 00 00 10 10 10 00 00 00 00 00 28 01' - '00 00 0E 03 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 39 02' - 'B1 00 23 02 6C 00 0F 03 29 00 1B 02 51 00 FF FF' - 'FF 00 1B 1A 1B 00 1E 02 63 00 33 02 A1 00 08 08' - '08 00 14 03 3C 00 0C 04 1E 00 2E 02 8E 00 10 0F' - '10 00 2A 02 82 00 29 02 7D 00 03 02 04 00 44 44' - '44 44 44 44 44 44 55 44 44 44 44 44 44 44 44 44' - '44 44 44 44 8F FF 84 44 44 44 44 44 44 44 44 44' - '44 44 44 8F F8 F8 44 44 44 44 44 44 44 44 44 44' - '44 44 8F FF F5 44 44 44 44 44 44 44 44 44 44 44' - '44 5C F8 C8 F5 44 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 85 44 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 45 54 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 45 F4 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 45 FF 44 44 44 44 44 44 44 44 44 44' - '44 44 44 44 48 FF F4 44 44 44 44 44 44 44 44 44' - '44 44 44 44 48 23 9A 84 44 44 44 44 44 44 44 44' - '44 44 44 44 42 B7 7E AF 44 44 44 44 44 44 44 44' - '44 44 44 44 49 00 00 EA C4 44 44 44 44 44 44 44' - '44 44 44 44 46 00 00 01 F4 44 44 44 44 44 44 44' - '44 44 44 44 46 00 00 00 9F 44 44 44 44 44 44 44' - '44 44 44 44 46 00 70 00 EF 44 44 44 44 44 44 44' - '44 44 44 44 43 00 00 00 79 F4 44 44 44 44 44 44' - '44 44 44 44 49 00 00 00 0E F4 44 44 44 44 44 44' - '44 44 44 44 42 00 00 00 07 24 44 44 44 44 44 44' - '44 44 44 44 43 B0 00 00 00 34 44 44 44 44 44 44' - '44 44 44 44 4C 30 00 00 00 1F 44 44 44 44 44 44' - '44 44 44 44 48 27 E1 1D B1 2C 44 44 44 44 44 44' - '44 44 44 44 44 A9 CC CF F8 48 C4 44 44 44 44 44' - '44 44 44 44 44 58 44 44 44 45 C4 44 44 44 44 44' - '44 44 44 44 44 4C 44 44 44 44 84 44 44 44 44 44' - '44 44 44 44 44 48 44 44 44 44 C4 44 44 44 44 44' - '44 44 44 44 44 48 C4 44 44 44 C4 44 44 44 44 44' - '44 44 44 44 44 44 F4 44 44 4C C4 44 44 44 44 44' - '44 44 44 44 44 44 84 44 F8 84 44 44 44 44 44 44' - '44 44 44 44 44 44 48 F8 44 44 44 44 44 44 FF FF' - '3F FF FF F0 7F FF FF C0 FF FF FF 03 FF FF FC 03' - 'FF FF FF F3 FF FF FF FB FF FF FF FB FF FF FF F9' - 'FF FF FF F9 FF FF FF F8 FF FF FF F8 7F FF FF F8' - '1F FF FF F8 0F FF FF F8 07 FF FF F8 07 FF FF F8' - '03 FF FF F8 03 FF FF F8 01 FF FF F8 01 FF FF F8' - '01 FF FF F8 01 FF FF F8 00 FF FF F8 00 FF FF FC' - '02 7F FF FC FE 7F FF FE FF 7F FF FE FF 7F FF FE' - '7F 7F FF FF 7E 7F FF FF 71 FF FF FF 8F FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 3A 02 B1 00 0A 06 14 00 12 03' - '33 00 FF FF FF 00 12 12 12 00 0B 0B 0B 00 1B 1B' - '1B 00 25 02 6F 00 2E 02 92 00 1A 02 52 00 36 02' - 'A6 00 15 03 3E 00 04 04 05 00 13 11 19 00 1E 02' - '62 00 2A 02 82 00 33 33 33 CC 43 33 33 33 33 33' - 'CC 5C 33 33 33 33 33 36 C5 53 33 33 33 33 33 33' - '33 43 33 33 33 33 33 33 33 65 33 33 33 33 33 33' - '33 DC 33 33 33 33 33 33 33 17 EC 33 33 33 33 33' - '33 B0 07 53 33 33 33 33 33 90 00 B3 33 33 33 33' - '33 B0 00 FC 33 33 33 33 33 BA 00 A2 33 33 33 33' - '33 C7 88 82 33 33 33 33 33 3D D5 14 43 33 33 33' - '33 35 33 33 53 33 33 33 33 33 53 33 53 33 33 33' - '33 33 C5 5C 33 33 FC 7F 00 00 F0 FF 00 00 E1 FF' - '00 00 FD FF 00 00 FC FF 00 00 FC FF 00 00 FC 3F' - '00 00 FC 1F 00 00 FC 1F 00 00 FC 0F 00 00 FC 0F' - '00 00 FC 0F 00 00 FE 07 00 00 FE F7 00 00 FF 77' - '00 00 FF 0F 00 00' -} */ +/* @makedep: winetest.ico */ +IDI_WINE ICON "winetest.ico" + +/* list of tests (automatically generated by make_makefiles) */ + +/* +advapi32_test.exe TESTRES "advapi32_test.exe" +advpack_test.exe TESTRES "advpack_test.exe" +browseui_test.exe TESTRES "browseui_test.exe" +cabinet_test.exe TESTRES "cabinet_test.exe" +comcat_test.exe TESTRES "comcat_test.exe" +comctl32_test.exe TESTRES "comctl32_test.exe" +comdlg32_test.exe TESTRES "comdlg32_test.exe" +credui_test.exe TESTRES "credui_test.exe" +crypt32_test.exe TESTRES "crypt32_test.exe" +cryptnet_test.exe TESTRES "cryptnet_test.exe" +d3d8_test.exe TESTRES "d3d8_test.exe" +d3d9_test.exe TESTRES "d3d9_test.exe" +d3drm_test.exe TESTRES "d3drm_test.exe" +d3dx8_test.exe TESTRES "d3dx8_test.exe" +d3dx9_36_test.exe TESTRES "d3dx9_36_test.exe" +ddraw_test.exe TESTRES "ddraw_test.exe" +dinput_test.exe TESTRES "dinput_test.exe" +dnsapi_test.exe TESTRES "dnsapi_test.exe" +dplayx_test.exe TESTRES "dplayx_test.exe" +dsound_test.exe TESTRES "dsound_test.exe" +fusion_test.exe TESTRES "fusion_test.exe" +gdi32_test.exe TESTRES "gdi32_test.exe" +gdiplus_test.exe TESTRES "gdiplus_test.exe" +hlink_test.exe TESTRES "hlink_test.exe" +imm32_test.exe TESTRES "imm32_test.exe" +inetcomm_test.exe TESTRES "inetcomm_test.exe" +infosoft_test.exe TESTRES "infosoft_test.exe" +iphlpapi_test.exe TESTRES "iphlpapi_test.exe" +itss_test.exe TESTRES "itss_test.exe" +jscript_test.exe TESTRES "jscript_test.exe" +kernel32_test.exe TESTRES "kernel32_test.exe" +localspl_test.exe TESTRES "localspl_test.exe" +localui_test.exe TESTRES "localui_test.exe" +lz32_test.exe TESTRES "lz32_test.exe" +mapi32_test.exe TESTRES "mapi32_test.exe" +mlang_test.exe TESTRES "mlang_test.exe" +msacm32_test.exe TESTRES "msacm32_test.exe" +mscms_test.exe TESTRES "mscms_test.exe" +mshtml_test.exe TESTRES "mshtml_test.exe" +msi_test.exe TESTRES "msi_test.exe" +msvcrt_test.exe TESTRES "msvcrt_test.exe" +msvcrtd_test.exe TESTRES "msvcrtd_test.exe" +msxml3_test.exe TESTRES "msxml3_test.exe" +netapi32_test.exe TESTRES "netapi32_test.exe" +ntdll_test.exe TESTRES "ntdll_test.exe" +ntdsapi_test.exe TESTRES "ntdsapi_test.exe" +ntprint_test.exe TESTRES "ntprint_test.exe" +odbccp32_test.exe TESTRES "odbccp32_test.exe" +ole32_test.exe TESTRES "ole32_test.exe" +oleaut32_test.exe TESTRES "oleaut32_test.exe" +opengl32_test.exe TESTRES "opengl32_test.exe" +pdh_test.exe TESTRES "pdh_test.exe" +psapi_test.exe TESTRES "psapi_test.exe" +qedit_test.exe TESTRES "qedit_test.exe" +qmgr_test.exe TESTRES "qmgr_test.exe" +quartz_test.exe TESTRES "quartz_test.exe" +riched20_test.exe TESTRES "riched20_test.exe" +riched32_test.exe TESTRES "riched32_test.exe" +rpcrt4_test.exe TESTRES "rpcrt4_test.exe" +rsaenh_test.exe TESTRES "rsaenh_test.exe" +schannel_test.exe TESTRES "schannel_test.exe" +secur32_test.exe TESTRES "secur32_test.exe" +serialui_test.exe TESTRES "serialui_test.exe" +setupapi_test.exe TESTRES "setupapi_test.exe" +shdocvw_test.exe TESTRES "shdocvw_test.exe" +shell32_test.exe TESTRES "shell32_test.exe" +shlwapi_test.exe TESTRES "shlwapi_test.exe" +snmpapi_test.exe TESTRES "snmpapi_test.exe" +spoolss_test.exe TESTRES "spoolss_test.exe" +urlmon_test.exe TESTRES "urlmon_test.exe" +user32_test.exe TESTRES "user32_test.exe" +userenv_test.exe TESTRES "userenv_test.exe" +usp10_test.exe TESTRES "usp10_test.exe" +uxtheme_test.exe TESTRES "uxtheme_test.exe" +version_test.exe TESTRES "version_test.exe" +wininet_test.exe TESTRES "wininet_test.exe" +winmm_test.exe TESTRES "winmm_test.exe" +winspool.drv_test.exe TESTRES "winspool.drv_test.exe" +wintrust_test.exe TESTRES "wintrust_test.exe" +ws2_32_test.exe TESTRES "ws2_32_test.exe" +*/