Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
remyhaemmerle-da committed Mar 30, 2023
1 parent dbc5e0c commit 7be72b5
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import org.scalatest.Suite
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec

import java.nio.file.Files

class DamlScriptTestRunner
extends AnyWordSpec
with CantonFixture
Expand All @@ -26,6 +28,8 @@ class DamlScriptTestRunner
override protected def timeProviderType = TimeProviderType.Static
override protected def tlsEnable = false

override protected val cantonFixtureDebugMode = true

private val exe = if (sys.props("os.name").toLowerCase.contains("windows")) ".exe" else ""
val scriptPath = BazelRunfiles.rlocation("daml-script/runner/daml-script-binary" + exe)
val darPath = BazelRunfiles.rlocation("daml-script/test/script-test.dar")
Expand All @@ -41,12 +45,12 @@ class DamlScriptTestRunner
|ScriptExample:initializeUser SUCCESS
|ScriptExample:test SUCCESS
|ScriptTest:clearUsers SUCCESS
|ScriptTest:failingTest FAILURE (com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,XXXXXXXX): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = "Assertion failed" }. Details: Last location: [unknown source], partial transaction: ...
|ScriptTest:failingTest FAILURE (com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,XXXXXXXX): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = "Assertion failed" }. Details: Last location: [DA.Internal.Exception:168], partial transaction: ...
|ScriptTest:listKnownPartiesTest SUCCESS
|ScriptTest:multiPartySubmission SUCCESS
|ScriptTest:partyIdHintTest SUCCESS
|ScriptTest:sleepTest SUCCESS
|ScriptTest:stackTrace FAILURE (com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,XXXXXXXX): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = "Assertion failed" }. Details: Last location: [unknown source], partial transaction: ...
|ScriptTest:stackTrace FAILURE (com.daml.lf.engine.script.ScriptF$FailedCmd: Command submit failed: FAILED_PRECONDITION: DAML_INTERPRETATION_ERROR(9,XXXXXXXX): Interpretation error: Error: Unhandled Daml exception: DA.Exception.AssertionFailed:AssertionFailed@3f4deaf1{ message = "Assertion failed" }. Details: Last location: [DA.Internal.Exception:168], partial transaction: ...
|ScriptTest:test0 SUCCESS
|ScriptTest:test1 SUCCESS
|ScriptTest:test3 SUCCESS
Expand Down Expand Up @@ -102,6 +106,11 @@ class DamlScriptTestRunner
"DAML_INTERPRETATION_ERROR($1,XXXXXXXX)",
)

if (cantonFixtureDebugMode) {
Files.writeString(tmpDir.resolve(getClass.getSimpleName + ".expected"), expected)
Files.writeString(tmpDir.resolve(getClass.getSimpleName + ".actual"), actual)
}

actual shouldBe expected
}
}
Expand Down

0 comments on commit 7be72b5

Please sign in to comment.