10#ifndef rtitest_setting_h
11#define rtitest_setting_h
22#include "rtitest/test_log.h"
23#include "rtitest/test_dll.h"
24#include "rtitest/test_assert.h"
25#include "rtitest/test_types.h"
26#include "rtitest/test_time.h"
28#define RTI_TEST_MAX_FILE_NAME_LENGTH (1024)
29#define RTI_TEST_MAX_USER_LENGTH (128)
31#if defined(RTI_WIN32) || defined(RTI_WINCE)
32 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (1)
33#elif defined(RTI_VXWORKS)
34 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (99)
35#elif defined(RTI_LYNX)
36 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (18)
37#elif defined(RTI_PSOS)
38 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (101)
39#elif defined(RTI_NETOS)
40 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (16)
41#elif defined(RTI_INTY)
42 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (17)
44 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (10)
46 #define RTI_TEST_RECEIVE_THREAD_PRIORITY (-9999999)
131struct RTITestNumber {
133 int submoduleTestNumber;
182struct RTITestSetting {
196 struct RTITestNumber begin;
212 struct RTITestNumber end;
215 RTITestLogBitmap instrumentationMask;
228 int runInteractiveTest;
245 int testOdbcDatabases;
251 int keepOdbcResources;
268 const char *database;
279 char user[RTI_TEST_MAX_USER_LENGTH];
289 char _jUnitOutputFile[RTI_TEST_MAX_FILE_NAME_LENGTH + 1];
294 FILE *_jUnitOutputFD;
321 int noWritableFileSystem;
329 unsigned int numberOfRepeats;
337 int globalIndividualUnitTestRetryCount;
349 int enableHeapMonitoring;
354 int enableNetworkCapture;
366 int detectInterferingParticipants;
372 RTIBool enableLeakSanitizerCheck;
410extern RTITestDllExport
void RTITestSetting_set(
411 struct RTITestSetting *setting,
416 RTITestLogBitmap submodMask,
417 RTITestLogBitmap instMask,
420 int runInteractiveTest);
462extern RTITestDllExport
int RTITestSetting_parseArgumentFromString(
463 struct RTITestSetting *setting,
510 struct RTITestSetting *setting,
514#if defined(RTI_WINCE)
545extern RTITestDllExport
int RTITestSetting_parseWcharArgument(
546 struct RTITestSetting *setting,
573 RTI_TEST_LEVEL_SUBMODULE
599 const struct RTITestSetting *setting,
602 RTITestLevel currentLevel);
614extern RTITestDllExport RTIBool
615RTITestSetting_isRangeSpecified(
int begin,
int end);
643 const struct RTITestSetting *setting);
679 const struct RTITestSetting *setting,
680 const char *methodName,
701 const struct RTITestSetting *setting,
702 const char *methodName,
706 int testCountAdditional,
717extern RTITestDllVariable
int RTITestSetting_g_individualUnitTestRetryCount;
729extern RTITestDllExport
void RTITestSetting_retryIfFailed(
730 const struct RTITestSetting *setting,
755extern RTITestDllExport RTIBool RTITestSetting_getFullResourcePathFileName(
756 const struct RTITestSetting *setting,
757 char *fullPathFileName,
758 const char *relativeResourcePathFileName);
768extern RTITestDllExport RTIBool RTITestSetting_getFullResourcePathFileNameEx(
769 const struct RTITestSetting *setting,
770 char *fullPathFileName,
771 const char *resourceRelativePath,
772 const char *relativeResourcePathFileName);
780extern RTITestDllExport
781void RTITestSetting_logNetworkCaptureNotSupportedMessage(
void);
783#ifndef RTI_TEST_EXAMPLE_RELATIVE_PATH
785 #define RTI_TEST_EXAMPLE_RELATIVE_PATH "/sdcard/example"
787 #define RTI_TEST_EXAMPLE_RELATIVE_PATH "../../example"
791#ifndef RTI_TEST_RESOURCE_RELATIVE_PATH
793 #define RTI_TEST_RESOURCE_RELATIVE_PATH "/sdcard/resource"
795 #define RTI_TEST_RESOURCE_RELATIVE_PATH "../../resource"
814extern RTITestDllExport RTIBool RTITestSetting_getFullExamplePathFileName(
815 const struct RTITestSetting *setting,
816 char *fullPathFileName,
817 const char *relativeExamplePathFileName);
827extern RTITestDllExport RTIBool RTITestSetting_getFullExamplePathFileNameEx(
828 const struct RTITestSetting *setting,
829 char *fullPathFileName,
830 const char *exampleRelativePath,
831 const char *relativeExamplePathFileName);
845extern RTITestDllExport RTIBool RTITestSetting_getExecutableFullPathFileName(
846 const struct RTITestSetting *setting,
847 char *fullPathFileName);
854extern RTITestDllExport RTIBool
855RTITestSetting_fileTestIsSupport(
const struct RTITestSetting *setting);
862extern RTITestDllExport RTIBool
863RTITestSetting_fileSystemIsWritable(
const struct RTITestSetting *setting);
877extern RTITestDllExport FILE *RTITestSetting_createTempFile(
878 const struct RTITestSetting *setting,
879 char *fullPathFileName,
880 const char *relativeFileName,
881 const char *fileAccessMode);
896 struct RTITestSetting *setting);
921extern RTITestDllExport RTIBool RTITestSetting_getTempFileName(
923 size_t fileNameMaxSize,
924 const char *filePrefix,
925 const char *fileSuffix);
934extern RTITestDllExport
935RTIBool RTITestSetting_isLowMemoryParticipantQosSetting(
void);
944extern RTITestDllExport
945RTIBool RTITestSetting_isMinimalValidationArchitecture(
void);
956extern RTITestDllExport
957RTIBool RTITestSetting_isExtendedValidationArchitecture(
void);
966extern RTITestDllExport
967RTIBool RTITestSetting_isCoreBasicPubSubValidationArchitecture(
void);
974extern RTITestDllExport
975RTIBool RTITestSetting_disableShmem(
void);
1033extern RTITestDllVariable
1034char RTITestSetting_g_networkCaptureFileNamePrefix[
1035 RTI_TEST_MAX_FILE_NAME_LENGTH];
1059extern RTITestDllExport
1060void RTITestSetting_enableAndStartNetworkCaptureSupport(RTIBool *ok);
1074extern RTITestDllExport
1075void RTITestSetting_stopAndDisableNetworkCaptureSupport(
1082#define RTITestSetting_getTestCount(testArray) \
1083 (sizeof((testArray)) / sizeof(RTITestFunction))
1089#define RTITestSetting_getDomainId(setting) \
1090 ((setting->id == 0) ? TEST_DOMAIN : setting->id)
1110extern RTITestDllExport RTIBool RTITestSetting_isSetupInitialized(
void);
1116extern RTITestDllExport
void RTITestSetting_initializeSetup(
void);
1122#include "rtitest/test_setting_impl.h"
#define RTITestReturnCode
Return code used for tests.
Definition: test_types.h:48
RTITestReturnCode(* RTITestFunction)(const struct RTITestSetting *setting)
Function prototype for all tests.
Definition: test_setting.h:642
void RTITestSetting_init(struct RTITestSetting *setting)
Fill setting with default values.
int RTITestSetting_getCurrentNumberOfRetries(void)
Get the current number of retries.
void RTITestSetting_getRange(const struct RTITestSetting *setting, int *begin, int *end, RTITestLevel currentLevel)
Given the test setting and the test level, this function extracts the index of the first and last tes...
void RTITestSetting_printComplete(const char *methodName)
Printout to indicate completion of a Tester.
int RTITestSetting_enableHeapMonitoringSupport(void)
Enables heap monitoring support.
RTIBool RTITestSetting_parseArgument(struct RTITestSetting *setting, int argCount, char **argv)
Parses command-line arguments to initialize an RTITestSetting structure.
void RTITestSetting_disableHeapMonitoringSupport(int *ok)
Disables heap monitoring support and checks if there are memory leaks.
RTITestReturnCode RTITestSetting_runTests(const struct RTITestSetting *setting, const char *methodName, const RTITestFunction *test, int testCount, int begin, int end)
Given a set of tests and a test setting, run a subset of these tests with that test setting.