From 8f082c5ea6f0c9811b1e9c6500ac540029dced5b Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 10 Nov 2010 06:37:18 -0500 Subject: [PATCH] fix EPICS_HOST_ARCH=linux-x86 problem in pvDataCPP/test add auxFd in testLinkedList.cpp so that test dopes not show extra info --- pvDataApp/miscTest/testLinkedList.cpp | 54 +++++++++++++++------------ test/testAll.pl | 2 +- test/testIntrospect.pl | 2 +- test/testLinkedList.pl | 4 +- test/testLinkedListAux | 20 ++++++++++ test/testPVAuxInfo.pl | 2 +- test/testPVData.pl | 2 +- test/testPVStructureArray.pl | 2 +- test/testPVType.pl | 2 +- 9 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 test/testLinkedListAux diff --git a/pvDataApp/miscTest/testLinkedList.cpp b/pvDataApp/miscTest/testLinkedList.cpp index 6eea78d..98cf849 100644 --- a/pvDataApp/miscTest/testLinkedList.cpp +++ b/pvDataApp/miscTest/testLinkedList.cpp @@ -270,7 +270,7 @@ static void testOrderedQueue(FILE * fd ) { for(int i=0; iisEmpty()); delete basicList; for(int i=0; iisEmpty()); delete basicList; for(int i=0; i stdList; -static void testArrayListTime() { +static void testArrayListTime(FILE *auxFd) { epicsTimeStamp startTime; epicsTimeStamp endTime; int numNodes = 1000; @@ -358,7 +358,7 @@ static void testArrayListTime() { for(int i=0; i2) auxFileName = argv[2]; + FILE *auxFd = stdout; + if(auxFileName!=0 && auxFileName[0]!=0) { + auxFd = fopen(auxFileName,"w+"); + } testBasic(fd); testQueue(fd); testStack(fd); testList(fd); testRandomInsertRemove(fd); testOrderedQueue(fd); - testTime(); - testTimeLocked(); - testArrayListTime(); - testArrayListTimeLocked(); + testTime(auxFd); + testTimeLocked(auxFd); + testArrayListTime(auxFd); + testArrayListTimeLocked(auxFd); int totalConstructList = LinkedListVoid::getTotalConstruct(); int totalDestructList = LinkedListVoid::getTotalDestruct(); int totalConstructListNode = LinkedListVoidNode::getTotalConstruct(); diff --git a/test/testAll.pl b/test/testAll.pl index 2beab1e..61cdec5 100755 --- a/test/testAll.pl +++ b/test/testAll.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testIntTypes.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("./testPVType.pl"); system ("./testIntrospect.pl"); system ("./testPVData.pl"); diff --git a/test/testIntrospect.pl b/test/testIntrospect.pl index 5ee56d9..ac01fc4 100755 --- a/test/testIntrospect.pl +++ b/test/testIntrospect.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testIntrospect.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testIntrospect"); system ("rm testIntrospectDiff"); system ("../bin/${EPICS_HOST_ARCH}/testIntrospect testIntrospect"); diff --git a/test/testLinkedList.pl b/test/testLinkedList.pl index 4fb44d6..f1f45d3 100755 --- a/test/testLinkedList.pl +++ b/test/testLinkedList.pl @@ -1,9 +1,9 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testLinkedList.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testLinkedList"); system ("rm testLinkedListDiff"); -system ("../bin/${EPICS_HOST_ARCH}/testLinkedList testLinkedList"); +system ("../bin/${EPICS_HOST_ARCH}/testLinkedList testLinkedList testLinkedListAux"); system ("diff testLinkedList testLinkedListGold >> testLinkedListDiff"); if(-z "testLinkedListDiff") { print "testLinkedList OK\n"; diff --git a/test/testLinkedListAux b/test/testLinkedListAux new file mode 100644 index 0000000..d838e28 --- /dev/null +++ b/test/testLinkedListAux @@ -0,0 +1,20 @@ + +Time test +diff 23.646940 milliSeconds +time per iteration 23.646940 microseconds +time per addTail/removeHead 0.011823 microseconds + +Time test locked +diff 183.897825 milliSeconds +time per iteration 183.897825 microseconds +time per addTail/removeHead 0.091949 microseconds + +Time ArrayList test +diff 652.546057 milliSeconds +time per iteration 652.546057 microseconds +time per addTail/removeHead 0.326273 microseconds + +Time ArrayList test locked +diff 814.756660 milliSeconds +time per iteration 814.756660 microseconds +time per addTail/removeHead 0.407378 microseconds diff --git a/test/testPVAuxInfo.pl b/test/testPVAuxInfo.pl index 7d48cc6..15dee2e 100755 --- a/test/testPVAuxInfo.pl +++ b/test/testPVAuxInfo.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testPVAuxInfo.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testPVAuxInfo"); system ("rm testPVAuxInfoDiff"); system ("../bin/${EPICS_HOST_ARCH}/testPVAuxInfo testPVAuxInfo"); diff --git a/test/testPVData.pl b/test/testPVData.pl index 264862a..bf6b888 100755 --- a/test/testPVData.pl +++ b/test/testPVData.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testPVData.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testPVData"); system ("rm testPVDataDiff"); system ("../bin/${EPICS_HOST_ARCH}/testPVData testPVData"); diff --git a/test/testPVStructureArray.pl b/test/testPVStructureArray.pl index deb3a56..7da29d8 100755 --- a/test/testPVStructureArray.pl +++ b/test/testPVStructureArray.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testPVStructureArray.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testPVStructureArray"); system ("rm testPVStructureArrayDiff"); system ("../bin/${EPICS_HOST_ARCH}/testPVStructureArray testPVStructureArray"); diff --git a/test/testPVType.pl b/test/testPVType.pl index 32a3eb1..29bc686 100755 --- a/test/testPVType.pl +++ b/test/testPVType.pl @@ -1,6 +1,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- if $running_under_some_shell; # testPVType.pl -$EPICS_HOST_ARCH = "linux-x86"; +use Env; system ("rm testPVType"); system ("rm testPVTypeDiff"); system ("../bin/${EPICS_HOST_ARCH}/testPVType testPVType");