override fun processCommand()

in src/main/kotlin/org/jetbrains/kotlin/tools/testutils/IntegrationTestRunner.kt [59:76]


    override fun processCommand(args: Array<out String>, currentDirectory: String?): Future<out CliResult> {
        // TODO support comma-separated list of arguments?
        return try {
            val suite = findSuite(args).first()
            suite.setUp()
            try {
                suite.run(subArgs(args), currentDirectory)
            } finally {
                suite.tearDown()
            }
            CliResult.ok()
        } catch (_: IllegalUserArgumentException) {
            CliResult.error(2, "Invalid command line arguments")
        } catch (e: Exception) {
            e.printStackTrace()
            CliResult.error(3,"Failed to run ${args[1]}")
        }
    }