Re: question about standalone tests
The STANDALONE stuff is my creation; apologies to anyone offended by it. It does fill a real need, but belongs in wine/test.h, not in each test, I agree. I was being lazy. Now, on to Alexandre's claim: On Tue, May 24, 2005 at 05:24:11PM +0200, Alexandre Julliard wrote:
You should be able to build by simply copying over wine/test.h
Tried that. $ wget -O lzexpand_main.c 'http://cvs.winehq.org/cvsweb/~checkout~/wine/dlls/lzexpand/tests/lzexpand_ma...' $ mkdir wine $ wget -O wine/test.h 'http://cvs.winehq.org/cvsweb/~checkout~/wine/include/wine/test.h?rev=1.14' $ cl -I. -DWINETEST_WANT_MAIN -D_X86_ lzexpand_main.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. lzexpand_main.c h:\demo\x\wine\test.h(128) : error C2065: 'stdout' : undeclared identifier ... Adding #include <stdio.h> to wine/test.h fixes that first problem, but leaves h:\demo\x\wine\test.h(264) : error C2065: 'winetest_testlist' : undeclared identifier ... So including wine/test.h isn't enough at the moment. Maybe there needs to be a #ifdef STANDALONE ... #endif section in wine/test.h that defines winetest_testlist, etc. I just looked, and it's probably easy to do, but somewhat beyond what I want to do at 2 in the morning. (Besides, I'm not supposed to be typing, my wrists are sore.) - Dan -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html
Dan Kegel <dank(a)kegel.com> writes:
Tried that. $ wget -O lzexpand_main.c 'http://cvs.winehq.org/cvsweb/~checkout~/wine/dlls/lzexpand/tests/lzexpand_ma...' $ mkdir wine $ wget -O wine/test.h 'http://cvs.winehq.org/cvsweb/~checkout~/wine/include/wine/test.h?rev=1.14' $ cl -I. -DWINETEST_WANT_MAIN -D_X86_ lzexpand_main.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
lzexpand_main.c h:\demo\x\wine\test.h(128) : error C2065: 'stdout' : undeclared identifier ...
Adding #include <stdio.h> to wine/test.h fixes that first problem, but leaves h:\demo\x\wine\test.h(264) : error C2065: 'winetest_testlist' : undeclared identifier ...
I put in some fixes, it should work better now. -- Alexandre Julliard julliard(a)winehq.org
Alexandre Julliard wrote:
lzexpand_main.c h:\demo\x\wine\test.h(128) : error C2065: 'stdout' : undeclared identifier ...
Adding #include <stdio.h> to wine/test.h fixes that first problem, but leaves h:\demo\x\wine\test.h(264) : error C2065: 'winetest_testlist' : undeclared identifier ...
I put in some fixes, it should work better now.
Looks good, thanks! Now somebody should update http://www.winehq.com/site/docs/wine-devel/testing-windows with a new section sorta like the following (Yeah, I should check this text in, but I gotta run. At least I wrote a first draft, eh?): --- snip --- 5.5.4 Standalone, using the Microsoft C++ Toolkit Sometimes it's nice to be able to build a new unit test on Windows without Wine, and without buying Microsoft Visual C++. Here's the simplest way to do that on a Windows system: Download and install the free-as-in-beer Microsoft C++ Toolkit from http://msdn.microsoft.com/visualc/vctoolkit2003 and the Microsoft Platform SDK (from http://www.microsoft.com/msdownload/platformsdk/sdkupdate using IE5 or later!). Make a directory 'wine' underneath your work directory, and copy the file wine/test.h from the Wine source tree there. (You can download this file from the latest revision at http://cvs.winehq.org/cvsweb/wine/include/wine/test.h ). Copy some existing test from the Wine source tree, or create your test program (say, mytest.c) using Notepad, being sure to begin it with #include <wine/test.h> following the usual Wine test style. Finally, in a command prompt window, compile the test with the command cl -I. -DSTANDALONE -D_X86_ mytest.c Once that's working, try running the program under Wine without recompiling it. See? No Wine source required at all, save for that one header, wine/test.h. (If you want to use the Microsoft C++ Toolkit under Wine, install it under Windows, then copy it to your fake C drive; it'll work fine there. See http://kegel.com/wine/cl-howto.html for some tips on making it easy to use from the Linux commandline.) --- snip --- -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html
On Wed, 2005-05-25 at 09:13 -0700, Dan Kegel wrote:
Now somebody should update
http://www.winehq.com/site/docs/wine-devel/testing-windows
with a new section sorta like the following (Yeah, I should check this text in, but I gotta run. At least I wrote a first draft, eh?):
Thanks for the docs Dan, I've checked them in. -- Dimi Paun <dimi(a)lattica.com> Lattica, Inc.
participants (3)
-
Alexandre Julliard -
Dan Kegel -
Dimi Paun