SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Sep 1999
    Location
    South San Francisco, CA
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting source code from CVS with SYS_Execute()

    I'm trying to get source code from CVS using the command line. I'm using SYS_Execute() and passing it this command line: "cvs -d :ext:svizzini@source.company.com:/home/cvsroot export -D 2002-03-07 company/src/com/company"

    My problem is that it never completes and never returns. I get some of the files, but then Silk and CVS appear to just stop working. I have to abort the script and kill the agent to get Silk back. I get a different number of files each time. The command works fine at the command prompt. This is all on Windows 2000 Pro.

    Any ideas?

    Thanks


    ------------------
    Steve Vizzini
    Test Automation Developer
    mechanic

  2. #2
    Senior Member
    Join Date
    Jun 1999
    Location
    Fremont, CA, USA
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting source code from CVS with SYS_Execute()

    Not sure what the problem is, but here is a debuging tip.

    The second parameter to SYS_Execute() is a list of string that returns the results of the statement. So, use that to get the results, then print the list. You might find your answer in the results.



    ------------------
    David Genrich
    david.genrich@e2open.com
    david@linuxpuppy.net

  3. #3
    Junior Member
    Join Date
    Sep 1999
    Location
    South San Francisco, CA
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting source code from CVS with SYS_Execute()

    Thanks for the tip. I did try that, but since SYS_Execute() never returns, there's no way to get to print the contents of the list of string.

    I've seen problems on certain systems similar to this before. I might try reinstalling Silk. Often, reinstalling clears up unexplained problems. One other thing I might try is to put a stop on the SYS_Execute() and see if I can get anything from the debugger.

    Thanks again for the tip.

    ------------------
    Steve Vizzini
    Test Automation Developer
    mechanic

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting source code from CVS with SYS_Execute()

    You could use a DOS box as well. You can make a generic invoke based on the COMSPEC environment variable that always gives the full path to command.com or cmd.exe.

    If you don't want to maintain invoke, type into the box, and close for a DOS box, you can use the Start-->Run with a command.com /c <cvs commands here>. The /C makes the DOS box go away when the CVS commands are completed. In Silk detect when the DOS box goes away and that's how you know to advance in your script.

    I only use SYS_Execute when it works 100% of the time in my scripts. Otherwise I revert back to DOS boxes or Start-->Run.

    ------------------
    Steven Tyler
    SQA Automation Team Manager
    Workforce Central Group
    Kronos Incorporated
    E-Mail: styler@kronos.com www.kronos.com
    Improving the Performance of People and Business™

    [This message has been edited by styler (edited 03-11-2002).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting source code from CVS with SYS_Execute()

    Two things caught my eye ... Win2k and SYS_Execute() ...

    We've had intermittent problems with SYS_Execute() on Win2k systems -- the command didn't matter, it simply hangs the system.

    Segue's response was that they have had several reports of this and below is the info they sent.

    PROBLEM
    ----------------------------------
    Sometimes SYS_Execute() will hang when you go to execute a command line or
    batch file within the windows shell.
    *

    SOLUTION
    ----------------------------------
    Use a windows API call to use the ShellExecute() method to execute your
    commandline as such
    *
    [ ] // Call the function from the windows API and set the prototype
    [
    [-] dll "shell32"
    *[ ]
    *[ ] int ShellExecuteA (int hwnd, String lpOperation, String lpFile, string
    lpParameters,String lpDirectory, int nShowCmd)
    *[ ]
    *[ ]
    [ ]
    [ ]
    [-] testcase ShellExe() appstate none
    *[ ]
    *[ ] // Sets iHandle = to the window handle for the desktop
    *[ ] int iHandle = Desktop.GetHandle()
    *[ ] // The operation that is to be carried out
    *[ ] string lpOperation = "javal"
    *[ ] // The file on which this operation will be carried out
    *[ ] string lpFile = "javaexamp"
    *[ ] // Any additional parameters to the commandline
    *[ ] string lpParameters = " "
    *[ ] // The working directory in which this will be run
    *[ ] string lpDirectory = "c:\"
    *[ ] // a flag that determines how the command will be shown
    *[ ] int iShowCmd = 5
    *[ ]
    *[ ]
    *[ ] ShellExecuteA
    (iHandle,lpOperation,lpFile,lpParameters,lpDirecto ry,iShowCmd)
    *[ ]
    *[ ]

    Now, the only thing I'd add here is that reinstalling 5.5, then re-applying the service pack(s) of interest *seems* to solve the problem -- but it has occasionally taken 3 or 4 (or 5 or 6 ... < ouch >) reinstalls to get it "right".

    Just thought I'd make your day ...

    ------------------

  6. #6
    Junior Member
    Join Date
    Sep 1999
    Location
    South San Francisco, CA
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Getting source code from CVS with SYS_Execute()

    Thanks for the responses. It's been my experience that some machines have trouble in inexplicable ways with the Silk installation. Uninstalling and reinstalling often clears up such things. So, I'll try that at least once.

    The other suggestions are good work arounds. Using a Dos box from the Run dialog is doable. Another solution (in this case) might be to just use the Windows CVS GUI.

    Thanks again for the suggestions/tips.

    ------------------
    Steve Vizzini
    Test Automation Developer
    mechanic

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:44 PM.

Copyright BetaSoft Inc.