Bugs item #1425518, was opened at 2006-02-06 19:16
Message generated for change (Comment added) made by baylor
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1425518&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tasks
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: baylor wetzel (baylor)
Assigned to: Nobody/Anonymous (nobody)
Summary: uptodate not working

Initial Comment:
i'm new to nant. Either i don't know how to use the 
task uptodate or it doesn't work

Imagine two directories, source and destination. Each 
has a file which we'll call s.exe and d.exe. 
SourceFiles points to s.exe, TargetFiles points to 
d.exe. The target is named Verify and comes after the 
target Copy. The Copy target has been verified by hand 
and works as expected

Here's what i'm finding:

1. Files are in appropriate places, destination/d.exe 
is newer than source/s.exe. Run uptodate. Returns 
True. Test works as expected

2. Touch source/s.exe to be newer than 
destination/d.exe. Run uptodate. Returns True. i 
believe this should have returned False, so this is 
not working

3. Erase source/s.exe. Run uptodate. Returns True. i 
don't know what should be happening here

4. Put back s.exe, erase destination/d.exe. Run 
uptodate. Returns False and the message "Destination 
file(s) do(es) not exist.". Test works as expected

i'm testing these a couple of ways. First, i set 
failonerror=True. This never works no matter what. 
Second i set the required property variable and echo 
the value. Third, i use the property variable with if 
and ifnot statements which in turn use echos and, when 
it's false, a fail

Here is a snippet of my most recent nant script. All 
other steps not shown here (which is just the file 
copy) work as expected

<uptodate property="files.uptodate" verbose="true" 
failonerror="true">
        <sourcefiles>
                <include name="profiler.exe" />
        </sourcefiles>
        <targetfiles>
                <include 
name="${output.path}/profiler.exe" />
        </targetfiles>
</uptodate>

<if test="${files.uptodate}">
        <echo message="files.uptodate is true. 
Value='${files.uptodate}'" />
</if>
<ifnot test="${files.uptodate}">
        <echo message="files.uptodate is false. 
Value='${files.uptodate}'" />
        <fail message="Failed verification step" />
</ifnot>



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

>Comment By: baylor wetzel (baylor)
Date: 2006-02-06 19:18

Message:
Logged In: YES 
user_id=186776

Forgot to mention - version=0.85.1932.0; rc3

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1425518&group_id=31650


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to