Commit df8d4f2e authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

tester: update bc_tester_utils

parent 68c00ba8
...@@ -47,3 +47,4 @@ tester/belle_sip_tester_crt ...@@ -47,3 +47,4 @@ tester/belle_sip_tester_crt
tester/CUnitAutomated-Results.xml.tmp-Results.xml tester/CUnitAutomated-Results.xml.tmp-Results.xml
belle-sip-tests.log belle-sip-tests.log
git-clang-format.diff git-clang-format.diff
.bc_tester_utils.tmp
...@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
static char *bc_tester_resource_dir_prefix = NULL; static char *bc_tester_resource_dir_prefix = NULL;
// by default writable will always write near the executable // by default writable will always write near the executable
static char *bc_tester_writable_dir_prefix = "."; static char *bc_tester_writable_dir_prefix = NULL;
int bc_printf_verbosity_info; int bc_printf_verbosity_info;
int bc_printf_verbosity_error; int bc_printf_verbosity_error;
...@@ -392,7 +392,7 @@ static void detect_res_prefix(const char* prog) { ...@@ -392,7 +392,7 @@ static void detect_res_prefix(const char* prog) {
} }
if (prefix != NULL) { if (prefix != NULL) {
if (bc_tester_resource_dir_prefix != NULL) { if (bc_tester_resource_dir_prefix == NULL) {
printf("Resource directory set to %s\n", prefix); printf("Resource directory set to %s\n", prefix);
bc_tester_set_resource_dir_prefix(prefix); bc_tester_set_resource_dir_prefix(prefix);
} }
...@@ -406,7 +406,7 @@ static void detect_res_prefix(const char* prog) { ...@@ -406,7 +406,7 @@ static void detect_res_prefix(const char* prog) {
// check that we can write in writable directory // check that we can write in writable directory
if (bc_tester_writable_dir_prefix != NULL) { if (bc_tester_writable_dir_prefix != NULL) {
writable_file = fopen("bc_tester_utils.tmp", "w"); writable_file = fopen(".bc_tester_utils.tmp", "w");
if (writable_file) { if (writable_file) {
fclose(writable_file); fclose(writable_file);
} }
...@@ -431,6 +431,7 @@ void bc_tester_init(void (*ftester_printf)(int level, const char *format, va_lis ...@@ -431,6 +431,7 @@ void bc_tester_init(void (*ftester_printf)(int level, const char *format, va_lis
tester_printf_va = ftester_printf; tester_printf_va = ftester_printf;
bc_printf_verbosity_error = iverbosity_error; bc_printf_verbosity_error = iverbosity_error;
bc_printf_verbosity_info = iverbosity_info; bc_printf_verbosity_info = iverbosity_info;
bc_tester_writable_dir_prefix = strdup(".");
} }
void bc_tester_set_max_vm(long max_vm_kb) { void bc_tester_set_max_vm(long max_vm_kb) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment