-if [ "x${BT_TESTS_GREP_BIN:-}" = "x" ]; then
- BT_TESTS_GREP_BIN="grep"
-fi
-export BT_TESTS_GREP_BIN
+# Name of the `awk` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_AWK_BIN awk
+
+# Name of the `grep` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_GREP_BIN grep
+
+# Name of the `python3` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_PYTHON_BIN python3
+
+# Major and minor version of the `python3` command to use when testing.
+#
+# This doesn't need to be exported, but it needs to remain set for
+# run_python() to use it.
+_bt_tests_py3_version=$("$BT_TESTS_PYTHON_BIN" -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
+
+# Name of the `python3-config` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_PYTHON_CONFIG_BIN python3-config
+
+# Name of the `sed` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_SED_BIN sed
+
+# Name of the `cc` command to use when testing, if not set
+_bt_tests_set_var_def BT_TESTS_CC_BIN cc