stage: compile
$(MAKE) install PREFIX=${stagedir} DOSTAGE=yes
-check: compile mkreports check.parse check.il
+check: compile mkreports check.parse check.il check.query_rec
mkreports:
-mkdir -p ${REPORTS}
il_test: il_test.o il_int_test.o il_string_test.o il_msg_test.o
${LINKXX} -o $@ $+ ${default_commonlib} ${CPPUNIT_LIBS} ${EXT_LIBS}
+check.query_rec: test_query_rec
+ ./test_query_rec
+
+test_query_rec: test_query_rec.o
+ ${LINK} $< -o $@ ${JOBID_LIB}
+
test_coverage:
-mkdir coverage
cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check
${STAGE_PERFTEST} ;
clean:
- rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/ test_parse il_test parse.cpp events.tex status.tex
+ rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/ test_parse il_test parse.cpp events.tex status.tex test_query_rec
rm -rvf ${REPORTS}
rm -rvf dist ${package}-*.tar.gz
distclean:
rm -rvf Makefile.inc *.spec debian/
+test_query_rec.o: query_rec.c
+ ${COMPILE} ${CFLAGS} -DGLITE_LB_QUERY_REC_TEST -c $< -o $@
+
%.o: %.c
${COMPILE} ${CFLAGS} -c $<
* Predefined types for query operands
*/
typedef enum _edg_wll_QueryOp{
- EDG_WLL_QUERY_OP_EQUAL, /**< attribute is equal to the operand value \see _edg_wll_QueryRec */
+ EDG_WLL_QUERY_OP_EQUAL=0, /**< attribute is equal to the operand value \see _edg_wll_QueryRec */
EDG_WLL_QUERY_OP_LESS, /**< attribute is grater than the operand value \see _edg_wll_QueryRec */
EDG_WLL_QUERY_OP_GREATER, /**< attribute is less than the operand value \see _edg_wll_QueryRec */
EDG_WLL_QUERY_OP_WITHIN, /**< attribute is in given interval \see _edg_wll_QueryRec */
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
+#ifdef GLITE_LB_QUERY_REC_TEST
#include <assert.h>
+#endif
#include "glite/jobid/cjobid.h"
#include "query_rec.h"
}
}
+
+#ifdef GLITE_LB_QUERY_REC_TEST
+int main() {
+ assert(sizeof(edg_wll_QueryAttrNames) / sizeof(edg_wll_QueryAttrNames[0]) == EDG_WLL_QUERY_ATTR__LAST);
+ assert(sizeof(edg_wll_QueryOpNames) / sizeof(edg_wll_QueryOpNames[0]) == EDG_WLL_QUERY_OP__LAST);
+
+ return 0;
+}
+#endif