]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
forb: Use new syntax for forbrun command line
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 14:29:37 +0000 (15:29 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 14:29:37 +0000 (15:29 +0100)
We have added '--' before the name of the first library as it simplifies
command line parsing.

src/forbrun/tests/forbrun.sh

index a7b4c90cf6919464284ef5cf9a7882cc145ffa81..7c5fde1e573a06b12e21c40678e238e6ec5a97ce 100755 (executable)
@@ -6,22 +6,22 @@ WVSTART "Without any parameters do nothing"
 WVPASS forbrun
 
 WVSTART "argv[0] in forb_main() contains the name of the library"
-WVFAIL sh -c 'forbrun libtest_obj.so 2> error'
+WVFAIL sh -c 'forbrun -- libtest_obj.so 2> error'
 WVPASSEQ "$(cat error)" "Usage: libtest_obj.so <string>"
 
 WVSTART "Both server and client in a single process"
-WVPASS sh -c 'forbrun libtest_obj.so "Hello" -- libtest_client.so > output'
+WVPASS sh -c 'forbrun -- libtest_obj.so "Hello" -- libtest_client.so > output'
 WVPASSEQ "$(cat output)" "Hello"
 
 WVSTART "Server and client in separate processes"
 # Run server on background
 rm -f test.pid
-WVPASS sh -c 'forbrun --daemon=test.pid libtest_obj.so "Hello" > output'
+WVPASS sh -c 'forbrun --daemon=test.pid -- libtest_obj.so "Hello" > output'
 WVPASS test -f test.pid
 
 # Run client
-WVPASS forbrun libtest_client.so
-WVPASS kill $(cat test.pif)
+WVPASS forbrun -- libtest_client.so
+WVPASS kill $(cat test.pid)
 
 # Test whether the server was called
 WVPASSEQ "$(cat output)" "Hello"