[KMTESTS]

- add a minimal example test so there's something to see when running kmtest
- remove _DLL and __USE_CRTIMP in accordance with r52213

svn path=/branches/GSoC_2011/KMTestSuite/; revision=52215
This commit is contained in:
Thomas Faber 2011-06-13 17:29:02 +00:00
parent e95992c699
commit 1de7bf0885
4 changed files with 24 additions and 2 deletions

View file

@ -14,6 +14,8 @@ list(APPEND KMTEST_DRV_SOURCE
kmtest_drv/log.c
kmtest_drv/testlist.c
example/Example.c
kmtest_drv/kmtest_drv.rc)
add_library(kmtest_drv SHARED ${KMTEST_DRV_SOURCE})
@ -29,8 +31,6 @@ add_cd_file(TARGET kmtest_drv DESTINATION reactos/system32/drivers FOR all)
#
set_rc_compiler()
add_definitions(-D_DLL -D__USE_CRTIMP)
list(APPEND KMTEST_SOURCE
kmtest/kmtest.c
kmtest/service.c

16
kmtests/example/Example.c Normal file
View file

@ -0,0 +1,16 @@
/*
* PROJECT: ReactOS kernel-mode tests
* LICENSE: GPLv2+ - See COPYING in the top level directory
* PURPOSE: Kernel-Mode Test Suite Example Test kernel-mode part
* PROGRAMMER: Thomas Faber <thfabba@gmx.de>
*/
#include <ntddk.h>
#include <kmt_test.h>
#include <kmt_log.h>
VOID Test_Example(VOID)
{
/* TODO: this should be trace(), as in winetests */
LogPrint("Message from kernel\n");
}

View file

@ -9,4 +9,7 @@
<file>log.c</file>
<file>testlist.c</file>
</directory>
<directory name="example">
<file>Example.c</file>
</directory>
</module>

View file

@ -8,7 +8,10 @@
#include <stddef.h>
#include <kmt_test.h>
KMT_TESTFUNC Test_Example;
const KMT_TEST TestList[] =
{
{ "Example", Test_Example },
{ NULL, NULL }
};