Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed Jul 26, 2024
1 parent a2e9d2e commit 43cc30a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/main/kotlin/cmu/pasta/fray/core/TestRunner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ class TestRunner(val config: Configuration) {
config.executionInfo.executor.execute()
} else {
setup()
val outputFile = Paths.get(config.report, "output.txt").toFile()
val timeSource = TimeSource.Monotonic
val start = timeSource.markNow()
var i = 0
while (i != config.iter) {
println("Starting iteration $i")
outputFile.appendText("Starting iteration $i\n")
try {
Runtime.DELEGATE = RuntimeDelegate()
Runtime.start()
Expand All @@ -48,8 +49,8 @@ class TestRunner(val config: Configuration) {
Runtime.onMainExit()
}
if (GlobalContext.bugFound) {
println(
"Error found at iter: $i, Elapsed time: ${(timeSource.markNow() - start).inWholeMilliseconds}ms")
outputFile.appendText(
"Error found at iter: $i, Elapsed time: ${(timeSource.markNow() - start).inWholeMilliseconds}ms\n")
if (!config.exploreMode) {
break
}
Expand Down

0 comments on commit 43cc30a

Please sign in to comment.