reactos/rostests/drivers/kmtest/kmtest.h
Cameron Gutman afcd401a32 [KMTEST]
- Add support for recovering from crashed tests
- Add check to prevent us from running the test every boot
- Delete some useless code
- Record test result information in the registry
- Under the Kmtest\Parameters key, you will find CurrentStage which is the stage that testing is on (almost always 8 if it boots). You will also find <Test Name>SuccessCount which is the number of successful tests, <Test Name>FailureCount which is the number of failed tests, <Test Name>TotalCount which is the total number of tests, and <Test Name>SkippedCount which is the number of tests that have been skipped
- Enjoy your reg testing! :)

svn path=/trunk/; revision=47309
2010-05-22 18:34:01 +00:00

55 lines
1.5 KiB
C

#ifndef KMTEST_H
#define KMTEST_H
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "ntddk.h"
/*
Some macros, structs, and vars are based or inspired from the great
Wine regression tests Copyright (C) 2002 Alexandre Julliard.
Everything else is done by Aleksey Bragin based on PnPTest by Filip Navara
*/
extern LONG successes; /* number of successful tests */
extern LONG failures; /* number of failures */
//static ULONG todo_successes; /* number of successful tests inside todo block */
//static ULONG todo_failures; /* number of failures inside todo block */
// We don't do multithreading, so we just keep this struct in a global var
typedef struct
{
const char* current_file; /* file of current check */
int current_line; /* line of current check */
int todo_level; /* current todo nesting level */
int todo_do_loop;
} tls_data;
extern tls_data glob_data;
VOID StartTest();
VOID FinishTest(HANDLE KeyHandle, LPWSTR TestName);
void kmtest_set_location(const char* file, int line);
#ifdef __GNUC__
extern int kmtest_ok( int condition, const char *msg, ... ) __attribute__((format (printf,2,3) ));
#else /* __GNUC__ */
extern int kmtest_ok( int condition, const char *msg, ... );
#endif /* __GNUC__ */
#define ok_(file, line) (kmtest_set_location(file, line), 0) ? 0 : kmtest_ok
#define ok ok_(__FILE__, __LINE__)
PDEVICE_OBJECT AttachDeviceObject;
PDEVICE_OBJECT MainDeviceObject;
PDRIVER_OBJECT ThisDriverObject;
#endif /* KMTEST_H */