OSSP CVS Repository

ossp - Check-in [4140]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4140
Date: 2001-Jul-04 17:09:55 (local)
2001-Jul-04 15:09:55 (UTC)
User:simons
Branch:
Comment: Added regression test suite.
Tickets:
Inspections:
Files:
ossp-pkg/xds/Makefile      1.5 -> 1.6     3 inserted, 0 deleted
ossp-pkg/xds/regression-tests/.cvsignore      added-> 1.1
ossp-pkg/xds/regression-tests/.run-tests      added-> 1.1
ossp-pkg/xds/regression-tests/Makefile      added-> 1.1

ossp-pkg/xds/Makefile 1.5 -> 1.6

--- Makefile     2001/07/03 11:15:39     1.5
+++ Makefile     2001/07/04 15:09:55     1.6
@@ -29,6 +29,9 @@
         rm -f test.o test
         rm -f xds.3
 
+check:
+        (cd regression-tests && $(MAKE) check)
+
 # Dependencies
 
 test.o:         test.c xds.h


ossp-pkg/xds/regression-tests/.cvsignore -> 1.1

*** /dev/null    Sat Nov 23 02:25:59 2024
--- -    Sat Nov 23 02:26:23 2024
***************
*** 0 ****
--- 1 ----
+ *.log


ossp-pkg/xds/regression-tests/.run-tests -> 1.1

*** /dev/null    Sat Nov 23 02:25:59 2024
--- -    Sat Nov 23 02:26:23 2024
***************
*** 0 ****
--- 1,37 ----
+ #! /bin/sh
+ 
+ if [ $# -lt 1 ]; then
+     echo "Usage: $0 test1.exe [...]"
+     exit 1;
+ fi
+ 
+ RESCOLUMN=30
+ numTests=0
+ numFails=0
+ 
+ for suite in $*; do
+     tmp="${suite%%.exe}: "
+     echo -n "$tmp"
+     currpos=$(($RESCOLUMN-${#tmp}))
+     while [ $currpos -gt 0 ]; do
+        echo -n " "
+        currpos=$(($currpos-1))
+     done
+     numTests=$(($numTests+1))
+     eval ./$suite >${suite%%.exe}.log 2>&1
+     if [ $? -eq 0 ]; then
+        echo OK
+     else
+        numFails=$(($numFails+1))
+        echo FAILED
+     fi
+ done
+ 
+ echo
+ echo "Summary: $numFails of $numTests tests failed ($(($numFails*100/$numTests))%)."
+ 
+ if [ $numFails -eq 0 ]; then
+     exit 0
+ else
+     exit 1
+ fi


ossp-pkg/xds/regression-tests/Makefile -> 1.1

*** /dev/null    Sat Nov 23 02:25:59 2024
--- -    Sat Nov 23 02:26:23 2024
***************
*** 0 ****
--- 1,30 ----
+ # Build and run the regression tests.
+ 
+ CC             = gcc
+ 
+ WARNFLAGS      = -Wall -ansi -pedantic
+ OPTFLAGS       = -O3 -pipe
+ CPPFLAGS       =
+ CFLAGS         =
+ LDFLAGS                =
+ 
+ TESTS          = test1.exe
+ 
+ .SUFFIXES:
+ .SUFFIXES:     .c .exe
+ 
+ .c.exe:
+        $(CC) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ 
+ .cpp.exe:
+        $(CXX) $(CPPFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
+ 
+ all:   $(TESTS)
+ 
+ check: all
+        ./.run-tests *.exe
+ 
+ clean::
+        rm -f $(TESTS) *.log
+ 
+ # Dependencies

CVSTrac 2.0.1