[Dart] Windows NT issues: MostRecentResults symlink, code cov erage in Visual C++

Miller, James V (CRD) millerjv at crd.ge.com
Wed, 18 Jul 2001 09:48:53 -0400


Rather than always try the ln command and seeing if it passed, I'd prefer 
if we checked 

if { $tcl_platform(platform) == "windows" } {
	# Do a file copy to MostRecentResults
} else {
      # Do a ln -s to MostRecentResults
}

Both cygtclsh80 and standard windows tclsh say that the platform is windows.

Would this work for you Eric?

Jim

-----Original Message-----
From: ebmiddlecamp at imation.com [mailto:ebmiddlecamp at imation.com]
Sent: Tuesday, July 17, 2001 4:54 PM
To: dart at public.kitware.com
Subject: RE: [Dart] Windows NT issues: MostRecentResults symlink, code
coverage in Visual C++



I managed to implement item #2, if you would like to add it to
DashboardManager.tcl. The code snippet below uses your suggestion, and
starts at line 392 (lines marked with an asterisk are new) :

      # Add the softlink from MostRecentResults to latest.
      # puts stderr [pwd]
      # cd $DashboardDir
      cd ..
      puts [pwd]
      file delete -force MostRecentResults-Nightly
      catch { exec ln -s [file tail $DashboardDir]
MostRecentResults-Nightly } Result
      puts $Result
*     if {$Result != ""} {
*       puts "Unable to add softlink to latest; copying files instead"
*       file delete -force MostRecentResults-Nightly
*       file copy -force [file tail $DashboardDir]
MostRecentResults-Nightly
*     }
      puts "Dashboard $DashboardStamp -- Finished [clock format [clock
seconds]]"

Note #1: The additional forced file delete may not be necessary.
Note #2: I'm running a Cygwin NT box, and I had a copy of "ln". To make the
above code work, I deleted it. In theory, "ln" should probably return an
error on systems which don't support symlinks, but I don't think it does.

Eric Middlecamp
Imation Corp






ebmiddlecamp at imation.com at public.kitware.com on 07/17/2001 03:07:30 PM

Sent by:  dart-admin at public.kitware.com


To:   dart at public.kitware.com
cc:
Subject:  RE: [Dart] Windows NT issues: MostRecentResults symlink, code
      coverage in Visual C++



My quick responses to your quick responses:

(1) The code to create the timestamp is Utility.tcl, line 44: "return
[clock format [clock seconds] -format %Y%m%d-%H%M -gmt 1]". The code to
re-read the timestamp, and calculate the date from it is lines 148-149:
"set Hour [string range $Stamp 9 10]", "set Minute [string range $Stamp 11
12]". I don't think line 150 changed, actually, as I previously stated. So,
the changes are to add one character before the hour/minute in the format
string, and to increment the substring indices when reading back the hour
and minute. I tried these changes on a Dashboard which had one old-style
timestamp, and some new ones. I was able to view them both from a browser,
and the times looked correct. Also, since the "View Yesterday's Dashboard"
hyperlink always points to a "xxx-Nightly", we don't have to worry about
this change breaking it.

(2) I'll see if I can implement this myself, based on your suggestion, and
get back to you..

Eric Middlecamp
Imation Corporation






"Blezek, Daniel J (CRD)" <blezek at crd.ge.com> at public.kitware.com on
07/17/2001 01:45:13 PM

Sent by:  dart-admin at public.kitware.com


To:   "'ebmiddlecamp at imation.com'" <ebmiddlecamp at imation.com>,
      dart at public.kitware.com
cc:
Subject:  RE: [Dart] Windows NT issues: MostRecentResults symlink, code cov
      erage in Visual C++


Eric,

  Quick responses:

1) The Datestamp format is parsed in other code to extract the particular
submissions that belong in
a daily dashboard.  If you change the format (which I think is a fine
idea), the parsing code needs
to change as well.  Please test this very well!  It will also break all
historical data that we have,
because the directory names will be wrong.  Don't know if this is really an
issue or not, so we may
need to wait to roll your changes out.

2) Copying would work well, could check the status of the ln -s call, and
do a recursive copy.

3) Go for it!  The coverage stuff is very unix specific, precisely because
it is very easy to run
gcov and collect the output.  It would be good to collect coverage
information from WinNT as well.

-dan


-----Original Message-----
From: ebmiddlecamp at imation.com [mailto:ebmiddlecamp at imation.com]
Sent: Tuesday, July 17, 2001 1:12 PM
To: dart at public.kitware.com
Subject: [Dart] Windows NT issues: MostRecentResults symlink, code
coverage in Visual C++


I've just built my first WinNT dashboard!

I just have a few miscellaneous issues with building the dashboard on
Windows NT (sigh) ..

(1) I would like to make a cosmetic change to "Utility.tcl", affecting the
way the timestamps are formatted. Rather than use "YYYYMMDDHHMM" for
non-nightly timestamps, I would prefer to use "YYYMMDD-HHMM". The only
difference is the addition of a minus character between the numbers for the
date and those for the time. Although this is just a minor change, it makes
the timestamps much easier to read. (This change affects four lines of code
in Utility.tcl, namely: line 44, lines 148-150)

(2) The "MostRecentResults" symlink created when the dashboard is built
does not work on WindowsNT. (This is why I mention item#1, so I can turn on
directory browsing.) I would prefer to copy the most recent results folder
to a folder called "MostRecentResults." This could be implemented as a
configuration parameter, or possibly as some kind of test to see if the
platform supports symlinks.

(3) Code coverage information - I would like to be able to generate my code
coverage information using Visual C++. The mechanism Visual C++ uses is
somewhat different from gcov, however. First of all, line counting in
Visual C++ is extremely slow (they set a breakpoint on every line), so I
would rather do hit-testing. Secondly, Visual C++ outputs the entire
coverage information as one giant stream, rather than store the information
per file. So, the data would have to be merged across each test that is
run, and the format used is different. I can write the script(s) necessary
to merge the debugging information, convert the format, and do the coverage
data submission. What I'm wondering is what changes would be necessary to
the Dashboard script and/or CMake, to support the generation of coverage
files via Visual C++ rather than gcov.

Sorry if item #3 is a bit long-winded; I'm still thinking about how to
approach this one..

Eric Middlecamp
Imation Corp


_______________________________________________
Dart mailing list
Dart at public.kitware.com
http://public.kitware.com/mailman/listinfo/dart

_______________________________________________
Dart mailing list
Dart at public.kitware.com
http://public.kitware.com/mailman/listinfo/dart




_______________________________________________
Dart mailing list
Dart at public.kitware.com
http://public.kitware.com/mailman/listinfo/dart




_______________________________________________
Dart mailing list
Dart at public.kitware.com
http://public.kitware.com/mailman/listinfo/dart