From 73f631a19279ce3be724f9bbd416836def4a4197 Mon Sep 17 00:00:00 2001 From: olabusayoT <50379531+olabusayoT@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:57:30 -0400 Subject: [PATCH] Add test as dependency to daffodil-test-integration - currently, we only ensure the daffodil-cli and daffodil-uds jars are built, so when some of our tests fork they can correctly reference the jars in the classpaths we set up for them. Many tests reference daffodil-test, so when you try to run daffodil-test-integration/test from a clean repo, some tests fail so we have to ensure daffodil-test is built and available as well. - add forks to cli project DAFFODIL-2933 --- build.sbt | 2 +- .../test/scala/org/apache/daffodil/cliTest/TestCLIUdfs.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 8e6f4f9395..a711217bfa 100644 --- a/build.sbt +++ b/build.sbt @@ -195,7 +195,7 @@ lazy val testIBM1 = Project("daffodil-test-ibm1", file("daffodil-test-ibm1")) lazy val testIntegration = Project("daffodil-test-integration", file("daffodil-test-integration")) - .dependsOn(cli % "test->test", udf % "test->test") + .dependsOn(cli % "test->test", udf % "test->test", testDaf % "test->test") .settings(commonSettings, nopublish) .settings( // CLI integration tests fork a new process which requires extra memory, so these should diff --git a/daffodil-test-integration/src/test/scala/org/apache/daffodil/cliTest/TestCLIUdfs.scala b/daffodil-test-integration/src/test/scala/org/apache/daffodil/cliTest/TestCLIUdfs.scala index f43725cc0e..4339903cc2 100644 --- a/daffodil-test-integration/src/test/scala/org/apache/daffodil/cliTest/TestCLIUdfs.scala +++ b/daffodil-test-integration/src/test/scala/org/apache/daffodil/cliTest/TestCLIUdfs.scala @@ -47,7 +47,7 @@ class TestCLIUdfs { "daffodil-udf/src/test/resources/org/apache/daffodil/udf/genericUdfSchema.xsd" ) - runCLI(args"-v parse -s $schema -r fn_func") { cli => + runCLI(args"-v parse -s $schema -r fn_func", fork = true) { cli => cli.send("strng", inputDone = true) cli.expect("") cli.expect("strng") @@ -65,7 +65,7 @@ class TestCLIUdfs { "daffodil-udf/src/test/resources/org/apache/daffodil/udf/genericUdfSchema.xsd" ) - runCLI(args"-v parse -s $schema -r user_func1") { cli => + runCLI(args"-v parse -s $schema -r user_func1", fork = true) { cli => cli.send("strng", inputDone = true) cli.expectErr("[error] Schema Definition Error: Unsupported function: jsudf:replace") }(ExitCode.UnableToCreateProcessor)