changeset 27:76ed2d58c871

- reused home path between all srcsrv-related utilities - extracted JetSymbols utility class
author Evgeniy.Koshkin
date Wed, 07 Aug 2013 18:37:23 +0400
parents 87b24e4efcc3
children 646f64aca657
files agent/src/jetbrains/buildServer/symbols/PdbFilePatcher.java agent/src/jetbrains/buildServer/symbols/PdbStrExe.java agent/src/jetbrains/buildServer/symbols/PdbStrExeCommand.java agent/src/jetbrains/buildServer/symbols/SrcToolExe.java agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java agent/src/jetbrains/buildServer/symbols/tools/JetSymbolsExe.java agent/src/jetbrains/buildServer/symbols/tools/PdbStrExe.java agent/src/jetbrains/buildServer/symbols/tools/PdbStrExeCommands.java agent/src/jetbrains/buildServer/symbols/tools/SrcToolExe.java tests/src/PdbStrExeTest.java
diffstat 10 files changed, 213 insertions(+), 184 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/jetbrains/buildServer/symbols/PdbFilePatcher.java	Wed Aug 07 17:29:18 2013 +0400
+++ b/agent/src/jetbrains/buildServer/symbols/PdbFilePatcher.java	Wed Aug 07 18:37:23 2013 +0400
@@ -1,6 +1,9 @@
 package jetbrains.buildServer.symbols;
 
 import jetbrains.buildServer.agent.BuildProgressLogger;
+import jetbrains.buildServer.symbols.tools.PdbStrExe;
+import jetbrains.buildServer.symbols.tools.PdbStrExeCommands;
+import jetbrains.buildServer.symbols.tools.SrcToolExe;
 import jetbrains.buildServer.util.FileUtil;
 import org.apache.log4j.Logger;
 
@@ -13,9 +16,10 @@
 public class PdbFilePatcher {
 
   private static final Logger LOG = Logger.getLogger(PdbFilePatcher.class);
+  private static final File TOOLS_HOME_DIR = new File("c:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x64\\srcsrv\\");
 
-  private final PdbStrExe myPdbStrExe = new PdbStrExe();
-  private final SrcToolExe mySrcToolExe = new SrcToolExe();
+  private final PdbStrExe myPdbStrExe = new PdbStrExe(TOOLS_HOME_DIR);
+  private final SrcToolExe mySrcToolExe = new SrcToolExe(TOOLS_HOME_DIR);
 
   private final File myHomeDir;
   private SrcSrvStreamBuilder mySrcSrvStreamBuilder;
@@ -35,6 +39,6 @@
     }
     final File tmpFile = FileUtil.createTempFile(myHomeDir, "pdb-", ".patch", false);
     mySrcSrvStreamBuilder.dumpStreamToFile(tmpFile, sourceFiles);
-    myPdbStrExe.doCommand(PdbStrExeCommand.WRITE, symbolsFile, tmpFile, PdbStrExe.SRCSRV_STREAM_NAME);
+    myPdbStrExe.doCommand(PdbStrExeCommands.WRITE, symbolsFile, tmpFile, PdbStrExe.SRCSRV_STREAM_NAME);
   }
 }
