aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Fugate <dfugate@microsoft.com>2011-04-20 12:01:06 -0700
committerDavid Fugate <dfugate@microsoft.com>2011-04-20 12:01:06 -0700
commitb055423983aa1739f41b25da2ab825e5b61f4a86 (patch)
treed51a4fc2de9274037616200e123f162211725c42 /tools
parent545f2c34a0de87c0fa003e272a6afbc6c13fa874 (diff)
Removed (SputnikConverter) requirement that globally scoped tests be generated to a
'GlobalScope' directory.
Diffstat (limited to 'tools')
-rw-r--r--tools/SputnikConverter/ES5TestCase.cs24
-rw-r--r--tools/SputnikConverter/Program.cs21
-rw-r--r--tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exebin24064 -> 24064 bytes
-rw-r--r--tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdbbin50688 -> 52736 bytes
-rw-r--r--tools/TestCaseHTMLPackager/TestCasePackager.py7
5 files changed, 8 insertions, 44 deletions
diff --git a/tools/SputnikConverter/ES5TestCase.cs b/tools/SputnikConverter/ES5TestCase.cs
index 56d43381b..4d1116a14 100644
--- a/tools/SputnikConverter/ES5TestCase.cs
+++ b/tools/SputnikConverter/ES5TestCase.cs
@@ -89,9 +89,8 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
if (script.IsNegative)
{
//Add details in stringbuilder.
- string folderPath = GetPartialPath(destFullPath, 3);
StringBuilder sb = new StringBuilder();
- //sb.Append("GlobalScopeTests[\"GlobalScope/" + script.pathFromRoot.Replace("\\", "/") + "\"]");
+ //sb.Append("GlobalScopeTests[script.pathFromRoot.Replace("\\", "/") + "\"]");
sb.Append("GlobalScopeTests[\"" + script.id + "\"]");
sb.Append("=");
string s = GetSerializedSputnikTestScript(new SputnikTestScript()
@@ -147,7 +146,7 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
}
/// <summary>
- /// Method to update the GlobalScope.js
+ /// Method to update the SputnikGlobalScope.js
/// </summary>
/// <param name="destination">Is the destination folder path</param>
public static void UpdateGlobals(string destination)
@@ -225,24 +224,5 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
string inputTemplatePath = ConfigurationManager.AppSettings[configSetting].ToString();
return (new StreamReader(inputTemplatePath)).ReadToEnd();
}
-
- private static string GetPartialPath(string fullPath, int levelsRequired)
- {
- string remainingString = fullPath;
- string[] partialPaths = new string[levelsRequired];
- string finalPath = "GlobalScope";
-
- for (int iterator = 0; iterator < levelsRequired; iterator++)
- {
- partialPaths[iterator] = remainingString.Substring(remainingString.LastIndexOf(@"\"));
- remainingString = remainingString.Substring(0, remainingString.LastIndexOf(@"\"));
- }
-
- for (int iterator = partialPaths.Length - 1; iterator >= 0; iterator--)
- {
- finalPath += partialPaths[iterator];
- }
- return finalPath;
- }
}
}
diff --git a/tools/SputnikConverter/Program.cs b/tools/SputnikConverter/Program.cs
index dc8534411..e298f5353 100644
--- a/tools/SputnikConverter/Program.cs
+++ b/tools/SputnikConverter/Program.cs
@@ -12,7 +12,6 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
{
string source = string.Empty;
string destination = string.Empty;
- string globalScopeDestination = string.Empty;
if (args == null || args.Length < 2)
{
@@ -20,13 +19,6 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
}
source = args[0];
destination = args[1];
- if (!Directory.Exists(destination))
- {
- Directory.CreateDirectory(destination);
- }
-
-
- globalScopeDestination = destination.Remove(destination.LastIndexOf("\\") + 1) + "GlobalScope";
string root = "conformance";
@@ -37,24 +29,17 @@ namespace Microsoft.Sputnik.Interop.ParserEngine
if (Directory.Exists(source))
{
string[] filePaths = Directory.GetFiles(source, "*.js", SearchOption.AllDirectories);
- ES5TestScript.InitGlobals(globalScopeDestination);
+ ES5TestScript.InitGlobals(destination);
foreach (string filePath in filePaths)
{
SputnikTestScript testScript = new SputnikTestScript();
testScript.Load(filePath, root);
- if (testScript.IsNegative)
- {
- ES5TestScript.Save(testScript, root, globalScopeDestination);
- }
- else
- {
- ES5TestScript.Save(testScript, root, destination);
- }
+ ES5TestScript.Save(testScript, root, destination);
countInputFiles++;
}
- ES5TestScript.UpdateGlobals(globalScopeDestination);
+ ES5TestScript.UpdateGlobals(destination);
}
Logger.WriteToLog(ResourceClass.Total_Input_Files, countInputFiles.ToString());
Logger.WriteToLog(ResourceClass.Total_Output_Files, ES5TestScript.OutputFileCounter.ToString());
diff --git a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
index 6e020c31f..cf1ac1444 100644
--- a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
+++ b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.exe
Binary files differ
diff --git a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
index b4ced4221..a1b1a7266 100644
--- a/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
+++ b/tools/SputnikConverter/bin/Debug/Microsoft.Sputnik.Interop.ParserEngine.pdb
Binary files differ
diff --git a/tools/TestCaseHTMLPackager/TestCasePackager.py b/tools/TestCaseHTMLPackager/TestCasePackager.py
index 18c351bc6..ed0dd86e6 100644
--- a/tools/TestCaseHTMLPackager/TestCasePackager.py
+++ b/tools/TestCaseHTMLPackager/TestCasePackager.py
@@ -14,7 +14,7 @@ MAX_CASES_PER_JSON = 1000
#Directories under "test\suite\" containing ES5 test chapter directories
#with *.js tests underneath them
-TEST_CONTRIB_DIRS = ["sputnik_converted", "ietestcenter", "globalscope"]
+TEST_CONTRIB_DIRS = ["sputnik_converted", "ietestcenter"]
#Global scope source files found directly under "test\suite\".
GLOBAL_SCOPE_FILES = ["SputnikGlobalScope.js"]
@@ -200,9 +200,6 @@ for chapter in TEST_SUITE_SECTIONS:
if EXCLUDE_LIST.count(testName)==0:
# dictionary for each test
testDict = {}
- #if chapterName=='globalscope':
- # testDict["path"] = test[test.lower().index("globalscope"):]
- #else:
testDict["id"] = testName
tempFile = open(test, "r")
@@ -271,6 +268,8 @@ for filename in [x for x in os.listdir(TEST262_HARNESS_DIR) if x.endswith(".js")
#Copying the global scope files over as well
#TODO: really the HTML harness file should be generated as well...
+print ""
+print "Deploying global scope metadata files to 'TEST262_WEB_HARNESS_DIR'..."
for gsf in GLOBAL_SCOPE_FILES:
shutil.copy(os.path.join(TEST262_CASES_DIR, gsf),
os.path.join(TEST262_WEB_CASES_DIR, gsf))