@@ -24,7 +24,7 @@ import scala.tools.nsc.reporters.ConsoleReporter
2424import scala .tools .nsc .util .stackTraceString
2525import scala .util .{Failure , Success , Try }
2626import ClassPath .join
27- import TestState .{Crash , Fail , Pass , Uninitialized , Updated }
27+ import TestState .{Crash , Fail , Pass , Skip , Uninitialized , Updated }
2828import FileManager .{compareContents , joinPaths , withTempFile }
2929import scala .reflect .internal .util .ScalaClassLoader .URLClassLoader
3030import scala .util .control .ControlThrowable
@@ -107,6 +107,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
107107
108108 def genPass () = Pass (testFile)
109109 def genFail (reason : String ) = Fail (testFile, reason, _transcript.fail.toArray)
110+ def genSkip (reason : String ) = Skip (testFile, reason)
110111 def genTimeout () = Fail (testFile, " timed out" , _transcript.fail.toArray)
111112 def genCrash (caught : Throwable ) = Crash (testFile, caught, _transcript.fail.toArray)
112113 def genUpdated () = Updated (testFile)
@@ -216,7 +217,6 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
216217 }
217218 }
218219
219-
220220 /** Runs command redirecting standard out and
221221 * error out to output file.
222222 */
@@ -688,11 +688,12 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
688688 }
689689
690690 private def runRunTest (): Unit = {
691- val argsFile = testFile changeExtension " javaopts"
691+ val argsFile = testFile changeExtension " javaopts"
692692 val javaopts = readOptionsFile(argsFile)
693693 val execInProcess = PartestDefaults .execInProcess && javaopts.isEmpty && ! Set (" specialized" , " instrumented" ).contains(testFile.getParentFile.getName)
694694 def exec () = if (execInProcess) execTestInProcess(outDir, logFile) else execTest(outDir, logFile)
695- runTestCommon(exec() && diffIsOk)
695+ def noexec () = suiteRunner.noexec && { setLastState(genSkip(" no-exec: tests compiled but not run" )) ; true }
696+ runTestCommon(noexec() || exec() && diffIsOk)
696697 }
697698
698699 private def decompileClass (clazz : Class [_], isPackageObject : Boolean ): String = {
@@ -761,6 +762,7 @@ class SuiteRunner(
761762 val fileManager : FileManager ,
762763 val updateCheck : Boolean ,
763764 val failed : Boolean ,
765+ val noexec : Boolean ,
764766 val nestUI : NestUI ,
765767 val javaCmdPath : String = PartestDefaults .javaCmd,
766768 val javacCmdPath : String = PartestDefaults .javacCmd,
0 commit comments