Skip to content

Commit 82c9304

Browse files
authored
Merge pull request #375 from BimberLab/fb_debugtest
Debug JBrowseTest
2 parents 30c3788 + f23d798 commit 82c9304

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/run/AbstractCommandWrapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public ProcessBuilder getProcessBuilder(List<String> params)
117117

118118
if (getWorkingDir() != null)
119119
{
120-
getLogger().debug("using working directory: " + getWorkingDir().getPath());
120+
getLogger().log(_logLevel, "using working directory: " + getWorkingDir().getPath());
121121
pb.directory(getWorkingDir());
122122
}
123123

@@ -208,8 +208,8 @@ private void setPath(ProcessBuilder pb)
208208

209209
if (_logPath)
210210
{
211-
getLogger().debug("Existing PATH: " + path);
212-
getLogger().debug("toolDir: " + toolDir);
211+
getLogger().log(_logLevel, "Existing PATH: " + path);
212+
getLogger().log(_logLevel, "toolDir: " + toolDir);
213213
}
214214

215215
if (path == null)
@@ -234,7 +234,7 @@ private void setPath(ProcessBuilder pb)
234234

235235
if (_logPath)
236236
{
237-
getLogger().debug("using path: " + path);
237+
getLogger().log(_logLevel, "using path: " + path);
238238
}
239239
pb.environment().put("PATH", path);
240240
}

jbrowse/src/org/labkey/jbrowse/JBrowseManager.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.labkey.api.security.permissions.InsertPermission;
4444
import org.labkey.api.sequenceanalysis.SequenceAnalysisService;
4545
import org.labkey.api.sequenceanalysis.pipeline.ReferenceGenome;
46+
import org.labkey.api.sequenceanalysis.run.AbstractCommandWrapper;
4647
import org.labkey.api.sequenceanalysis.run.SimpleScriptWrapper;
4748
import org.labkey.api.util.FileType;
4849
import org.labkey.api.util.FileUtil;
@@ -247,12 +248,26 @@ public void testJBrowseCli() throws Exception
247248
{
248249
_log.error("Non-zero exit from testJBrowseCli: " + wrapper.getLastReturnCode());
249250
wrapper.getCommandsExecuted().forEach(_log::error);
251+
_log.error("NODE_PATH: " + System.getenv("NODE_PATH"));
252+
253+
File node = AbstractCommandWrapper.resolveFileInPath("node", null, false);
254+
if (node == null)
255+
{
256+
_log.info("Unable to find node in PATH, trying node.exe");
257+
node = AbstractCommandWrapper.resolveFileInPath("node.exe", null, false);
258+
if (node == null)
259+
{
260+
_log.info("Unable to find node.exe in PATH");
261+
}
262+
}
263+
250264
_log.error("output: ");
251265
_log.error(output);
252266

253267
// Repeat without output going direct to the server log:
254268
try
255269
{
270+
_log.info("Retrying without all output direct to the system log:");
256271
wrapper.execute(Arrays.asList(exe.getPath(), "help"));
257272
}
258273
catch (Exception e)
@@ -277,11 +292,6 @@ public File getBaseDir(Container c, boolean doCreate)
277292
return null;
278293
}
279294

280-
if (fileRoot == null || !fileRoot.exists())
281-
{
282-
return null;
283-
}
284-
285295
File jbrowseDir = new File(fileRoot, ".jbrowse");
286296
if (!jbrowseDir.exists())
287297
{

0 commit comments

Comments
 (0)