|
From: <wsh...@us...> - 2003-08-08 14:21:18
|
Update of /cvsroot/emc/rcslib/src/test
In directory sc8-pr-cvs1:/tmp/cvs-serv32012/src/test
Modified Files:
Tag: wps_multiplat_dev_branch
Makefile cgtest.nml cgtester.hh cgtester_n_codegen_protos.hh
cgtestread.cc cgtestwrite.cc exread.java jtestxml.sh
mingw_testxml.sh nml_test_server.cc test.nml2 testxml.sh
xmlout.cc
Log Message:
First commit on wps_multiplat_dev_branch
Index: Makefile
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/Makefile,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -C2 -d -r1.8 -r1.8.2.1
*** Makefile 7 May 2003 19:35:29 -0000 1.8
--- Makefile 8 Aug 2003 14:21:14 -0000 1.8.2.1
***************
*** 581,582 ****
--- 581,630 ----
+ nml_test_blocking_read_SOURCES= \
+ nml_test_blocking_read.cc \
+ nml_test_format_n.cc
+
+ $(DEVP_BIN_DIR)/nml_test_blocking_read: $(nml_test_blocking_read_SOURCES:%.cc=$(DEVP_LIB_DIR)/%.o)
+ $(COMPILER_SETUP); \
+ $(CPLUSPLUS) $^ $(RCS_LIB_DIR)/librcsd.a $(CFLAGS) $(CPLUSPLUSFLAGS) $(CLINK) $(CPLUSPLUSLINK) -o $@;
+
+ nml_test_blocking_read : $(DEVP_BIN_DIR)/nml_test_blocking_read
+
+ .PHONY: nml_test_blocking_read
+
+ nml_test_write_SOURCES= \
+ nml_test_write.cc \
+ nml_test_format_n.cc
+
+ $(DEVP_BIN_DIR)/nml_test_write: $(nml_test_write_SOURCES:%.cc=$(DEVP_LIB_DIR)/%.o)
+ $(COMPILER_SETUP); \
+ $(CPLUSPLUS) $^ $(RCS_LIB_DIR)/librcsd.a $(CFLAGS) $(CPLUSPLUSFLAGS) $(CLINK) $(CPLUSPLUSLINK) -o $@;
+
+ nml_test_write : $(DEVP_BIN_DIR)/nml_test_write
+
+ .PHONY: nml_test_write
+
+ nml_test_read_SOURCES= \
+ nml_test_read.cc \
+ nml_test_format_n.cc
+
+ $(DEVP_BIN_DIR)/nml_test_read: $(nml_test_read_SOURCES:%.cc=$(DEVP_LIB_DIR)/%.o)
+ $(COMPILER_SETUP); \
+ $(CPLUSPLUS) $^ $(RCS_LIB_DIR)/librcsd.a $(CFLAGS) $(CPLUSPLUSFLAGS) $(CLINK) $(CPLUSPLUSLINK) -o $@;
+
+ nml_test_read : $(DEVP_BIN_DIR)/nml_test_read
+
+ .PHONY: nml_test_read
+
+
+ nml_test_server_SOURCES= \
+ nml_test_server.cc \
+ nml_test_format_n.cc
+
+ $(DEVP_BIN_DIR)/nml_test_server: $(nml_test_server_SOURCES:%.cc=$(DEVP_LIB_DIR)/%.o)
+ $(COMPILER_SETUP); \
+ $(CPLUSPLUS) $^ $(CFLAGS) $(CPLUSPLUSFLAGS) $(RCS_LINK_FLAG) $(CLINK) $(CPLUSPLUSLINK) -o $@;
+
+ nml_test_server : $(DEVP_BIN_DIR)/nml_test_server
+
+ .PHONY: nml_test_server
Index: cgtest.nml
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/cgtest.nml,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -d -r1.6 -r1.6.2.1
*** cgtest.nml 6 May 2003 15:18:22 -0000 1.6
--- cgtest.nml 8 Aug 2003 14:21:14 -0000 1.6.2.1
***************
*** 2,9 ****
# buffers:
! # name type host size neut RPC# buffer# max_proc [type-spec]
! # SHMEM host size neut RPC# buffer# max_proc key
! B cgtest_buf1 SHMEM localhost 50000 1 0 1 25 1023 TCP=5001 xml diffxml confirm_write xmllog
! B cgtest_buf2 SHMEM localhost 50000 1 0 1 25 1024 TCP=5002 xml diffxml confirm_write xmllog
# processes:
--- 2,9 ----
# buffers:
! # name type host size neut RPC# buffer# max_proc [type-spec]
! # SHMEM host size neut RPC# buffer# max_proc key
! B cgtest_buf1 SHMEM localhost 50000 1 0 1 25 1023 TCP=5001 xml xmllog confirm_write
! B cgtest_buf2 SHMEM localhost 50000 1 0 1 25 1024 TCP=5002 xml xmllog confirm_write
# processes:
Index: cgtester.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/cgtester.hh,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -d -r1.7 -r1.7.2.1
*** cgtester.hh 6 May 2003 15:18:22 -0000 1.7
--- cgtester.hh 8 Aug 2003 14:21:14 -0000 1.7.2.1
***************
*** 4,7 ****
--- 4,8 ----
#define CGTESTER_HH
+ #define DO_NOT_ADD_INDEXES_TO_ARRAY_NAMES 1
#include "rcs.hh"
***************
*** 71,78 ****
char name[60];
enum enumtest enumtestvar_array[5];
DECLARE_NML_DYNAMIC_LENGTH_ARRAY(enum enumtest, enumtest_dla,5);
//DECLARE_NML_UNBOUNDED_ARRAY(enum enumtest, enumtest_unbounded);
- enum enumtest enumtestvar;
float fa[3];
--- 72,87 ----
char name[60];
+ int i_attribute; //attribute,default=10
+ char c_attribute; //attribute
+ float f_attribute; //attribute
+ double d_attribute; //attribute
+ char ca_attribute[10]; //attribute
+
+ enum enumtest enumtestvar;
+
+
enum enumtest enumtestvar_array[5];
DECLARE_NML_DYNAMIC_LENGTH_ARRAY(enum enumtest, enumtest_dla,5);
//DECLARE_NML_UNBOUNDED_ARRAY(enum enumtest, enumtest_unbounded);
float fa[3];
***************
*** 95,98 ****
--- 104,109 ----
DECLARE_NML_DYNAMIC_LENGTH_ARRAY(INSIDE_COMMAND, ic_dynamic_array,10);
+ DECLARE_NML_UNBOUNDED_ARRAY(char,initialized_cda_unbounded); //default=foobar
+
DECLARE_NML_UNBOUNDED_ARRAY(char,cda_unbounded);
DECLARE_NML_UNBOUNDED_ARRAY(int,ida_unbounded);
***************
*** 122,127 ****
char name[60];
! enum RCS_STATUS rcsstatus;
enum enumtest enumtestvar;
enum enumtest enumtestvar_array[5];
DECLARE_NML_DYNAMIC_LENGTH_ARRAY(enum enumtest, enumtest_dla,5);
--- 133,145 ----
char name[60];
! int i_attribute; //attribute,default=10
! char c_attribute; //attribute
! float f_attribute; //attribute
! double d_attribute; //attribute
! char ca_attribute[10]; //attribute
enum enumtest enumtestvar;
+
+
+ enum RCS_STATUS rcsstatus;
enum enumtest enumtestvar_array[5];
DECLARE_NML_DYNAMIC_LENGTH_ARRAY(enum enumtest, enumtest_dla,5);
Index: cgtester_n_codegen_protos.hh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/cgtester_n_codegen_protos.hh,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** cgtester_n_codegen_protos.hh 15 May 2003 11:39:56 -0000 1.1
--- cgtester_n_codegen_protos.hh 8 Aug 2003 14:21:14 -0000 1.1.2.1
***************
*** 20,23 ****
--- 20,77 ----
extern void NML_UNBOUNDED_LENGTH_ARRAY_mystruct_update(CMS *cms, NML_UNBOUNDED_LENGTH_ARRAY mystruct *x);
+
+ #ifndef MAX_CGTESTER_NAME_LENGTH
+ #define MAX_CGTESTER_NAME_LENGTH 16
+ #endif
+ #ifndef CGTESTER_NAME_LIST_LENGTH
+ #define CGTESTER_NAME_LIST_LENGTH 4
+ #endif
+
+
+ /* This list must be in alphabetical order and the three lists must correspond. */
+ extern const char cgtester_name_list[CGTESTER_NAME_LIST_LENGTH][MAX_CGTESTER_NAME_LENGTH];
+ extern const NMLTYPE cgtester_id_list[CGTESTER_NAME_LIST_LENGTH];
+ extern const size_t cgtester_size_list[CGTESTER_NAME_LIST_LENGTH];
+ extern const char *cgtester_symbol_lookup(long type);
+
+
+ // Enumerated Type Constants
+
+ // RCS_STATUS
+ #ifndef MAX_ENUM_RCS_STATUS_STRING_LENGTH
+ #define MAX_ENUM_RCS_STATUS_STRING_LENGTH 21
+ #endif
+ /* MAX_ENUM_RCS_STATUS_STRING_LENGTH */
+ #ifndef ENUM_RCS_STATUS_LENGTH
+ #define ENUM_RCS_STATUS_LENGTH 5
+ #endif
+ /* ENUM_RCS_STATUS_LENGTH */
+
+ extern const char enum_RCS_STATUS_string_list[ENUM_RCS_STATUS_LENGTH][MAX_ENUM_RCS_STATUS_STRING_LENGTH];
+
+ extern const int enum_RCS_STATUS_int_list[ENUM_RCS_STATUS_LENGTH];
+
+ extern const char *cgtester_enum_RCS_STATUS_symbol_lookup(long v);
+
+ extern const struct cms_enum_info enum_RCS_STATUS_info_struct;
+
+ // enumtest
+ #ifndef MAX_ENUM_ENUMTEST_STRING_LENGTH
+ #define MAX_ENUM_ENUMTEST_STRING_LENGTH 2
+ #endif
+ /* MAX_ENUM_ENUMTEST_STRING_LENGTH */
+ #ifndef ENUM_ENUMTEST_LENGTH
+ #define ENUM_ENUMTEST_LENGTH 6
+ #endif
+ /* ENUM_ENUMTEST_LENGTH */
+
+ extern const char enum_enumtest_string_list[ENUM_ENUMTEST_LENGTH][MAX_ENUM_ENUMTEST_STRING_LENGTH];
+
+ extern const int enum_enumtest_int_list[ENUM_ENUMTEST_LENGTH];
+
+ extern const char *cgtester_enum_enumtest_symbol_lookup(long v);
+
+ extern const struct cms_enum_info enum_enumtest_info_struct;
+
extern int cgtester_format(NMLTYPE type, void *buffer, CMS *cms);
Index: cgtestread.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/cgtestread.cc,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -d -r1.6 -r1.6.2.1
*** cgtestread.cc 6 May 2003 15:18:22 -0000 1.6
--- cgtestread.cc 8 Aug 2003 14:21:14 -0000 1.6.2.1
***************
*** 105,109 ****
--- 105,111 ----
example_msg_ptr->hexdata[9]);
printf("name:%s\n",example_msg_ptr->name);
+ #ifndef NO_NML_UNBOUNDED
printf("cda_unbounded:%s\n",example_msg_ptr->cda_unbounded);
+ #endif
break;
}
***************
*** 125,129 ****
/* The buffer contains the same message */
/* you read last time. */
! printf("no new data.\n");
break;
--- 127,131 ----
/* The buffer contains the same message */
/* you read last time. */
! printf("no new data.\n");
break;
***************
*** 156,160 ****
--- 158,164 ----
example_msg_ptr->hexdata[9]);
printf("name:%s\n",example_msg_ptr->name);
+ #ifndef NO_NML_UNBOUNDED
printf("cda_unbounded:%s\n",example_msg_ptr->cda_unbounded);
+ #endif
break;
}
***************
*** 208,212 ****
--- 212,218 ----
example_msg_ptr->hexdata[9]);
printf("name:%s\n",example_msg_ptr->name);
+ #ifndef NO_NML_UNBOUNDED
printf("cda_unbounded:%s\n",example_msg_ptr->cda_unbounded);
+ #endif
break;
}
***************
*** 259,263 ****
--- 265,271 ----
example_msg_ptr->hexdata[9]);
printf("name:%s\n",example_msg_ptr->name);
+ #ifndef NO_NML_UNBOUNDED
printf("cda_unbounded:%s\n",example_msg_ptr->cda_unbounded);
+ #endif
break;
}
***************
*** 334,338 ****
--- 342,348 ----
example_msg_ptr->hexdata[9]);
printf("name:%s\n",example_msg_ptr->name);
+ #ifndef NO_NML_UNBOUNDED
printf("cda_unbounded:%s\n",example_msg_ptr->cda_unbounded);
+ #endif
break;
}
Index: cgtestwrite.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/cgtestwrite.cc,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** cgtestwrite.cc 6 May 2003 15:18:22 -0000 1.5
--- cgtestwrite.cc 8 Aug 2003 14:21:14 -0000 1.5.2.1
***************
*** 64,70 ****
--- 64,73 ----
example_msg->i = 99;
example_msg->d = etime();
+
+ #ifndef NO_NML_UNBOUNDED;
example_msg->cda_unbounded = strdup("unbounded_string");
example_msg->cda_unbounded_length = example_msg->cda_unbounded_size_allocated=
strlen(example_msg->cda_unbounded)+1;
+ #endif
example_msg->hexdata[0] = 0x0;
Index: exread.java
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/exread.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** exread.java 4 Apr 2003 16:53:35 -0000 1.4
--- exread.java 8 Aug 2003 14:21:14 -0000 1.4.2.1
***************
*** 45,54 ****
System.out.println("msg.type="+msg.type+", msg.i="+msg.i+", msg.c="+msg.c+", msg.f="+msg.f+", msg.lastvar="+msg.lastvar);
}
}
catch(Exception e)
{
- System.exit(255);
e.printStackTrace(rcs.nml.debugInfo.debugPrintStream);
e.printStackTrace();
}
}
--- 45,55 ----
System.out.println("msg.type="+msg.type+", msg.i="+msg.i+", msg.c="+msg.c+", msg.f="+msg.f+", msg.lastvar="+msg.lastvar);
}
+ System.exit(0);
}
catch(Exception e)
{
e.printStackTrace(rcs.nml.debugInfo.debugPrintStream);
e.printStackTrace();
+ System.exit(255);
}
}
Index: jtestxml.sh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/jtestxml.sh,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** jtestxml.sh 4 Apr 2003 17:52:37 -0000 1.1
--- jtestxml.sh 8 Aug 2003 14:21:14 -0000 1.1.2.1
***************
*** 4,10 ****
if [ x${PLAT} = x ] ; then
! PLAT=~/rcslib/etc/platname
! export PLAT
fi
\rm -f *.log
--- 4,10 ----
if [ x${PLAT} = x ] ; then
! PLAT=`../../etc/platname`
fi
+ export PLAT
\rm -f *.log
***************
*** 36,54 ****
killall -KILL cgtestsvr2
!
! # make -C .. FORCE_DEPEND=1 depend || (echo FAILED;exit 255) || exit 255
! make -C .. DISABLE_DEFAULT_OPTIMIZE=1 || (echo FAILED;exit 255) || exit 255
! make -C ../java/rcs/nml PLAT=java || (echo FAILED;exit 255) || exit 255
! make -C ../java/rcs rcs.jar PLAT=java || (echo FAILED;exit 255) || exit 255
! make -C ../java/diagapplet/CodeGen PLAT=java || (echo FAILED;exit 255) || exit 255
! #java -jar ../../../rcslib/plat/java/lib/CodeGen.jar update_with_name=true display_on=false cgtester.hh || (echo FAILED;exit 255) || exit 255
! make headers sources depend || (echo FAILED;exit 255) || exit 255
! make DISABLE_DEFAULT_OPTIMIZE=1 xmlout xmlschemaout cgtestsvr1 cgtestsvr2 cgtestread cgtestwrite || (echo FAILED;exit 255) || exit 255
! javac -classpath ~/rcslib/plat/java/lib/rcs.jar *.java || (echo FAILED;exit 255) || exit 255
! ../../../rcslib/plat/${PLAT}/bin/xmlout || (echo FAILED;exit 255) || exit 255
\rm -f xmlschemaout.xsd
! ../../../rcslib/plat/${PLAT}/bin/xmlschemaout || (echo FAILED;exit 255) || exit 255
! ../../../xsdvalid-21/xsdvalid -s xmlschemaout.xsd xmlout.xml || (echo FAILED;exit 255) || exit 255
killall -INT cgtestsvr1
--- 36,86 ----
killall -KILL cgtestsvr2
! if test "x${REBUILD}" = "xALL" ; then
!
! make PLAT=${PLAT} -C .. || (echo FAILED;exit 255) || exit 255
! make -C ../java/rcs/nml PLAT=java || (echo FAILED;exit 255) || exit 255
! rm ../../plat/java/lib/rcs.jar
! make -C ../java/rcs rcs.jar PLAT=java || (echo FAILED;exit 255) || exit 255
! make -C ../java/diagapplet/CodeGen PLAT=java || (echo FAILED;exit 255) || exit 255
!
! fi
!
! if test "x${REBUILD}" = "xLOCAL" -o "x${REBUILD}" = "xALL" ; then
!
! java -jar ../../../rcslib/plat/java/lib/CodeGen.jar update_with_name=true display_on=false cgtester.hh || (echo FAILED;exit 255) || exit 255
! rm ../../plat/${PLAT}/bin/cgtest*
! rm ../../plat/${PLAT}/bin/xml*
! rm ./*.class
! javac -classpath ../../plat/java/lib/rcs.jar *.java || (echo FAILED;exit 255) || exit 255
! make PLAT=${PLAT} headers sources depend xmlout xmlschemaout cgtestsvr1 cgtestsvr2 cgtestread cgtestwrite || (echo FAILED;exit 255) || exit 255
!
! fi
!
!
! if test "x${XSDVALID}" = "x" ; then
!
! if test -x ../../../xsdvalid-21/xsdvalid ; then
! XSDVALID=../../../xsdvalid-21/xsdvalid ;
! elif test -x ../../../../xsdvalid-21/xsdvalid ; then
! XSDVALID=../../../../xsdvalid-21/xsdvalid ;
! elif test -x ~/xsdvalid-21/xsdvalid ; then
! XSDVALID=~/xsdvalid-21/xsdvalid ;
! fi
!
! fi
!
! ../../../rcslib/plat/${PLAT}/bin/xmlout || (echo FAILED xmlout;exit 255) || exit 255
\rm -f xmlschemaout.xsd
! ../../../rcslib/plat/${PLAT}/bin/xmlschemaout || (echo FAILED xmlschemaout;exit 255) || exit 255
!
! if test "x${XSDVALID}" != "x" ; then
! ${XSDVALID} -s xmlschemaout.xsd xmlout.xml || (echo FAILED xsdvalid xmlout.xml;exit 255) || exit 255
! fi
+ java -classpath ../../plat/java/lib/rcs.jar:. jxmlout >jxmlout.xml || (echo FAILED jxmlout;exit 255) || exit 255
+
+ if test "x${XSDVALID}" != "x" ; then
+ ${XSDVALID} -s xmlschemaout.xsd jxmlout.xml || (echo FAILED xsdvalid jxmlout.xml ;exit 255) || exit 255
+ fi
killall -INT cgtestsvr1
***************
*** 58,73 ****
killall -KILL cgtestsvr2
! ../../../rcslib/plat/${PLAT}/bin/cgtestsvr1 &
jobtokill=$!
! ../../../rcslib/plat/${PLAT}/bin/cgtestsvr2 &
jobtokill2=$!
! java -classpath ~/rcslib/plat/java/lib/rcs.jar:. exwrite || (echo FAILED;exit 255) || exit 255
! java -classpath ~/rcslib/plat/java/lib/rcs.jar:. exread || (echo FAILED;exit 255) || exit 255
! ../../../rcslib/plat/${PLAT}/bin/cgtestwrite || (echo FAILED;exit 255) || exit 255
! java -classpath ~/rcslib/plat/java/lib/rcs.jar:. exread || (echo FAILED;exit 255) || exit 255
! java -classpath ~/rcslib/plat/java/lib/rcs.jar:. exwrite || (echo FAILED;exit 255) || exit 255
! ../../../rcslib/plat/${PLAT}/bin/cgtestread || (echo FAILED;exit 255) || exit 255
kill -INT $jobtokill
--- 90,105 ----
killall -KILL cgtestsvr2
! ../../plat/${PLAT}/bin/cgtestsvr1 &
jobtokill=$!
! ../../plat/${PLAT}/bin/cgtestsvr2 &
jobtokill2=$!
! java -classpath ../../plat/java/lib/rcs.jar:. exwrite >exwrite.log 2>exwrite.err|| (echo FAILED exwrite;exit 255) || exit 255
! java -classpath ../../plat/java/lib/rcs.jar:. exread >exread.log 2>exread.err|| (echo FAILED exread;exit 255) || exit 255
! ../../plat/${PLAT}/bin/cgtestwrite || (echo FAILED;exit 255) || exit 255
! java -classpath ../../plat/java/lib/rcs.jar:. exread >exread.log 2>exread.err || (echo FAILED exread;exit 255) || exit 255
! java -classpath ../../plat/java/lib/rcs.jar:. exwrite >exread.log 2>exread.err || (echo FAILED exwrite;exit 255) || exit 255
! ../../plat/${PLAT}/bin/cgtestread || (echo FAILED;exit 255) || exit 255
kill -INT $jobtokill
Index: mingw_testxml.sh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/mingw_testxml.sh,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** mingw_testxml.sh 27 Mar 2003 20:13:30 -0000 1.2
--- mingw_testxml.sh 8 Aug 2003 14:21:14 -0000 1.2.2.1
***************
*** 32,36 ****
wine ../../../rcslib/plat/${PLAT}/bin/xmlout.exe || exit 255
wine ../../../rcslib/plat/${PLAT}/bin/xmlschemaout.exe || exit 255
! ../../../xsdvalid-21/xsdvalid -s xmlschemaout.xsd xmlout.xml || exit 255
killall -INT wine
--- 32,54 ----
wine ../../../rcslib/plat/${PLAT}/bin/xmlout.exe || exit 255
wine ../../../rcslib/plat/${PLAT}/bin/xmlschemaout.exe || exit 255
!
!
! if test "x${XSDVALID}" = "x" ; then
!
! if test -x ../../../xsdvalid-21/xsdvalid ; then
! XSDVALID=../../../xsdvalid-21/xsdvalid ;
! elif test -x ../../../../xsdvalid-21/xsdvalid ; then
! XSDVALID=../../../../xsdvalid-21/xsdvalid ;
! elif test -x ~/xsdvalid-21/xsdvalid ; then
! XSDVALID=~/xsdvalid-21/xsdvalid ;
! fi
!
! fi
!
! if test "x${XSDVALID}" != "x" ; then
!
! ${XSDVALID} -s xmlschemaout.xsd xmlout.xml || exit 255
!
! fi
killall -INT wine
Index: nml_test_server.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/nml_test_server.cc,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** nml_test_server.cc 6 May 2003 16:55:45 -0000 1.1
--- nml_test_server.cc 8 Aug 2003 14:21:14 -0000 1.1.2.1
***************
*** 10,13 ****
--- 10,14 ----
main(int argc, char **argv)
{
+ NML *nml_ptr;
set_rcs_print_destination(RCS_PRINT_TO_STDERR);
***************
*** 18,25 ****
}
! NML nml(nml_test_format,argv[1],argv[2],argv[3]);
! if(!nml.valid())
{
! fprintf(stderr,"nml.valid() check failed.\n");
exit(-1);
}
--- 19,31 ----
}
! nml_ptr = new NML(nml_test_format,argv[1],argv[2],argv[3]);
! if(!nml_ptr)
{
! fprintf(stderr,"OUT-OF-MEMORY\n");
! exit(127);
! }
! if(!nml_ptr->valid())
! {
! fprintf(stderr,"nml_ptr->valid() check failed.\n");
exit(-1);
}
Index: test.nml2
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/test.nml2,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -d -r1.1 -r1.1.2.1
*** test.nml2 6 May 2003 17:15:07 -0000 1.1
--- test.nml2 8 Aug 2003 14:21:14 -0000 1.1.2.1
***************
*** 1,5 ****
! b bufname=b1 size=40000 bsem=20001
process_default proctype=local
--- 1,5 ----
! b bufname=b1 size=40000 bsem=20001 force_raw
process_default proctype=local
Index: testxml.sh
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/testxml.sh,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** testxml.sh 6 May 2003 15:18:22 -0000 1.5
--- testxml.sh 8 Aug 2003 14:21:15 -0000 1.5.2.1
***************
*** 4,8 ****
if [ x${PLAT} = x ] ; then
! PLAT=~/rcslib/etc/platname
export PLAT
fi
--- 4,8 ----
if [ x${PLAT} = x ] ; then
! PLAT=`../../etc/platname`
export PLAT
fi
***************
*** 31,44 ****
#export DEBUG_MEMORY
! # make -C .. FORCE_DEPEND=1 depend || (echo FAILED;exit 255) || exit 255
! make -C .. DISABLE_DEFAULT_OPTIMIZE=1 || (echo FAILED;exit 255) || exit 255
! #make -C ../java PLAT=java || (echo FAILED;exit 255) || exit 255
! java -jar ../../../rcslib/plat/java/lib/CodeGen.jar update_with_name=true display_on=false cgtester.hh dla_length_init=2 || (echo FAILED;exit 255) || exit 255
! make headers sources depend || (echo FAILED;exit 255) || exit 255
! make DISABLE_DEFAULT_OPTIMIZE=1 xmlout xmlschemaout cgtestsvr1 cgtestsvr2 cgtestread cgtestwrite cgtestwriteifread || (echo FAILED;exit 255) || exit 255
../../../rcslib/plat/${PLAT}/bin/xmlout || (echo FAILED;exit 255) || exit 255
\rm -f xmlschemaout.xsd
../../../rcslib/plat/${PLAT}/bin/xmlschemaout || (echo FAILED;exit 255) || exit 255
! ../../../xsdvalid-21/xsdvalid -s xmlschemaout.xsd xmlout.xml || (echo FAILED;exit 255) || exit 255
killall -INT cgtestsvr1
--- 31,59 ----
#export DEBUG_MEMORY
! # make PLAT=${PLAT} -C .. FORCE_DEPEND=1 depend || (echo FAILED;exit 255) || exit 255
! make PLAT=${PLAT} -C .. DISABLE_DEFAULT_OPTIMIZE=1 || (echo FAILED;exit 255) || exit 255
! #make PLAT=${PLAT} -C ../java PLAT=java || (echo FAILED;exit 255) || exit 255
! if test -x ../../../rcslib/plat/${PLAT}/bin/CodeGen ; then
! ../../../rcslib/plat/${PLAT}/bin/CodeGen update_with_name=true cgtester.hh dla_length_init=2 || (echo FAILED;exit 255) || exit 25
!
! else
! java -jar ../../../rcslib/plat/java/lib/CodeGen.jar update_with_name=true display_on=false cgtester.hh dla_length_init=2 || (echo FAILED;exit 255) || exit 255
! fi
!
! make PLAT=${PLAT} headers sources depend || (echo FAILED;exit 255) || exit 255
! make PLAT=${PLAT} DISABLE_DEFAULT_OPTIMIZE=1 xmlout xmlschemaout cgtestsvr1 cgtestsvr2 cgtestread cgtestwrite cgtestwriteifread || (echo FAILED;exit 255) || exit 255
../../../rcslib/plat/${PLAT}/bin/xmlout || (echo FAILED;exit 255) || exit 255
\rm -f xmlschemaout.xsd
../../../rcslib/plat/${PLAT}/bin/xmlschemaout || (echo FAILED;exit 255) || exit 255
! if test -x ~/xsdvalid-21/xsdvalid ; then
! ~/xsdvalid-21/xsdvalid -s xmlschemaout.xsd xmlout.xml || (echo FAILED;exit 255) || exit 255
!
! elif test -x ../../../xsdvalid-21/xsdvalid ; then
! ../../../xsdvalid-21/xsdvalid -s xmlschemaout.xsd xmlout.xml || (echo FAILED;exit 255) || exit 255
!
! else
! echo "XML Schema Validation skipped : xsdvalid not installed."
! fi
!
killall -INT cgtestsvr1
Index: xmlout.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/test/xmlout.cc,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** xmlout.cc 27 Mar 2003 20:13:30 -0000 1.2
--- xmlout.cc 8 Aug 2003 14:21:15 -0000 1.2.2.1
***************
*** 43,46 ****
--- 43,49 ----
#endif
example_nml1l = new NML(cgtester_format, 0,0,0);
+ example_nml1l->xmlSetStyleProperty("NS_PREFIX=cgt");
+ example_nml1l->xmlSetStyleProperty("NS_HREF=xmlschemaout.xsd");
+
example_msg= new EXAMPLE_MESSAGE();
***************
*** 60,64 ****
example_msg->name[4] = 0xDD;
strcpy(example_msg->name+5,"newline(\n),cr(\r)&\"\'");
! example_msg->enumtestvar = d;
example_msg->lastvar = ((int) example_msg->d)%3600000;
if(argc > 1 )
--- 63,80 ----
example_msg->name[4] = 0xDD;
strcpy(example_msg->name+5,"newline(\n),cr(\r)&\"\'");
! // example_msg->enumtestvar = d;
! #ifndef NO_NML_UNBOUNDED
! example_msg->cda_unbounded = strdup("string_for_cda_unbounded");
! example_msg->cda_unbounded_length =
! example_msg->cda_unbounded_size_allocated = strlen(example_msg->cda_unbounded) +1;
!
! example_msg->ida_unbounded = new int [10];
! example_msg->ida_unbounded_length = example_msg->ida_unbounded_size_allocated = 10;
! for(int jj=0; jj< 10; jj++)
! {
! example_msg->ida_unbounded[jj] = jj;
! }
! #endif
!
example_msg->lastvar = ((int) example_msg->d)%3600000;
if(argc > 1 )
|