Go to the documentation of this file.00001 #ifndef VLTMAKETEST_H
00002 #define VLTMAKETEST_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024 #include <string.h>
00025 #include <unistd.h>
00026 #include <signal.h>
00027
00028
00029 #ifndef MAKE_VXWORKS
00030
00031
00032
00033 #include "rtapClasses/rtTypes.h"
00034
00035 #include "db.h"
00036 #include "msg.h"
00037 #include "tims.h"
00038 #include "err.h"
00039 #include "log.h"
00040 #endif
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #define PRINT_ERROR(reason) \
00060 {\
00061 printf("File %s line %d\n", __FILE__, __LINE__); \
00062 printf("Failure: %s\n", reason); \
00063 printf("Error structure\n"); \
00064 printf(" EnvName : %s\n", error.envName); \
00065 printf(" StackId : %x\n", error.stackId.id); \
00066 printf(" SequenceNbr: %d\n", error.sequenceNumber);\
00067 printf(" ModuleId : %s\n", error.moduleId); \
00068 printf(" LocationId : %s\n", error.location); \
00069 printf(" ErrorNumber: %d\n", error.errorNumber); \
00070 printf(" Parameters : %s\n", error.runTimePar); \
00071 errCloseStack(&error); \
00072 }
00073
00074 #define CLEAN(reason) { PRINT_ERROR(reason); goto clean; }
00075 #define ABORT(reason) { PRINT_ERROR(reason); goto abort; }
00076
00077
00078
00079
00080
00081 #define TEST_FAILED(testName) { printf("%s - FAIL\n", testName); exit(EXIT_FAILURE); }
00082 #define TEST_SUCCEEDED(testName) { printf("%s - PASS\n", testName); exit(EXIT_SUCCESS); }
00083
00084
00085
00086
00087
00088 void vltMakeTestProcedure1();
00089 void vltMakeTestProcedure2();
00090
00091
00092 #endif