Package io.apigee.trireme.core

Examples of io.apigee.trireme.core.ScriptStatus


        return code;
    }

    public ScriptStatus getStatus()
    {
        return new ScriptStatus(code);
    }
View Full Code Here


    {
        NodeScript script = env.createScript(name,
                                             new File("./target/test-classes/testscripts/" + name),
                                             null);
        try {
            ScriptStatus status = script.execute().get();
            assertEquals(0, status.getExitCode());
        } catch (ExecutionException ee) {
            if (ee.getCause() instanceof RhinoException) {
                System.err.println(((RhinoException)ee.getCause()).getScriptStackTrace());
            }
            ee.getCause().printStackTrace(System.err);
View Full Code Here

        throws NodeException, InterruptedException, ExecutionException
    {
        NodeScript script = env.createScript("hellotest.js",
                                             new File("target/test-classes/hellotest.js"),
                                             null);
        ScriptStatus status = script.execute().get();
        assertEquals(0, status.getExitCode());
        script.close();
    }
View Full Code Here

        String npmTestsDir = new File("./target/test-classes/argo").getAbsolutePath();
        NodeScript script = env.createScript("npmoutdated.js",
                                             new File(npmTests, "npmoutdated.js"),
                                             new String[] { npmTestsDir, cacheDir });
        ScriptFuture future = script.execute();
        ScriptStatus status = future.get();
        assertTrue(status.isOk());
    }
View Full Code Here

        String npmTestsDir = new File(npmTests, "apitest").getAbsolutePath();
        NodeScript script = env.createScript("npmupdate.js",
                                             new File(npmTests, "npmupdate.js"),
                                             new String[] { npmTestsDir, cacheDir });
        ScriptFuture future = script.execute();
        ScriptStatus status = future.get();
        assertTrue(status.isOk());
    }
View Full Code Here

        String npmTestsDir = new File(npmTests, "apitest").getAbsolutePath();
        NodeScript script = env.createScript("npmupdate.js",
                                             new File(npmTests, "npmupdate.js"),
                                             new String[] { npmTestsDir, cacheDir });
        ScriptFuture future = script.execute();
        ScriptStatus status = future.get();
        assertTrue(status.isOk());
    }
View Full Code Here

        throws InterruptedException, ExecutionException, NodeException
    {
        NodeScript script = env.createScript("test.js",
                                             "console.log(\'Hello, World!\');process.exit(0);  ",
                                             null);
        ScriptStatus stat = script.execute().get();
        assertEquals(0, stat.getExitCode());
    }
View Full Code Here

    {
        NodeScript script = env.createScript("moduletest",
                                             new File("./target/test-classes/tests/moduletest.js"),
                                             null);
        script.setDisplayName("ModuleLoadDisplayNameTest");
        ScriptStatus status = script.execute().get();
        assertEquals(0, status.getExitCode());
        script.close();
    }
View Full Code Here

        assertNotNull(modIn);
        String source = Utils.readStream(modIn);
        NodeScript script = env.createScript("moduleteststring.js",
                                             source,
                                             null);
        ScriptStatus stat = script.execute().get();
        assertEquals(0, stat.getExitCode());
    }
View Full Code Here

        NodeEnvironment rootEnv = new NodeEnvironment();
        rootEnv.setSandbox(sb);
        NodeScript script = rootEnv.createScript("chroottest.js",
                                             new File("./target/test-classes/tests/chroottest.js"),
                                             null);
        ScriptStatus stat = script.execute().get();
        assertEquals(0, stat.getExitCode());
    }
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.ScriptStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.