Permalink
Please sign in to comment.
Browse files
Publish all test results under oilshell.org/release/$VERSION/.
- Tweak the unit test runner, make a report with R, and hook it up to scripts/release.sh.
- Loading branch information...
Showing
with
127 additions
and 28 deletions.
- +0 −5 benchmarks/report.R
- +12 −7 doc/release-index.md
- +21 −4 scripts/release.sh
- +24 −4 test/gold.sh
- +1 −1 test/osh2oil.sh
- +55 −0 test/report.R
- +14 −7 test/unit.sh
| @@ -0,0 +1,55 @@ | ||
| #!/usr/bin/Rscript | ||
| # | ||
| # report.R | ||
| library(dplyr) | ||
| library(ggplot2) | ||
| options(stringsAsFactors = F) | ||
| source('benchmarks/common.R') | ||
| UnitTestReport = function(in_dir, out_dir) { | ||
| tasks = read.csv(file.path(in_dir, 'tasks.csv')) | ||
| tasks %>% filter(status != 0) -> failed | ||
| if (nrow(failed) != 0) { | ||
| print(failed) | ||
| stop('Some tasks failed') | ||
| } | ||
| tasks %>% | ||
| mutate(elapsed_ms = elapsed_secs * 1000) %>% | ||
| select(-c(status, elapsed_secs)) %>% | ||
| select(c(elapsed_ms, test, test_HREF)) -> | ||
| tasks | ||
| precision = SamePrecision(0) | ||
| writeCsv(tasks, file.path(out_dir, 'report'), precision) | ||
| } | ||
| main = function(argv) { | ||
| action = argv[[1]] | ||
| in_dir = argv[[2]] | ||
| out_dir = argv[[3]] | ||
| if (action == 'unit') { | ||
| UnitTestReport(in_dir, out_dir) | ||
| } else if (action == 'spec') { | ||
| # TODO | ||
| } else { | ||
| Log("Invalid action '%s'", action) | ||
| quit(status = 1) | ||
| } | ||
| Log('PID %d done', Sys.getpid()) | ||
| } | ||
| if (length(sys.frames()) == 0) { | ||
| # increase ggplot font size globally | ||
| #theme_set(theme_grey(base_size = 20)) | ||
| main(commandArgs(TRUE)) | ||
| } |
0 comments on commit
55d611f