ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Lyon" <>
Subject Using Ant to <exec> a shell script
Date Mon, 19 Nov 2001 18:03:52 GMT

I have an <exec> task that calls a shell script on Unix to kick off a
smoke test. The shell script is actually calling the Expect executable
as follows:

#!/usr/local/bin/expect --

The relevant snippet from my build.xml is as follows:

  <target name="smoke.test.starnode"
          description="- This target executes the Starnode smoke test
shell script.">
     <exec dir="/export/home/stargus/tests"
       <arg line="./reactor_smoketest ${} ${build.number}"/>

For some reason, it would appear that when Ant invokes the shell script,
the shell script itself is not invoking Expect. However, when I execute
the shell script directly, (e.g. ./reactor_smoketest, it runs just fine.
The -debug output from Ant is as follows:

     [exec] Current OS is SunOS
     [exec] /usr/bin/sh ./reactor_smoketest pre test
Execute:CommandLauncher: /usr/local/ant/bin/antRun
/export/home/stargus/tests /usr/bin/sh ./reactor_smoketest pre test
     [exec] ./reactor_smoketest: proc: not found
     [exec] ./reactor_smoketest: send_log: not found
     [exec] ./reactor_smoketest: puts: not found
     [exec] ./reactor_smoketest: syntax error at line 7: `}' unexpected
     [exec] Result: 2

We are looking at having the buildfile <exec> Expect directly and then
passing the script to the Expect as an argument. However, it seems like
our first approach should work. Has anyone run into anything similar and
come up with a valid workaround? Do I need to pass additional args?



To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message