Skip to content

Commit

Permalink
make logger show file name for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
l-kent committed Oct 12, 2023
1 parent 7a9ae60 commit 3835365
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/test/scala/SystemTests.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import org.scalatest.funsuite.AnyFunSuite
import util.Logger

import java.io.{BufferedWriter, File, FileWriter}
import scala.io.Source
import scala.sys.process._
import scala.sys.process.*

/** Add more tests by simply adding them to the programs directory. Refer to the existing tests for the expected
* directory structure and file-name patterns.
Expand Down Expand Up @@ -41,12 +42,13 @@ class SystemTests extends AnyFunSuite {
val outPath = variationPath + ".bpl"
val ADTPath = variationPath + ".adt"
val RELFPath = variationPath + ".relf"
Logger.info(outPath)
if (File(specPath).exists) {
Main.main(Array("--adt", ADTPath, "--relf", RELFPath, "--spec", specPath, "--output", outPath))
Main.main(Array("--adt", ADTPath, "--relf", RELFPath, "--spec", specPath, "--output", outPath, "--analyse"))
} else {
Main.main(Array("--adt", ADTPath, "--relf", RELFPath, "--output", outPath))
Main.main(Array("--adt", ADTPath, "--relf", RELFPath, "--output", outPath, "--analyse"))
}
println(outPath)
Logger.info(outPath + " done")
val boogieResult = Seq("boogie", "/timeLimit:10", "/printVerifiedProceduresCount:0", "/useArrayAxioms", outPath).!!
val resultPath = variationPath + "_result.txt"
log(boogieResult, resultPath)
Expand Down

0 comments on commit 3835365

Please sign in to comment.