--- a/agent/src/jetbrains/buildServer/symbols/PdbStrExe.java	Wed Aug 07 17:29:18 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jetbrains.buildServer.symbols;
-
-import com.intellij.execution.configurations.GeneralCommandLine;
-import jetbrains.buildServer.ExecResult;
-import jetbrains.buildServer.SimpleCommandLineProcessRunner;
-
-import java.io.File;
-
-/**
- * @author Evgeniy.Koshkin
- */
-public class PdbStrExe {
-
-  public static final String SRCSRV_STREAM_NAME = "srcsrv";
-
-  private static final String STREAM_NAME_SWITCH = "-s";
-  private static final String PATH_TO_PDB_FILE_SWITCH = "-p";
-  private static final String PATH_TO_INPUT_FILE_SWITCH = "-i";
-
-  private final File myPath = new File("c:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x64\\srcsrv\\pdbstr.exe");
-
-  public ExecResult doCommand(final PdbStrExeCommand cmd, final File pdbFile, final File inputStreamFile, final String streamName){
-    final GeneralCommandLine commandLine = new GeneralCommandLine();
-    commandLine.setWorkDirectory(myPath.getParent());
-    commandLine.setExePath(myPath.getPath());
-    commandLine.addParameter(cmd.getCmdSwitch());
-    commandLine.addParameter(String.format("%s:%s", PATH_TO_PDB_FILE_SWITCH, pdbFile.getAbsolutePath()));
-    commandLine.addParameter(String.format("%s:%s", PATH_TO_INPUT_FILE_SWITCH, inputStreamFile.getAbsolutePath()));
-    commandLine.addParameter(STREAM_NAME_SWITCH + ":" + streamName);
-    return SimpleCommandLineProcessRunner.runCommand(commandLine, null);
-  }
-}
--- a/agent/src/jetbrains/buildServer/symbols/PdbStrExeCommand.java	Wed Aug 07 17:29:18 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jetbrains.buildServer.symbols;
-
-/**
- * @author Evgeniy.Koshkin
- */
-public enum PdbStrExeCommand {
-  READ {
-    @Override
-    public String getCmdSwitch() {
-      return "-r";
-    }
-  },
-  WRITE {
-    @Override
-    public String getCmdSwitch() {
-      return "-w";
-    }
-  };
-
-  public abstract String getCmdSwitch();
-}
--- a/agent/src/jetbrains/buildServer/symbols/SrcToolExe.java	Wed Aug 07 17:29:18 2013 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright 2000-2013 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package jetbrains.buildServer.symbols;
-
-import com.intellij.execution.configurations.GeneralCommandLine;
-import jetbrains.buildServer.ExecResult;
-import jetbrains.buildServer.SimpleCommandLineProcessRunner;
-import jetbrains.buildServer.util.CollectionsUtil;
-import jetbrains.buildServer.util.Converter;
-import org.jetbrains.annotations.NotNull;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * @author Evgeniy.Koshkin
- */
-public class SrcToolExe {
-  private static final String DUMP_SOURCES_FROM_PDB_SWITCH = "-r";
-
-  private final File mySrcToolPath = new File("c:\\Program Files (x86)\\Windows Kits\\8.0\\Debuggers\\x64\\srcsrv\\srctool.exe");
-
-  public Collection<File> getReferencedSourceFiles(File symbolsFile) {
-    final GeneralCommandLine commandLine = new GeneralCommandLine();
-    commandLine.setExePath(mySrcToolPath.getPath());
-    commandLine.addParameter(symbolsFile.getAbsolutePath());
-    commandLine.addParameter(DUMP_SOURCES_FROM_PDB_SWITCH);
-    final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
-    return CollectionsUtil.convertAndFilterNulls(Arrays.asList(execResult.getOutLines()), new Converter<File, String>() {
-      public File createFrom(@NotNull String source) {
-        final File file = new File(source);
-        if (file.isFile()) return file;
-        return null; //last string is not a source file path
-      }
-    });
-  }
-}
--- a/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Wed Aug 07 17:29:18 2013 +0400
+++ b/agent/src/jetbrains/buildServer/symbols/SymbolsIndexer.java	Wed Aug 07 18:37:23 2013 +0400
@@ -1,13 +1,11 @@
 package jetbrains.buildServer.symbols;
 
-import com.intellij.execution.configurations.GeneralCommandLine;
-import jetbrains.buildServer.ExecResult;
-import jetbrains.buildServer.SimpleCommandLineProcessRunner;
 import jetbrains.buildServer.agent.*;
 import jetbrains.buildServer.agent.artifacts.ArtifactsWatcher;
 import jetbrains.buildServer.agent.impl.artifacts.ArtifactsBuilderAdapter;
 import jetbrains.buildServer.agent.impl.artifacts.ArtifactsCollection;
 import jetbrains.buildServer.agent.plugins.beans.PluginDescriptor;
+import jetbrains.buildServer.symbols.tools.JetSymbolsExe;
 import jetbrains.buildServer.util.EventDispatcher;
 import jetbrains.buildServer.util.FileUtil;
 import org.apache.log4j.Logger;
@@ -16,7 +14,9 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
@@ -28,17 +28,14 @@
 
   public static final String PDB_FILE_EXTENSION = "pdb";
 
