mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
[PR #738] [MERGED] Polish test result running and reporting #702
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/738
Author: @bioball
Created: 10/24/2024
Status: ✅ Merged
Merged: 10/29/2024
Merged by: @bioball
Base:
main← Head:polish-tests📝 Commits (6)
704eadcPolish test result running and reportingfc75b85Consider writing tests as failures2eaec7brename stdErr to logs9bd95b7Present numbers next to failing examplesd2e7e5aAdd source location to expected outputfb795c9Update thrown example exit code, fix Windows tests📊 Changes
15 files changed (+852 additions, -709 deletions)
View changed files
📝
docs/modules/pkl-cli/pages/index.adoc(+4 -0)📝
pkl-cli/src/main/kotlin/org/pkl/cli/CliTestRunner.kt(+4 -1)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt(+18 -0)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliTestRunnerTest.kt(+120 -17)📝
pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliTestException.kt(+1 -1)📝
pkl-core/src/main/java/org/pkl/core/Evaluator.java(+2 -3)📝
pkl-core/src/main/java/org/pkl/core/EvaluatorImpl.java(+0 -1)➕
pkl-core/src/main/java/org/pkl/core/TestResults.java(+301 -0)➖
pkl-core/src/main/java/org/pkl/core/runtime/TestResults.java(+0 -358)📝
pkl-core/src/main/java/org/pkl/core/runtime/TestRunner.java(+193 -126)📝
pkl-core/src/main/java/org/pkl/core/stdlib/test/report/JUnitReport.java(+36 -32)📝
pkl-core/src/main/java/org/pkl/core/stdlib/test/report/SimpleReport.java(+30 -24)📝
pkl-core/src/main/java/org/pkl/core/stdlib/test/report/TestReport.java(+1 -1)📝
pkl-core/src/test/kotlin/org/pkl/core/EvaluateTestsTest.kt(+28 -28)📝
pkl-gradle/src/test/kotlin/org/pkl/gradle/TestsTest.kt(+114 -117)📄 Description
Changes:
TestResultsto packageorg.pkl.core, because it is a public class (it's the result ofEvaluator#evaluateTest)TestResultsto be a record, and introduce builders.TestResultspkl testwill exit with code 2 if the only failing tests are due to writing examples. Primary motivation: not checking inpkl-expected.pcffiles should not be a passing test in CI. The expected output file is part of the specification of the test, and users are meant to review them and check them into source control.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.