Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Question about running additional commands in external tools framework

The behavior of utility commands in an execution step is different from the analysis step.  In the execution step they are supposed to compose with the application being run.  This is to support tools like valgrind where you actually run valgrind and give it your own executable as an argument.  This means that your setup should have sent a command like

/bin/touch /tmp/plugin <your_executable>

...to the remote machine which is still not what you want.  But it sounds like the framework didn't make it that far.  The system does some error checking which includes making sure the path exists on the local system, which I will need to remove to support remote functionality.  This same error checking currently looks at the whole string for the utility command to see if it is a valid file.  If you put /tmp/plugin as an <argument value="/tmp/plugin"> to the utility, so the command string is just the executable it will get around that.  But this still doesn't address your goal.

Right now the best way to run an arbitrary application is with the <analyze> tag.  I need to enable remote support for you to be able to invoke remote applications with simple xml, but as a temporary measure you could specify another internal analysis step with AbstractPerformanceDataManager that uses the remote API to invoke 'touch'.  You would need to put that analysis tag before your execute tag so it might bug you for the execute directory as you saw before.  I'll add an attribute to tell it that it doesn't need to do that.  And I'll try to implement some basic support for remote tool invocation so that kind of effort won't be necessary.

Another possibility would be to use two execute commands in a row.  The second is your regular command.  The first is just:

<execute>
   <utility command="touch"/>
</execute>

This will touch (not launch) the executable itself so you can check its time stamp.  ...except, it will use whatever run job parameters you have already set up with your remote resource, which might not be appropriate.

-Wyatt


On Fri, Apr 24, 2009 at 6:45 AM, Dave Wootton <dwootton@xxxxxxxxxx> wrote:
Wyatt
I'm wondering if there's a way to run additional commands prior to running
my application using the performance configuration dialog and your
framework.
I tried putting
<utility command="/bin/touch /tmp/plugin"> statement in my XML file
thinking that would run the touch command on the remote system. I ended up
getting a popup telling me the '\/bin/touch /tmp/plugin' tool wasn't found
so I'm guessing this was run on my local system and failed.

Is there a way I can run a remote command before running my application
using your framework that doesn't require the user to do anything? Is
there something I can code in the XML file to do this?

If not, I'll have to think about a different way to solve this since I
think this is very specific to my plugin. I'm trying to touch a file to
use as a timestamp so I can find files created later than the date of the
file I touched. I can't rely on time o the local system since clocks may
be out of sync.
Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev



Back to the top