[cvs-annodex] commit (/annodex):
phpannodex-cgi/trunk/Tests/cgi_test.sh
ctford
nobody at lists.annodex.net
Mon Jan 16 14:09:09 EST 2006
Update of /annodex (new revision 1807)
Modified files:
phpannodex-cgi/trunk/Tests/cgi_test.sh
Log Message:
Updated to reflect that anxrip adds in stream tags, making anxripped cmml different from served cmml.
Modified: phpannodex-cgi/trunk/Tests/cgi_test.sh
===================================================================
--- phpannodex-cgi/trunk/Tests/cgi_test.sh 2006-01-16 01:56:26 UTC (rev 1806)
+++ phpannodex-cgi/trunk/Tests/cgi_test.sh 2006-01-16 03:09:08 UTC (rev 1807)
@@ -61,30 +61,34 @@
fi
url=$1
+# check URL works
+head=`curl $url --head --silent`
+if [ $? -ne 0 ]; then
+ echo "URL must specify a valid Annodex."
+ echo "Terminating script."
+ exit 1
+fi
-# HEADER AND ACCEPT DIFFERENTIATION TESTS
-echo "***Header and Accept Differentiation Tests***"
-head_regexp="HTTP/1.1 200 OK
+# HEADER TESTS
+
+echo "***Header Tests***"
+anx_head_regexp="HTTP/1.1 200 OK
+Date: .*
Server: .*
-Content-Type: $anx_mime
X-Content-Bitrate-Average: ?-[0-9]*?\.[0-9]*
-X-Content-Duration: [0-9]*?\.[0-9]*"
+X-Content-Duration: [0-9]*?\.[0-9]*
+Content-Type: $anx_mime"
cmml_head_regexp="HTTP/1.1 200 OK
+Date: .*
Server: .*
+Content-Length: .*
Content-Type: $cmml_mime"
-# check URL works
-head=`curl $url --head --silent`
-if [ $? -ne 0 ]; then
- echo "URL must specify a valid Annodex."
- echo "Terminating script."
- exit 1
-fi
# anx header well formed?
-pos=`expr match "$head" "$head_regexp"`
+pos=`expr match "$head" "$anx_head_regexp"`
if [ ! $pos ]; then
fail "Annodex header badly formed: '$head'"
else
@@ -102,7 +106,6 @@
echo ""
-
# OGG VALIDATION TESTS
echo "***Ogg Validation Tests***"
ogg="ogg.temp"
@@ -133,13 +136,13 @@
# cmml same as anxripped?
ripped_cmml="ripped_cmml.temp"
-anxrip $ogg > $ripped_cmml 2> /dev/null
-diffs=`diff -w $cmml $ripped_cmml`
-if [ "$diffs" ]; then
- fail "Ripped CMML different from served CMML"
-else
- succeed "Ripped CMML matches served CMML"
-fi
+#anxrip $ogg > $ripped_cmml 2> /dev/null
+#diffs=`diff -w $cmml $ripped_cmml`
+#if [ "$diffs" ]; then
+# fail "Ripped CMML different from served CMML"
+#else
+# succeed "Ripped CMML matches served CMML"
+#fi
echo ""
@@ -149,9 +152,9 @@
# WRAP UP
# clean
-#rm $ripped_cmml
-#rm $ogg
-#rm $cmml
+rm -f $ripped_cmml
+rm -f $ogg
+rm -f $cmml
# print results
echo ""
--
ctford
More information about the cvs-annodex
mailing list