diff options
author | David Fugate <dfugate@microsoft.com> | 2011-04-20 12:01:06 -0700 |
---|---|---|
committer | David Fugate <dfugate@microsoft.com> | 2011-04-20 12:01:06 -0700 |
commit | b055423983aa1739f41b25da2ab825e5b61f4a86 (patch) | |
tree | d51a4fc2de9274037616200e123f162211725c42 /tools/SputnikConverter/Program.cs | |
parent | 545f2c34a0de87c0fa003e272a6afbc6c13fa874 (diff) |
Removed (SputnikConverter) requirement that globally scoped tests be generated to a
'GlobalScope' directory.
Diffstat (limited to 'tools/SputnikConverter/Program.cs')
-rw-r--r-- | tools/SputnikConverter/Program.cs | 21 |
1 files changed, 3 insertions, 18 deletions
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());
|