[C-mpi-commits] SF.net SVN: c-mpi:[37] test/mpirpc
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-20 19:58:28
|
Revision: 37
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=37&view=rev
Author: jmwozniak
Date: 2010-04-20 19:58:22 +0000 (Tue, 20 Apr 2010)
Log Message:
-----------
Additional MPIRPC test processing.
Added Paths:
-----------
test/mpirpc/test-blob.zsh
test/mpirpc/test-returns.zsh
Added: test/mpirpc/test-blob.zsh
===================================================================
--- test/mpirpc/test-blob.zsh (rev 0)
+++ test/mpirpc/test-blob.zsh 2010-04-20 19:58:22 UTC (rev 37)
@@ -0,0 +1,35 @@
+#!/bin/zsh
+
+# set -x
+
+# Be sure to make tests with D=1
+
+PROGRAM=$1
+OUT=${PROGRAM%.x}.out
+shift
+LAUNCH=${*}
+
+crash()
+{
+ print $1
+ mv ${OUT} ${OUT}.failed
+ exit 1
+}
+
+eval ${LAUNCH} -n 2 ${PROGRAM} > ${OUT} 2>&1
+CODE=$?
+[[ ${CODE} == 0 ]] || crash "exit code was: ${CODE}"
+
+TOKENS=("asserts ok"
+ "result: (null)" )
+
+for T in ${TOKENS}
+do
+ grep ${T} ${OUT} || crash "Not found: ${T}"
+done
+
+# Should be 2 "Normal exit."s
+N=$( grep -c "Normal exit." ${OUT} )
+(( N == 2 )) || crash "N != 2"
+
+exit 0
Property changes on: test/mpirpc/test-blob.zsh
___________________________________________________________________
Added: svn:executable
+ *
Added: test/mpirpc/test-returns.zsh
===================================================================
--- test/mpirpc/test-returns.zsh (rev 0)
+++ test/mpirpc/test-returns.zsh 2010-04-20 19:58:22 UTC (rev 37)
@@ -0,0 +1,31 @@
+#!/bin/zsh
+
+set -x
+
+# Be sure to make tests with D=1
+
+PROGRAM=$1
+OUT=${PROGRAM%.x}.out
+shift
+LAUNCH=${*}
+
+crash()
+{
+ print $1
+ mv ${OUT} ${OUT}.failed
+ exit 1
+}
+
+eval ${LAUNCH} -n 2 ${PROGRAM} > ${OUT} 2>&1
+CODE=$?
+[[ ${CODE} == 0 ]] || crash "exit code was: ${CODE}"
+
+TOKENS=("result: ok"
+ "result: (null)" )
+
+for T in ${TOKENS}
+do
+ grep ${T} ${OUT} || crash "Not found: ${T}"
+done
+
+exit 0
Property changes on: test/mpirpc/test-returns.zsh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|