langsuffix:=.${lang}
endif
-VPATH=${top_srcdir}/src:${top_srcdir}/examples
+VPATH=${top_srcdir}/src:${top_srcdir}/test:${top_srcdir}/examples
default: all
EX_THRLIBS:=-L${stagedir}/lib -lglite_security_gss_${thrflavour}
HDRS:=glite_gsplugin.h glite_gscompat.h glite_gsplugin-int.h
EXAMPLES:=wscalc_clt_ex wscalc_srv_ex wscalc_srv_ex2
-TESTS:=test_gss test_coverage test_cxx
+TESTS:=test_cxx
STATICLIB:=libglite_security_gsoap_plugin_${nothrflavour}${langflavour}.a
THRSTATICLIB:=libglite_security_gsoap_plugin_${thrflavour}${langflavour}.a
# C/C++ compatibility test
# (C flavour, gsoap 2.7.10 ==> C++ test fails)
check.cxx:
- ${MAKE} lang=cxx ${LTLIB_TEST_S} test_cxx
+ ${MAKE} lang=cxx -f ${top_srcdir}/Makefile ${LTLIB_TEST_S} test_cxx
./test_cxx
-test_coverage:
- -mkdir coverage
- cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check
- cd coverage && for i in ${OBJS}; do gcov -o .libs/ $$i ; done
-
examples: ${EXAMPLES}
all-libs-with-soap:
clean:
rm -rvf ${STATICLIB} ${LTLIB} ${THRSTATICLIB} ${THRLTLIB}
rm -rvf ${LTLIB_S} ${THRLTLIB_S} ${STATICLIB_S} ${THRSTATICLIB_S}
+ rm -rvf ${LTLIB_TEST_S}
rm -rvf *.c *.h *.xml *.nsmap *.o *.lo .libs ${EXAMPLES} ${TESTS}
rm -rvf CalcService.wsdl wscalc.xsd
rm -rvf log.xml project/ rpmbuild/ RPMS/ tgz/
--- /dev/null
+#include <iostream>
+
+#include "stdsoap2.h"
+#include "glite_gsplugin.h"
+
+#define TEST_STR "123456789ABCDEF"
+
+int main() {
+ struct soap *mydlo = NULL;
+ glite_gsplugin_Context gsplugin_ctx = NULL;
+ int ok1, ok2;
+
+ // test 1 - stdsoap2.c compatibility
+ if ((mydlo = soap_new()) == NULL) {
+ std::cerr << "Couldn't create soap" << std::endl;
+ return 1;
+ }
+ soap_set_endpoint(mydlo, TEST_STR);
+ std::cout << mydlo->endpoint << std::endl;
+ ok1 = strcmp(mydlo->endpoint, TEST_STR);
+
+ // test 2 - glite_gsplugin.c compatibility
+ //
+ // not real test, just may crash in bad test case on calling
+ // soap->fdelete where will be other function
+ if ( glite_gsplugin_init_context(&gsplugin_ctx) ) {
+ std::cerr << "Couldn't create gSOAP plugin context" << std::endl;
+ goto err;
+ }
+ if (soap_register_plugin_arg(mydlo, glite_gsplugin, gsplugin_ctx)) {
+ std::cerr << "Couldn't register gSoap plugin" << std::endl;
+ goto err;
+ }
+
+ soap_done(mydlo);
+ free(mydlo);
+ glite_gsplugin_free_context(gsplugin_ctx);
+ return ok1 && ok2;
+
+err:
+ if (gsplugin_ctx) glite_gsplugin_free_context(gsplugin_ctx);
+ if (mydlo) soap_destroy(mydlo);
+ return 1;
+}
+
+Namespace namespaces[] = {{NULL, NULL, NULL, NULL}};