mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
add debug code to find the error on travis
This commit is contained in:
parent
8c4a704b85
commit
f755d6fa1b
@ -24,6 +24,7 @@ import java.io.InputStream;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
import org.junit.rules.TemporaryFolder;
|
import org.junit.rules.TemporaryFolder;
|
||||||
@ -206,8 +207,8 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
* @return the output of the script
|
* @return the output of the script
|
||||||
*/
|
*/
|
||||||
public String evalWasm( ScriptEngine script, String methodName, Object... params ) {
|
public String evalWasm( ScriptEngine script, String methodName, Object... params ) {
|
||||||
|
ProcessBuilder processBuilder = null;
|
||||||
try {
|
try {
|
||||||
ProcessBuilder processBuilder;
|
|
||||||
switch( script ) {
|
switch( script ) {
|
||||||
case SpiderMonkey:
|
case SpiderMonkey:
|
||||||
processBuilder = spiderMonkeyCommand();
|
processBuilder = spiderMonkeyCommand();
|
||||||
@ -233,6 +234,19 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
return result;
|
return result;
|
||||||
} catch( Throwable ex ) {
|
} catch( Throwable ex ) {
|
||||||
failed = true;
|
failed = true;
|
||||||
|
ex.printStackTrace();
|
||||||
|
|
||||||
|
if( processBuilder != null ) {
|
||||||
|
String executable = processBuilder.command().get( 0 );
|
||||||
|
System.err.println( executable );
|
||||||
|
File exec = new File(executable);
|
||||||
|
System.err.println( exec.exists() );
|
||||||
|
exec = exec.getParentFile();
|
||||||
|
if( exec != null ) {
|
||||||
|
System.err.println( Arrays.toString( exec.list() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throwException( ex );
|
throwException( ex );
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user