-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-32647][INFRA] Report SparkR test results with JUnit reporter #29456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c040c77
8fb651a
5bca181
603268e
1fe2806
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,15 +61,18 @@ if (identical(Sys.getenv("NOT_CRAN"), "true")) { | |
| set.seed(42) | ||
|
|
||
| # TODO (SPARK-30663) To be removed once testthat 1.x is removed from all builds | ||
| if (grepl("^1\\..*", packageVersion("testthat"))) { | ||
| if (packageVersion("testthat")$major <= 1) { | ||
| # testthat 1.x | ||
| test_runner <- testthat:::run_tests | ||
| reporter <- "summary" | ||
|
|
||
| } else { | ||
| # testthat >= 2.0.0 | ||
| test_runner <- testthat:::test_package_dir | ||
| reporter <- testthat::default_reporter() | ||
| dir.create("target/test-reports", showWarnings = FALSE) | ||
| reporter <- MultiReporter$new(list( | ||
| SummaryReporter$new(), | ||
| JunitReporter$new(file = "target/test-reports/test-results.xml") | ||
|
Comment on lines
+73
to
+74
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need both
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, otherwise, the console output is not shown. I manually tested. It was previously in Jenkins (ever since we switched the default system encoding if I am not mistaken). Now it follows the default format There are no differences in the report format when some tests are failed. |
||
| )) | ||
| } | ||
|
|
||
| test_runner("SparkR", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it only supported by testthat 2.0+?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks supported in testthat 1.x but testthat 1.x support here is supposed to be removed soon at SPARK-30663. I didn't bother test as Jenkins and GitHub Actions use testthat 2+ anyway.