fun runTests()

in buildSrc/src/main/kotlin/software/amazon/smithy/gradle/tasks/ProtocolTestTask.kt [21:42]


    fun runTests(){
        require(protocol.isNotEmpty()) { "protocol name must be specified" }
        require(plugin.isNotEmpty()) { "plugin name must be specified" }

        val generatedBuildDir = project.file("${project.buildDir}/smithyprojections/${project.name}/$protocol/$plugin")
        println("[$protocol] buildDir: $generatedBuildDir")
        if (!generatedBuildDir.exists()) {
            throw GradleException("$generatedBuildDir does not exist")
        }

        project.exec {
            workingDir = generatedBuildDir
            executable = "cat"
            args = listOf("Package.swift")
        }

        project.exec {
            workingDir = generatedBuildDir
            executable = "swift"
            args = listOf("test")
        }
    }