@@ -6,6 +6,7 @@ import scala.language.unsafeNulls
6
6
7
7
import java .io .{File => JFile , IOException , PrintStream , ByteArrayOutputStream }
8
8
import java .lang .System .{lineSeparator => EOL }
9
+ import java .lang .management .ManagementFactory
9
10
import java .net .URL
10
11
import java .nio .file .StandardCopyOption .REPLACE_EXISTING
11
12
import java .nio .file .{Files , NoSuchFileException , Path , Paths }
@@ -459,7 +460,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
459
460
460
461
/** Print a progress bar for the current `Test` */
461
462
private def updateProgressMonitor (start : Long ): Unit =
462
- if testSourcesCompleted < sourceCount then
463
+ if testSourcesCompleted < sourceCount && ! isUserDebugging then
463
464
realStdout.print(s " \r ${makeProgressBar(start)}" )
464
465
465
466
private def finishProgressMonitor (start : Long ): Unit =
@@ -1832,6 +1833,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1832
1833
flags.options.sliding(2 ).collectFirst {
1833
1834
case Array (" -encoding" , encoding) => Charset .forName(encoding)
1834
1835
}.getOrElse(StandardCharsets .UTF_8 )
1836
+
1837
+ /** checks if the current process is being debugged */
1838
+ def isUserDebugging : Boolean =
1839
+ val mxBean = ManagementFactory .getRuntimeMXBean
1840
+ mxBean.getInputArguments.asScala.exists(_.contains(" jdwp" ))
1835
1841
}
1836
1842
1837
1843
object ParallelTesting {
0 commit comments