]> xenbits.xensource.com Git - people/aperard/emesinae.git/commitdiff
test: Fake up control replies.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 15:52:25 +0000 (16:52 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 2 Jul 2013 15:52:25 +0000 (16:52 +0100)
config/examples/test/test.sh
scripts/control.pl

index 35b99861f078c29f49bbc6e014322452b02473b1..c536a48ca922f8e6690af00cfa50489d8fb08aaa 100755 (executable)
@@ -63,6 +63,6 @@ if [ "${mode}" = "test" -o "${mode}" = "both" ] ; then
     done
 
     echo Queue run 2
-    asuser env PERLLIB=$perllib $libexec/queuerunner.pl
+    asuser env PERLLIB=$perllib TEST_SPOOL_CONTROL_REPLY=1 $libexec/queuerunner.pl
 
 fi
index 13bd5a1281942ed47df5023bd69d71493c593c56..ef15f3176d33d18e1d5cc663aa4036e5076328ef 100755 (executable)
@@ -364,6 +364,12 @@ sub spool_reply ($) {
     close(FILE) || &failure("close temporary file: $!");
     rename( "incoming/T.$id", "incoming/IO.$id" )
       || &failure("rename spool message: $!");
+
+    # Fake up an incoming message containing the reply. Used together with
+    # "$c{ControlReplyToList} = 0" in the test scripts. Avoids the need for a
+    # full MTA setup.
+    link( "incoming/IO.$id", "incoming/IA.$id" )
+      if $ENV{'TEST_SPOOL_CONTROL_REPLY'};
 }
 
 # Command should return 1 if processing should continue or zero to quit.