ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/option al Rpm.java
Date Wed, 09 Feb 2005 08:03:33 GMT
>   Modified:    
> src/main/org/apache/tools/ant/taskdefs/optional Rpm.java
>   Log:
>   return code checking on rpm. How do we test this?


Using a mock object for rpm? Could return the value of a system parameter or
file content or env variable ...

<rpm rpmBuildCommand="rpm-mock"/>

Because rpm runs only on *nix, the test doesnt have to be platform
independant.


Jan


> /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java,v
>            exe.setCommandline(toExecute.getCommandline());
>            try {
>   +            int returncode = exe.execute();
>   +            if (returncode != 0) {
>   +                throw new BuildException("'" +
>   +                        toExecute.getExecutable() +
>   +                        "' failed with exit code "+returncode);
>   +            }
>            }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message