-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
We have a few cpp tests that execute very similar commands. Instead, we should create a function that each test calls. This function could look like this:
"cppsuite-test":
- command: shell.exec
params:
working_dir: "wiredtiger/build_posix/"
script: |
set -o errexit
set -o verbose
${test_env_vars|} $(pwd)/test/cppsuite/run -t ${test_name} -C '${test_config_extra}' -f test/cppsuite/configs/${test_config} -l 2
And a test would call it this way:
- name: cppsuite-base-test-default
tags: ["pull_request"]
depends_on:
- name: compile
commands:
- func: "fetch artifacts"
- func: "cppsuite-test"
vars:
test_name: base_test
test_config: base_test_default.txt
test_config_extra: debug_mode=(cursor_copy=true)