-  public static final String SYMBOLS_EXE = "JetBrains.CommandLine.Symbols.exe";
-  public static final String DUMP_SYMBOL_SIGN_CMD = "dumpSymbolSign";
-
   @NotNull private final ArtifactsWatcher myArtifactsWatcher;
-  @NotNull private final File myNativeToolPath;
+  @NotNull private final JetSymbolsExe myJetSymbolsExe;
   @Nullable private AgentRunningBuild myBuild;
   @Nullable private Collection<File> mySymbolsToProcess;
 
   public SymbolsIndexer(@NotNull final PluginDescriptor pluginDescriptor, @NotNull final EventDispatcher<AgentLifeCycleListener> agentDispatcher, @NotNull final ArtifactsWatcher artifactsWatcher) {
     myArtifactsWatcher = artifactsWatcher;
-    myNativeToolPath = new File(new File(pluginDescriptor.getPluginRoot(), "bin"), SYMBOLS_EXE);
+    myJetSymbolsExe = new JetSymbolsExe(new File(pluginDescriptor.getPluginRoot(), "bin"));
 
     agentDispatcher.addListener(new AgentLifeCycleAdapter() {
       @Override
@@ -58,7 +55,8 @@
           LOG.debug("Symbols weren't found in artifacts to be published.");
         } else {
           try {
-            final File symbolSignaturesFile = dumpSymbolSignatures(mySymbolsToProcess, myBuild.getBuildTempDirectory(), myBuild.getBuildLogger());
+            final File symbolSignaturesFile = FileUtil.createTempFile(myBuild.getBuildTempDirectory(), "symbol-signatures-", ".xml", false);
+            myJetSymbolsExe.dumpGuidsToFile(mySymbolsToProcess, symbolSignaturesFile,  myBuild.getBuildLogger());
             if(symbolSignaturesFile.exists()){
               myArtifactsWatcher.addNewArtifactsPath(symbolSignaturesFile + "=>" + ".teamcity/symbols");
             }
@@ -131,31 +129,4 @@
     }
     return result;
   }
-
-  private File dumpSymbolSignatures(Collection<File> files, File targetDir, BuildProgressLogger buildLogger) throws IOException {
-    final File tempFile = FileUtil.createTempFile(targetDir, "symbol-signatures-", ".xml", false);
-    runNativeTool(DUMP_SYMBOL_SIGN_CMD, files, tempFile, buildLogger);
-    return tempFile;
-  }
-
-  private void runNativeTool(String cmd, Collection<File> files, File output, BuildProgressLogger buildLogger){
-    final GeneralCommandLine commandLine = new GeneralCommandLine();
-    commandLine.setExePath(myNativeToolPath.getPath());
-    commandLine.addParameter(cmd);
-    commandLine.addParameter(String.format("/o=\"%s\"", output.getPath()));
-    for(File file : files){
-      commandLine.addParameter(file.getPath());
-    }
-    buildLogger.message(String.format("Running command %s", commandLine.getCommandLineString()));
-    final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
-    final String stdout = execResult.getStdout();
-    if(!stdout.isEmpty()){
-      buildLogger.message("Stdout: " + stdout);
-    }
-    if (execResult.getExitCode() == 0) return;
-    buildLogger.warning(String.format("%s ends with non-zero exit code.", SYMBOLS_EXE));
-    buildLogger.warning("Stdout: " + stdout);
-    buildLogger.warning("Stderr: " + execResult.getStderr());
-    buildLogger.exception(execResult.getException());
-  }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/jetbrains/buildServer/symbols/tools/JetSymbolsExe.java	Wed Aug 07 18:37:23 2013 +0400
@@ -0,0 +1,44 @@
+package jetbrains.buildServer.symbols.tools;
+
+import com.intellij.execution.configurations.GeneralCommandLine;
+import jetbrains.buildServer.ExecResult;
+import jetbrains.buildServer.SimpleCommandLineProcessRunner;
+import jetbrains.buildServer.agent.BuildProgressLogger;
+
+import java.io.File;
+import java.util.Collection;
+
+/**
+ * @author Evgeniy.Koshkin
+ */
+public class JetSymbolsExe {
+
+  private static final String SYMBOLS_EXE = "JetBrains.CommandLine.Symbols.exe";
+  private static final String DUMP_SYMBOL_SIGN_CMD = "dumpSymbolSign";
+  private final File myExePath;
+
+  public JetSymbolsExe(File homeDir) {
+    myExePath = new File(homeDir, SYMBOLS_EXE);
+  }
+
+  public void dumpGuidsToFile(Collection<File> files, File output, BuildProgressLogger buildLogger){
+    final GeneralCommandLine commandLine = new GeneralCommandLine();
+    commandLine.setExePath(myExePath.getPath());
+    commandLine.addParameter(DUMP_SYMBOL_SIGN_CMD);
+    commandLine.addParameter(String.format("/o=\"%s\"", output.getPath()));
+    for(File file : files){
+      commandLine.addParameter(file.getPath());
+    }
+    buildLogger.message(String.format("Running command %s", commandLine.getCommandLineString()));
+    final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
+    final String stdout = execResult.getStdout();
+    if(!stdout.isEmpty()){
+      buildLogger.message("Stdout: " + stdout);
+    }
+    if (execResult.getExitCode() == 0) return;
+    buildLogger.warning(String.format("%s ends with non-zero exit code.", SYMBOLS_EXE));
+    buildLogger.warning("Stdout: " + stdout);
+    buildLogger.warning("Stderr: " + execResult.getStderr());
+    buildLogger.exception(execResult.getException());
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/jetbrains/buildServer/symbols/tools/PdbStrExe.java	Wed Aug 07 18:37:23 2013 +0400
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jetbrains.buildServer.symbols.tools;
+
+import com.intellij.execution.configurations.GeneralCommandLine;
+import jetbrains.buildServer.ExecResult;
+import jetbrains.buildServer.SimpleCommandLineProcessRunner;
+
+import java.io.File;
+
+/**
+ * @author Evgeniy.Koshkin
+ */
+public class PdbStrExe {
+
+  public static final String SRCSRV_STREAM_NAME = "srcsrv";
+
+  private static final String PDBSTR_EXE = "pdbstr.exe";
+  private static final String STREAM_NAME_SWITCH = "-s";
+  private static final String PATH_TO_PDB_FILE_SWITCH = "-p";
+  private static final String PATH_TO_INPUT_FILE_SWITCH = "-i";
+
+  private final File myPath;
+
+  public PdbStrExe(File homeDir) {
+    myPath = new File(homeDir, PDBSTR_EXE);
+  }
+
+  public ExecResult doCommand(final PdbStrExeCommands cmd, final File pdbFile, final File inputStreamFile, final String streamName){
+    final GeneralCommandLine commandLine = new GeneralCommandLine();
+    commandLine.setWorkDirectory(myPath.getParent());
+    commandLine.setExePath(myPath.getPath());
+    commandLine.addParameter(cmd.getCmdSwitch());
+    commandLine.addParameter(String.format("%s:%s", PATH_TO_PDB_FILE_SWITCH, pdbFile.getAbsolutePath()));
+    commandLine.addParameter(String.format("%s:%s", PATH_TO_INPUT_FILE_SWITCH, inputStreamFile.getAbsolutePath()));
+    commandLine.addParameter(STREAM_NAME_SWITCH + ":" + streamName);
+    return SimpleCommandLineProcessRunner.runCommand(commandLine, null);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/jetbrains/buildServer/symbols/tools/PdbStrExeCommands.java	Wed Aug 07 18:37:23 2013 +0400
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jetbrains.buildServer.symbols.tools;
+
+/**
+ * @author Evgeniy.Koshkin
+ */
+public enum PdbStrExeCommands {
+  READ {
+    @Override
+    public String getCmdSwitch() {
+      return "-r";
+    }
+  },
+  WRITE {
+    @Override
+    public String getCmdSwitch() {
+      return "-w";
+    }
+  };
+
+  public abstract String getCmdSwitch();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/src/jetbrains/buildServer/symbols/tools/SrcToolExe.java	Wed Aug 07 18:37:23 2013 +0400
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jetbrains.buildServer.symbols.tools;
+
+import com.intellij.execution.configurations.GeneralCommandLine;
+import jetbrains.buildServer.ExecResult;
+import jetbrains.buildServer.SimpleCommandLineProcessRunner;
+import jetbrains.buildServer.util.CollectionsUtil;
+import jetbrains.buildServer.util.Converter;
+import org.jetbrains.annotations.NotNull;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * @author Evgeniy.Koshkin
+ */
+public class SrcToolExe {
+  private static final String DUMP_SOURCES_FROM_PDB_SWITCH = "-r";
+  private static final String SRCTOOL_EXE = "srctool.exe";
+
+  private final File mySrcToolPath;
+
+  public SrcToolExe(File homeDir) {
+    mySrcToolPath = new File(homeDir, SRCTOOL_EXE);
+  }
+
+  public Collection<File> getReferencedSourceFiles(File symbolsFile) {
+    final GeneralCommandLine commandLine = new GeneralCommandLine();
+    commandLine.setExePath(mySrcToolPath.getPath());
+    commandLine.addParameter(symbolsFile.getAbsolutePath());
+    commandLine.addParameter(DUMP_SOURCES_FROM_PDB_SWITCH);
+    final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
+    return CollectionsUtil.convertAndFilterNulls(Arrays.asList(execResult.getOutLines()), new Converter<File, String>() {
+      public File createFrom(@NotNull String source) {
+        final File file = new File(source);
+        if (file.isFile()) return file;
+        return null; //last string is not a source file path
+      }
+    });
+  }
+}
--- a/tests/src/PdbStrExeTest.java	Wed Aug 07 17:29:18 2013 +0400
+++ b/tests/src/PdbStrExeTest.java	Wed Aug 07 18:37:23 2013 +0400
@@ -17,8 +17,8 @@
 import com.intellij.openapi.util.io.FileUtil;
 import jetbrains.buildServer.BaseTestCase;
 import jetbrains.buildServer.ExecResult;
-import jetbrains.buildServer.symbols.PdbStrExe;
-import jetbrains.buildServer.symbols.PdbStrExeCommand;
+import jetbrains.buildServer.symbols.tools.PdbStrExe;
+import jetbrains.buildServer.symbols.tools.PdbStrExeCommands;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -36,7 +36,7 @@
 
   @BeforeMethod
   public void setUp() throws Exception {
-    myTool = new PdbStrExe();
+    myTool = new PdbStrExe(new File("aaa"));
     File homeDir = createTempDir();
 
     File file = new File(homeDir, "notIndexed.pdb");
@@ -54,7 +54,7 @@
   public void testRead() throws Exception {
     final File tempFile = createTempFile();
     assertTrue(tempFile.length() == 0);
-    ExecResult execResult = myTool.doCommand(PdbStrExeCommand.READ, myIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
+    ExecResult execResult = myTool.doCommand(PdbStrExeCommands.READ, myIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
     assertEquals(0, execResult.getExitCode());
     assertFalse(tempFile.length() == 0);
   }
@@ -63,14 +63,14 @@
   public void testWrite() throws IOException {
     final File tempFile = createTempFile();
     assertTrue(tempFile.length() == 0);
-    myTool.doCommand(PdbStrExeCommand.READ, myNotIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
+    myTool.doCommand(PdbStrExeCommands.READ, myNotIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
     assertTrue(tempFile.length() == 0);
 
     File inputStreamFile = new File("c:\\temp\\pdb-patch.txt");
     assertFalse(inputStreamFile.length() == 0);
-    myTool.doCommand(PdbStrExeCommand.WRITE, myNotIndexedPdbFile, inputStreamFile, PdbStrExe.SRCSRV_STREAM_NAME);
+    myTool.doCommand(PdbStrExeCommands.WRITE, myNotIndexedPdbFile, inputStreamFile, PdbStrExe.SRCSRV_STREAM_NAME);
 
-    myTool.doCommand(PdbStrExeCommand.READ, myNotIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
+    myTool.doCommand(PdbStrExeCommands.READ, myNotIndexedPdbFile, tempFile, PdbStrExe.SRCSRV_STREAM_NAME);
     assertFalse(tempFile.length() == 0);
   }
 }