[qmtest] ShellScriptTest under Windows?

Mark Mitchell mark at codesourcery.com
Fri Feb 13 05:17:28 UTC 2004


Andrew Funk wrote:

>Hi,
>
>I did read that documentation in the code and I thought about editing
>the context to use a different shell.  However I guess what I would like
>is for QMTest to have the same behavior under Unix and Windows out of
>the box, or if not then to know exactly what are the limitations so that
>I can design my tests for both OS.
>  
>
I think it depends on what you mean by "the same behavior".  To us, 
"running the native shell, whatever it may be" is "the same behavior".  
It sounds like to you, "running the same shell, preferably a POSIX 
Bourne shell" would be "the same behavior."

Of course, there's no way (in general) to run a Bourne shell under 
Windows; such a thing is not always installed.

If you want that level of portability, I can see a few choices:

* Require that your users install a Bourne shell and then either set the 
QMTest context variable to use that shell, or, alternatively, subclass 
ShellScriptTest so that it explicitly uses a Bourne shell.

* Encode the logic you would normally express in the shell script 
directly in Python, depending on the portability you get that way, 
rather than trying to use a shell script.

* Have your test database pick different shell scripts depending on the 
host OS, magically substituting DOS commands for Bourne shell commands 
when on Windows.

Best,

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com




More information about the qmtest mailing list