Hi all,

I’m still facing the same issue while running expect. Please help!



Yashaswi S Kumar

Software Engineer

Sanovi Technologies Pvt. Ltd.

* yashaswi.ku...@sanovi.com
' +91 80 4076 2044
À +91 97423 89087

ý  www.sanovi.com

sanovi_logo_green_reverse



From: Yashaswi S. Kumar [mailto:yashaswi.ku...@sanovi.com]
Sent: 06 March 2012 11:15
To: 'Sharon Lucas'
Cc: 'staf-users@lists.sourceforge.net'
Subject: RE: [staf-users] How to remove ^M character while executing expect 
script through STAF/STAX



Hi Sharon,

Here is the output when I run my expect script using STAF



staf local process start shell command 
"/home/sanovi/WS/Automation/src/automation/testcases/scripts/create_new_session.sh
 
auto yashaswi atm 
/home/sanovi/WS/Automation/src/automation/testcases/config/TCList.csv" 
returnstdout stderrtostdout wait

Response

--------

{

  Return Code: 1

  Key        : <None>

  Files      : [

    {

      Return Code: 0

      Data       : spawn scp 
/home/sanovi/WS/Automation/src/automation/testcases/config/TCList.csv 
atmmgmt@192.168.2.236:/tmp

reverse mapping checking getaddrinfo for apptest.sanovi.com [192.168.2.236] 
failed - POSSIBLE BREAK-IN ATTEMPT!

atmmgmt@192.168.2.236's password: interact: spawn id exp0 not open

    while executing

"interact"

    (file 
"/home/sanovi/WS/Automation/src/automation/testcases/scripts/create_new_session.sh"
 
line 38)



    }

  ]

}

I’m running the expect script on a Linux Image.



Also when I execute the same script through java Runtime() it works as 
intended.



Here is my STAX Snippet



  <script>

                machines=[ '192.168.1.61' ]

                machName='192.168.1.61'

                
testdir='/home/sanovi/WS/Automation/src/automation/testcases/scripts'

                
tcList='/home/sanovi/WS/Automation/src/automation/testcases/config/TCList.csv'

        </script>

        <function name = "Automation" scope = "local">

                <sequence>

                        <process>

                                <location>machName</location>

                                <command 
mode="'shell'">'%s/create_new_session.sh autotest yashaswi atm %s'% 
(testdir,tcList)</command>

                                <stderr mode="'stdout'"/>

                                <stdout>'%s/UpdateSession.log' % testdir 
</stdout>

                        </process>

                </sequence>

        </function>



The above script requires 4 parameters to work.

Yashaswi S Kumar

Software Engineer

Sanovi Technologies Pvt. Ltd.

* yashaswi.ku...@sanovi.com
' +91 80 4076 2044
À +91 97423 89087

ý  www.sanovi.com

sanovi_logo_green_reverse



From: Sharon Lucas [mailto:luc...@us.ibm.com]
Sent: 05 March 2012 21:00
To: Yashaswi S. Kumar
Cc: staf-users@lists.sourceforge.net
Subject: Re: [staf-users] How to remove ^M character while executing expect 
script through STAF/STAX



How are you running the expect script via STAX?  Are you running it using a 
<process> element?  Please provide the STAX code that you are using to run 
it,
On what operating system are you running the expect script?

Did you try running the expect script via STAF first?  Sometimes it is 
easier to debug that way  For example:

STAF machine PROCESS START SHELL COMMAND "path to expect script" 
RETURNSTDOUT STDERRTOSTDOUT WAIT

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        "Yashaswi S. Kumar" <yashaswi.ku...@sanovi.com>
To:        <staf-users@lists.sourceforge.net>,
Date:        03/05/2012 09:21 AM
Subject:        [staf-users] How to remove ^M character while executing 
expect        script through STAF/STAX

  _____




Hi All,
I’m running an expect script through stax which accepts the password and 
creates a session.
This is the error I’m getting while I run the same ^M is getting appended to 
each string. I did convert the script from dos2unix. Also the script works 
fine when not included in STAX. Please help

spawn scp 
/home/sanovi/WS/Automation/src/automation/testcases/config/TCList.csv 
atmmgmt@192.168.2.236:/tmp^M
reverse mapping checking getaddrinfo for apptest.sanovi.com [] failed - 
POSSIBLE BREAK-IN ATTEMPT!^M^M
atmmgmt@192.168.2.236's password: interact: spawn id exp0 not open
    while executing
"interact"
    (file 
"/home/sanovi/WS/Automation/src/automation/testcases/scripts/create_new_session.sh"
 
line 38)^M


Yashaswi S Kumar
Software Engineer
Sanovi Technologies Pvt. Ltd.
* yashaswi.ku...@sanovi.com
' +91 80 4076 2044
À +91 97423 89087
ý   <http://www.sanovi.com/> www.sanovi.com
sanovi_logo_green_reverse
 
------------------------------------------------------------------------------Try
 before you buy = See our experts in action!The most comprehensive online 
learning library for Microsoft developersis just $99.99! Visual Studio, 
SharePoint, SQL - plus HTML5, CSS3, MVC3,Metro Style Apps, more. Free future 
releases when you subscribe now! 
<http://p.sf.net/sfu/learndevnow-dev2>http://p.sf.net/sfu/learndevnow-dev2_______________________________________________staf-users
 mailing liststaf-us...@lists.sourceforge.net 
<https://lists.sourceforge.net/lists/listinfo/staf-users>https://lists.sourceforge.net/lists/listinfo/staf-users

<<image001.jpg>>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to