CTest:Submission Issues: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 85: Line 85:


Dart2 uses XML-RPC over HTTP to perform submission of data and does not require triggering.
Dart2 uses XML-RPC over HTTP to perform submission of data and does not require triggering.


{{CMake/Template/Footer}}
{{CMake/Template/Footer}}

Revision as of 16:47, 13 December 2005

CTest supports four submission methods:

  • FTP with HTTP client initiated trigger
  • HTTP with HTTP client initiated trigger
  • SCP with server side trigger
  • XML-RPC (Dart2) with no trigger

FTP

Default submission method for legacy purposes. This is the method original Dart preferred. It uses File Transfer Protocol (FTP) to send submission data to the server. Once data is uploaded, it uses HTTP to trigger the actual submission of the data to the dashboard.

HTTP

This is preferred submission method for the original Dart dashboards. It uses Hypertext Transfer Protocol's (HTTP) PUT option to send submission data to the server. Once data is uploaded, it uses HTTP to trigger the actual submission of the data to the dashboard.

SCP

When security is important SCP submission method can be used. This method requires external tool to do the actual transfer and does not perform the trigger. Trigger has to be done on the server. Example script that will do it is this:

#!/usr/bin/perl -ws
#
# Script that will move testing results from the project incomming
# directory to the appropriate location for dashboard summarization.  
#
###

use File::Basename;
use File::Copy;
use File::Path;

if ( $#ARGV < 0 )
{
	die "No project specified";
	$project = "Xdmf";
}
$project = $ARGV[0];


$dropLocation = "/projects/FTP/incoming/".$project;
$destination = "/projects/".$project."/Testing/".$project."-Testing/Testing/HTML/TestingResults/Sites";

opendir(DIR, $dropLocation) || die "Cannot open directory ".$dropLocation." - ".$!;
@files = grep { ! /^\./ && -f "$dropLocation/$_" } readdir(DIR);
closedir DIR;

foreach $file (@files) {
	$xmlfile = $file;
	$xmlfile =~ s/%(..)/sprintf("%c", hex($1))/g;   # unquote %-quoted

		print "Processing file: ".$xmlfile."\n";

	$fullPathToIncomingXMLFile = $dropLocation . "/" . $xmlfile;
	if (-e $fullPathToIncomingXMLFile) {
# file exists, so lets move it

# first, translate the xml filename to a directory path
		$xmlfile =~ s|___|/|g;

# for security reasons, disallow any file with ".." in the user 
# specified path to keep people from storing files just anywhere in
# the host directory structure
		$securityCheck = $xmlfile;
		if ( ($securityCheck =~ /\.\./) ) {
			print "For security reasons, $xmlfile cannot be accepted.\n";
			exit;
		}

# construct destination path and filename
		$fullPathToDestinationXMLFile = $destination . "/" . $xmlfile;
		mkpath( dirname( $fullPathToDestinationXMLFile ) );

# now copy the file to destination
		move( $fullPathToIncomingXMLFile, $fullPathToDestinationXMLFile);

		print "$xmlfile submission successful.\n";
	}
	else {
# specified file does not exist
		print "$xmlfile submission failed. $xmlfile is not in the dropbox.\n";
	}

}

XML-RPC

Dart2 uses XML-RPC over HTTP to perform submission of data and does not require triggering.




CMake: [Welcome | Site Map]