certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] dtest


From: Eric Noulard
Subject: Re: [certi-dev] dtest
Date: Wed, 28 Sep 2011 22:02:19 +0200

2011/9/28 Jan-Patrick Osterloh <address@hidden>:
> Hi,
>
> if I try to run dtest I get some errors. First I executed cmake in order
> to create the makefiles. I also installed dtest and the dependencies. Do
> I have to set the PYTHONPATH to my python executable, or to the dtest
> folder that I downloaded?

to the dtest folder you downloaded.
dtest is clearly beta (who said alpha) which works for developer but really
lacks clean install procedure....not speaking of the fact it has never
been used on Windows...

> Must I call just make test, or a normal make before?

Usually

make install (configured to a local path I'll explain why very soon.)
make test

>
> $>make test
> Running tests...
> "/C/Programme/CMake 2.8/bin/ctest.exe" --force-new-ctest-process
> Test project D:/home/patrick/eclipse/certi/applications/HLA_TestsSuite
>      Start  1: create_destroy-1
>  1/10 Test  #1: create_destroy-1 .................***Not Run   0.00 sec
[...]
> Total Test time (real) =   0.30 sec
>
> The following tests FAILED:
>          1 - create_destroy-1 (BAD_COMMAND)
[...]

None of tests were run, but keep reading.

> If I just run one test manually, I get the following:
> $> dtest_create_destroy.py
> "--federate=D:/home/patrick/eclipse/certi/applications/HLA_TestsSuite/create_destroy"
> Exception in thread RTIG:
> Traceback (most recent call last):
>  File "c:\Programme\Entwicklung\Python26\lib\threading.py", line 525,
> in __bootstrap_inner
>    self.run()
>  File
> "c:\Programme\Entwicklung\Python26\lib\site-packages\dtest\dtester.py",
> line 442, in run
>    self.__lastStepStatus = step[0](self,*(step[1]),**(step[2]))
>  File
> "c:\Programme\Entwicklung\Python26\lib\site-packages\dtest\dtester.py",
> line 222, in runCommand
>    return self.session.send(command+self.session.NEWLINE)
>  File
[...]
> self.SSHShell.send(string)
> AttributeError: 'NoneType' object has no attribute 'send'
[...]

here is the culprit, dtest uses paramiko (100% python SSH implementation)
It uses paramiko in order to:
   1) get a clean TTY in order to monitor and control a process (a
dtest.DTester instance)
   2) to connect to a potentially remote host where the DTester will
be launched.

In an HLA test the DTest scripts usually consist in 3 DTesters:
    - RTIG
    - First Federate instance
    - Second Federate instance.

1)+2) requires an SSH server to be installed on the local machine because
in order to get a clean TTY dtest is opening an SSH connection on 'localhost'.
That why we need a "make install" to a local location which on the path
of the user in order to get automatic access to the executable when
ssh-ing locally.

This is failing because your windows machine does not have an SSH server running
and/or the current user does not have a proper SSH public key
installed locally which
enables connection without passwd.

The thing is dtest was not ever used on Windows...
and on most Linux/Unix machine one already have an ssh server.

So using dtest on Windows does not currently works.
In order to make it work we should find a solution to have an SSH
server locally:
   - either install an ssh server
   - or create one using paramiko (I did nerver tried that) for the
duration of the tests.

This may seem overkill to use SSH in order to get some PTY for
controlling a process
but when I did some research there was no other "portable" way to get one.

The upper level requirement is that for running an automatized HLA test
one NEEDs to launch at least 2 processes  (RTIG and Federate)
and find a way to coordinate them (i.e. be sure that RTIG has started before
launching Federate etc....)

Have a look at any dtest_xxx scripts and you'll see what I mean.
You'll see that making a dtest scripts to work with a real distributed
config (RTIG on host1, Federate1 on host2, Federate2 on host3) is just as easy
as local run, just change the SSHSession in order to open a remote connection.

All of this works just fine on Linux (or any other unix equipped with
SSH server and python+paramiiko)
there is certain amount of work to do to make it run on Windows.

Sorry about that...
In the meantime you can mimic the dtest script you want to run by
launching the RTIG and Federate
in the HLA_TestSuites by hand...

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]