You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by re...@apache.org on 2015/07/30 23:41:55 UTC
svn commit: r1693508 - /devicemap/trunk/clients/2.0/reference/test.sh
Author: rezan
Date: Thu Jul 30 21:41:55 2015
New Revision: 1693508
URL: http://svn.apache.org/r1693508
Log:
test all domains
Added:
devicemap/trunk/clients/2.0/reference/test.sh (with props)
Added: devicemap/trunk/clients/2.0/reference/test.sh
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/2.0/reference/test.sh?rev=1693508&view=auto
==============================================================================
--- devicemap/trunk/clients/2.0/reference/test.sh (added)
+++ devicemap/trunk/clients/2.0/reference/test.sh Thu Jul 30 21:41:55 2015
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+ROOT=../../../data/2.0/reference
+
+if [ "$1" != "" ]
+then
+ ROOT=$1
+fi
+
+if [ ! -d $ROOT ]
+then
+ echo "Please pass in a valid reference domain root"
+ echo "Or run ./test.sh from SVN"
+ exit 1
+fi
+
+echo "Test root: $ROOT"
+
+DOMAINS=`ls $ROOT`
+FAIL=
+PASS=
+
+for DOMAIN in $DOMAINS
+do
+ DROOT=$ROOT/$DOMAIN
+ if [ ! -d $DROOT -o "`ls $DROOT | grep pattern`" = "" ]
+ then
+ continue
+ fi
+
+ echo
+ echo "Testing domain: $DOMAIN"
+
+ P=`find $DROOT -type f | grep pattern | sort | sed "s/^/-p /" | xargs echo`
+ A=`find $DROOT -type f | grep attribute | sort | sed "s/^/-a /" | xargs echo`
+ T=`find $DROOT -type f | grep test | sort | sed "s/^/-t /" | xargs echo`
+
+ ./run.sh $P $A $T -q
+
+ if [ "$?" != "0" ]
+ then
+ FAIL="$FAIL $DOMAIN"
+ else
+ PASS="$PASS $DOMAIN"
+ fi
+done
+
+echo
+
+if [ "$FAIL" != "" ]
+then
+ echo "The following tests have failed:$FAIL"
+ exit 1
+fi
+
+if [ "$PASS" != "" ]
+then
+ echo "All tests have passed:$PASS"
+ exit 0
+fi
+
+echo "Something went wrong"
+echo
+echo "Please pass in a valid reference domain root"
+echo "Or run ./test.sh from SVN"
+exit 1
Propchange: devicemap/trunk/clients/2.0/reference/test.sh
------------------------------------------------------------------------------
svn:executable = *