Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hp
committed
Nov 25, 2012
0 parents
commit a70002b
Showing
64 changed files
with
8,210 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#OS junk files | ||
[Tt]humbs.db | ||
*.DS_Store | ||
|
||
#Visual Studio files | ||
*.[Oo]bj | ||
*.user | ||
*.aps | ||
*.pch | ||
*.vspscc | ||
*.vssscc | ||
*_i.c | ||
*_p.c | ||
*.ncb | ||
*.suo | ||
*.tlb | ||
*.tlh | ||
*.bak | ||
*.[Cc]ache | ||
*.ilk | ||
*.log | ||
*.lib | ||
*.sbr | ||
*.sdf | ||
*.opensdf | ||
*.unsuccessfulbuild | ||
ipch/ | ||
obj/ | ||
[Bb]in | ||
[Dd]ebug*/ | ||
[Rr]elease*/ | ||
Ankh.NoLoad | ||
|
||
#MonoDevelop | ||
*.pidb | ||
*.userprefs | ||
|
||
#Tooling | ||
_ReSharper*/ | ||
*.resharper | ||
[Tt]est[Rr]esult* | ||
*.sass-cache | ||
|
||
#Project files | ||
[Bb]uild/ | ||
|
||
#Subversion files | ||
.svn | ||
|
||
# Office Temp Files | ||
~$* | ||
|
||
#NuGet | ||
packages/ | ||
|
||
#ncrunch | ||
*ncrunch* | ||
|
||
#Eclipse files | ||
*.pydevproject | ||
.project | ||
.metadata | ||
bin/** | ||
tmp/** | ||
tmp/**/* | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.classpath | ||
.settings/ | ||
.loadpath | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# CDT-specific | ||
.cproject | ||
|
||
# PDT-specific | ||
.buildpath | ||
|
||
/target/** | ||
/work/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// (c) Copyright 2012 Hewlett-Packard Development Company, L.P. | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.IO; | ||
using System.Text.RegularExpressions; | ||
namespace HpToolsLauncher | ||
{ | ||
public static class ConsoleWriter | ||
{ | ||
static TestRunResults activeTestRun = null; | ||
|
||
public static TestRunResults ActiveTestRun | ||
{ | ||
get { return activeTestRun; } | ||
set { activeTestRun = value; } | ||
} | ||
|
||
public static void WriteException(string message, Exception ex) | ||
{ | ||
Console.Out.WriteLine(message); | ||
Console.Out.WriteLine(ex.Message); | ||
Console.Out.WriteLine(ex.StackTrace); | ||
if (activeTestRun != null) | ||
activeTestRun.ConsoleErr += message + "\n" + ex.Message + "\n" + ex.StackTrace + "\n"; | ||
} | ||
|
||
|
||
public static void WriteErrLine(string message) | ||
{ | ||
string errMessage = "Error: " + message; | ||
WriteLine(errMessage); | ||
|
||
if (activeTestRun != null) | ||
{ | ||
activeTestRun.ConsoleErr += errMessage + "\n"; | ||
} | ||
} | ||
private static Regex _badXmlCharsReg = new Regex(@"[\u0000-\u0008]|[\u000B-\u000C]|[\u000E-\u001F]|[\uD800-\uDFFF]", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.Compiled); | ||
|
||
/// <summary> | ||
/// filters out any bad characters that may affect xml generation/parsing | ||
/// </summary> | ||
/// <param name="subjectString"></param> | ||
/// <returns></returns> | ||
public static string FilterXmlProblematicChars(string subjectString) | ||
{ | ||
//allowed chars: #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] | ||
return _badXmlCharsReg.Replace(subjectString, "?"); | ||
} | ||
|
||
public static void WriteLine(string[] messages) | ||
{ | ||
foreach (string message in messages) | ||
{ | ||
|
||
WriteLine(message); | ||
if (activeTestRun != null) | ||
{ | ||
activeTestRun.ConsoleOut += message + "\n"; | ||
} | ||
} | ||
} | ||
|
||
public static void WriteLine(string message) | ||
{ | ||
message = FilterXmlProblematicChars(message); | ||
//File.AppendAllText("c:\\stam11.stam", message); | ||
Console.Out.WriteLine(message); | ||
if (activeTestRun != null) | ||
activeTestRun.ConsoleOut += message + "\n"; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// (c) Copyright 2012 Hewlett-Packard Development Company, L.P. | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
namespace HpToolsLauncher | ||
{ | ||
enum ExportTypeSuffixEnum | ||
{ | ||
ExportTypeSuffix_SD, //step details | ||
ExportTypeSuffix_DT, //data table | ||
ExportTypeSuffix_SM, //system monitor | ||
ExportTypeSuffix_SR, //screen recorder | ||
ExportTypeSuffix_LT //log tracking | ||
} | ||
|
||
public class ExportOptions | ||
{ | ||
public const string ExportDataTable = "ExportDataTable"; | ||
public const string ExportForFailed = "ExportForFailed"; | ||
public const string ExportLogTracking = "ExportLogTracking"; | ||
public const string ExportScreenRecorder = "ExportScreenRecorder"; | ||
public const string ExportStepDetails = "ExportStepDetails"; | ||
public const string ExportSystemMonitor = "ExportSystemMonitor"; | ||
public const string ExportLocation = "ExportLocation"; | ||
public const string XslPath = "XSLPath"; | ||
public const string ExportFormat = "ExportFormat"; | ||
public const string ExportType = "ExportType"; | ||
|
||
} | ||
} |
Oops, something went wrong.