1 | #!/usr/bin/env Rscript
|
2 | #
|
3 | # benchmarks/report_test.R
|
4 |
|
5 | source('benchmarks/report.R')
|
6 |
|
7 | library(RUnit)
|
8 |
|
9 | TestShellLabels = function() {
|
10 | shell_name = '_bin/cxx-opt/osh'
|
11 | shell_hash = 'abcdef'
|
12 | d = data.frame(shell_hash = c('abcdef'))
|
13 |
|
14 | label = ShellLabels(shell_name, shell_hash, 1)
|
15 | checkEquals('opt/osh', label)
|
16 |
|
17 | shell_name = 'yy/zz/_bin/cxx-opt/osh'
|
18 | label = ShellLabels(shell_name, shell_hash, 1)
|
19 | checkEquals('opt/osh', label)
|
20 |
|
21 | shell_name = 'yy/zz/_bin/cxx-opt/mycpp-souffle/osh'
|
22 | label = ShellLabels(shell_name, shell_hash, 1)
|
23 | checkEquals('opt/osh-souffle', label)
|
24 |
|
25 | shell_name = 'yy/zz/_bin/cxx-opt+bumpleak/osh'
|
26 | label = ShellLabels(shell_name, shell_hash, 1)
|
27 | checkEquals('bumpleak/osh', label)
|
28 | }
|
29 |
|
30 | main = function(argv) {
|
31 | TestShellLabels()
|
32 | }
|
33 |
|
34 | if (length(sys.frames()) == 0) {
|
35 | main(commandArgs(TRUE))
|
36 | }
|