I am using ncp module with socat which supports readline:
i have bash alias ncp="socat readline tcp4:localhost:2080" and then i
can type/execute anything
there. Never thought about anything else since. The only thing that
needs to be tested with browser
is connection stuff, like cookies/headers, but that wget is for, prepare
file with everything and then just
call it, a lot of manual work but actually i donot use it very often,
browser is s till real testing environment.
Zoran Vasiljevic wrote:
On Tuesday 08 March 2005 09:09, Stephen Deasey wrote:
I'm not sure what the right way to go here is. Would such an nsdsh be
useful, or should we just add more to the server binary, or should I
just be a bit more creative when writing tests..?
I do not know if this is what you'd need...
What we've done is to spawn a thread on server start which opens a
named pipe on the filesystem. The location and naming convention of
the named pipe is well known. The thread reads incoming data more/less
the same as nscp and executes the command. We also wrote a very tiny
utility in Tcl (and wrapped it into a single exectuable with mktclapp)
which also connects to the same named pipe, reads stdin for commands
and passes the input to the pipe.
This looks like:
zvlinux:/usr/local/homes/zv # cd /usr/local/aw
zvlinux:/usr/local/aw # bin/nsdchat
% srvinfo version
4.0
The "nsdchat" is this small utility. This way we can execute any
server command on a running server instance. The thread which reads
the pipe executes command in a secure Tcl interp and we have opened
a special API for that. This need not be, of course.
So, this way we are actually using the server itself to run arbitrary
scripts. The nsdchat utility can also read files on the filesystem
and pass them to server for execution:
zvlinux:/usr/local/aw # echo "srvinfo version" > my.tcl
zvlinux:/usr/local/aw # bin/nsdchat < my.tcl
4.0
Is this the functionality you're looking for?
Cheers
Zoran
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/