From aed98137fb62df1f569d40511b5f54bd05c7cfe4 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 26 Apr 2018 16:24:25 -0700 Subject: [PATCH] test-runner: set env flag if valgrind is being used If the hw.conf option 'start_iwd' is false, then iwd is started inside the python test, which means it will not know if the --valgrind option was passed to test runner. If this is the case an environment variable is set so the python test knows the option is being used. --- tools/test-runner.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/test-runner.c b/tools/test-runner.c index 4e4e927f..b25aa19a 100644 --- a/tools/test-runner.c +++ b/tools/test-runner.c @@ -1802,6 +1802,10 @@ static void create_network_and_run_tests(const void *key, void *value, if (iwd_pid == -1) goto exit_hostapd; + } else { + /* tells pytest to start iwd with valgrind */ + if (valgrind) + setenv("IWD_TEST_VALGRIND", "on", true); } if (ofono_req) {