[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9827: add tests for POSTing of AMF d
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9827: add tests for POSTing of AMF data. |
Date: |
Mon, 01 Dec 2008 12:55:26 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9827
committer: address@hidden
branch nick: rtmp
timestamp: Mon 2008-12-01 12:55:26 -0700
message:
add tests for POSTing of AMF data.
improve wget message parsing for errors.
modified:
cygnal/testsuite/cygnal.exp
=== modified file 'cygnal/testsuite/cygnal.exp'
--- a/cygnal/testsuite/cygnal.exp 2008-11-30 22:04:50 +0000
+++ b/cygnal/testsuite/cygnal.exp 2008-12-01 19:55:26 +0000
@@ -40,7 +40,7 @@
proc delete_files {} {
# Get rid of old temp files created by testing,
if {[file exists foo]} {
- set junk [glob foo* wget-log*]
+ set junk [glob foo* wget-log* amf0*]
if { $junk != "" } {
catch "exec rm -f $junk"
}
@@ -59,7 +59,7 @@
puts -nonewline $fd "$i "
}
flush $fd
- catch "close -i $fd"
+# catch "close -i $fd"
}
#
@@ -91,8 +91,10 @@
global cport
global sid
set result false
- verbose "Trying to wget from Cygnal http://$chost:$cport/$name" 2
- spawn -noecho wget -v $options http://$chost:$cport/$name
+
+ # --header="Content-Type: application/x-amf"
+ verbose "Trying to wget from Cygnal -v --tries=3 --server-response
$options http://$chost:$cport/$name" 2
+ spawn -noecho wget -v --tries=3 --server-response $options
http://$chost:$cport/$name
set wid $spawn_id
expect {
-i $wid "*Saving to: *" {
@@ -103,18 +105,26 @@
verbose "Wget all done..." 2
set result true
}
+ -i $wid "Giving up" {
+ verbose "Giving up on file transfer"
+ }
-i $wid "Retrying." {
verbose "Retrying file"
+ exp_continue
+ }
+ -i $wid "Connection close" {
+ verbose "Connection closed from other end"
}
-i $wid "connected." {
exp_continue
}
-i $wid "has sprung into existence" {
- set result true
+ verbose "File transferred but no size"
+ set result false
}
-i $wid "Connection closed at" {
}
- eof "*Connection refused" {
+ -i $wid eof "*Connection refused" {
verbose "Wget failed..."
}
-i $wid eof {
@@ -217,7 +227,7 @@
# Testing transferring multiple files in a nice tight loop for stress testing.
#
set files ""
-set limit 150
+set limit 40
set count 0
for { set i 1 } { $i <= $limit } { incr i } {
set size [ expr $i * 120]
@@ -261,13 +271,31 @@
}
+set binsdir "[file dirname [file dirname [file dirname
$srcdir]]]/testsuite/libnet.all"
+set bins [glob $binsdir/*.bin]
+
+foreach binfile $bins {
+ set result [ wget foo {--header="Content-Type: application/x-amf"
--post-file=$binfile} ]
+ if { $result == true } {
+ if { [file exists foo] } {
+ [file delete foo]
+ verbose "$binfile was transferred!" 2
+ pass "HTTP POST single AMF0 $binfile"
+ } else {
+ fail "HTTP POST single AMF0 $binfile"
+ }
+ } else {
+ unresolved "HTTP POST single AMF0 $binfile"
+ }
+}
+
#############################################################
# Stop the server, we're done. As the server doesn't die when a connection is
# closed, we have to kill it, and then close the pty handle.
if {$sid > 0} {
set pid [exp_pid -i $sid]
verbose "Attempting to shut down Cygnal, PID is: $pid"
- exec kill -STOP $pid
+ exec kill -INT $pid
catch "close -i $sid"
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9827: add tests for POSTing of AMF data.,
rob <=