Skip to content

Commit

Permalink
[cpp] Create GOOD_TESTS and run with 'rvroot' variant
Browse files Browse the repository at this point in the history
[benchmarks/compute] Adjust precision
  • Loading branch information
Andy C committed Nov 11, 2022
1 parent 01bdb10 commit 12cf91e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions benchmarks/report.R
Expand Up @@ -708,9 +708,9 @@ ComputeReport = function(in_dir, out_dir) {
details %>% filter(task_name == 'bubble_sort') %>% select(-c(task_name)) -> bubble_sort
details %>% filter(task_name == 'palindrome' & arg1 == 'unicode') %>% select(-c(task_name)) -> palindrome

writeTsv(details, file.path(out_dir, 'details'))

precision = ColumnPrecision(list(max_rss_MB = 1), default = 0)
writeTsv(details, file.path(out_dir, 'details'), precision)

writeTsv(hello, file.path(out_dir, 'hello'), precision)
writeTsv(fib, file.path(out_dir, 'fib'), precision)
writeTsv(word_freq, file.path(out_dir, 'word_freq'), precision)
Expand Down
2 changes: 2 additions & 0 deletions cpp/NINJA_subgraph.py
Expand Up @@ -13,6 +13,8 @@
('cxx', 'dbg', '-D CPP_UNIT_TEST'),
('cxx', 'asan', '-D CPP_UNIT_TEST'),
('cxx', 'ubsan', '-D CPP_UNIT_TEST'),
#('cxx', 'gcevery', '-D CPP_UNIT_TEST'),
#('cxx', 'rvroot', '-D CPP_UNIT_TEST'),
('clang', 'coverage', '-D CPP_UNIT_TEST'),
]

Expand Down
26 changes: 18 additions & 8 deletions cpp/TEST.sh
Expand Up @@ -53,14 +53,22 @@ pre-build() {
build/py.sh fastmatch
}

# Tests that pass with the garbage collector on.
# TODO: Move all tests here

readonly -a GOOD_TESTS=(
cpp/qsn_test
cpp/core_test
)

unit() {
### Run unit tests in this dir; used by test/cpp-unit.sh

run-one-test cpp/qsn_test '' ubsan
run-one-test cpp/qsn_test '' gcevery

run-one-test cpp/core_test '' ubsan
run-one-test cpp/core_test '' gcevery
for t in "${GOOD_TESTS[@]}"; do
run-one-test $t '' ubsan
run-one-test $t '' gcevery
run-one-test $t '' rvroot
done

# Doesn't run with GC_EVERY_ALLOC
run-one-test cpp/leaky_core_test '' ubsan
Expand All @@ -69,6 +77,8 @@ unit() {
# Need -D CPP_UNIT_TEST
run-special-test cpp/leaky_frontend_flag_spec_test '' ubsan
run-special-test cpp/leaky_frontend_flag_spec_test '' asan
# Doesn't work
# run-special-test cpp/leaky_frontend_flag_spec_test '' gcevery

# Runs in different dir
leaky-binding-test '' ubsan
Expand All @@ -86,9 +96,9 @@ coverage() {

pre-build

run-one-test cpp/qsn_test clang coverage
run-one-test cpp/core_test clang coverage
run-one-test cpp/leaky_core_test clang coverage
for t in "${GOOD_TESTS[@]}"; do
run-one-test $t clang coverage
done

# Need -D CPP_UNIT_TEST
run-special-test cpp/leaky_frontend_flag_spec_test clang coverage
Expand Down

0 comments on commit 12cf91e

Please sign in to comment.