diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 2d261b86db7e54..e4041fe0d1e8e6 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -2788,7 +2788,7 @@ nlTestSuite sSuite = int TestReadInteraction() { - TestContext sContext; + static TestContext sContext; nlTestRunner(&sSuite, &sContext); return (nlTestRunnerStats(&sSuite)); } diff --git a/src/messaging/tests/TestExchangeMgr.cpp b/src/messaging/tests/TestExchangeMgr.cpp index 52ecc256ecca94..62f89ebf7ff119 100644 --- a/src/messaging/tests/TestExchangeMgr.cpp +++ b/src/messaging/tests/TestExchangeMgr.cpp @@ -260,7 +260,7 @@ nlTestSuite sSuite = */ int TestExchangeMgr() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 4ddf2c63919759..bd453b768cb40c 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -1689,7 +1689,7 @@ nlTestSuite sSuite = */ int TestReliableMessageProtocol() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/protocols/secure_channel/tests/TestCASESession.cpp b/src/protocols/secure_channel/tests/TestCASESession.cpp index d8ebcd6c87611c..ad85d9dc697257 100644 --- a/src/protocols/secure_channel/tests/TestCASESession.cpp +++ b/src/protocols/secure_channel/tests/TestCASESession.cpp @@ -1038,7 +1038,7 @@ int CASE_TestSecurePairing_Teardown(void * inContext) */ int TestCASESession() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/protocols/secure_channel/tests/TestMessageCounterManager.cpp b/src/protocols/secure_channel/tests/TestMessageCounterManager.cpp index df27e0f1d983bd..7737567ca6f1f7 100644 --- a/src/protocols/secure_channel/tests/TestMessageCounterManager.cpp +++ b/src/protocols/secure_channel/tests/TestMessageCounterManager.cpp @@ -168,7 +168,7 @@ int Finalize(void * aContext) */ int TestMessageCounterManager() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 6b60ff3bd413ab..34d6dd54ea083e 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -487,7 +487,7 @@ int TestSecurePairing_Teardown(void * inContext) */ int TestPASESession() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/transport/raw/tests/TestTCP.cpp b/src/transport/raw/tests/TestTCP.cpp index 40be2b8873d84e..313d0901d20e60 100644 --- a/src/transport/raw/tests/TestTCP.cpp +++ b/src/transport/raw/tests/TestTCP.cpp @@ -502,7 +502,7 @@ static int Finalize(void * aContext) int TestTCP() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/transport/raw/tests/TestUDP.cpp b/src/transport/raw/tests/TestUDP.cpp index 82fd218e2ed5a6..ec72165b9ac2a0 100644 --- a/src/transport/raw/tests/TestUDP.cpp +++ b/src/transport/raw/tests/TestUDP.cpp @@ -210,7 +210,7 @@ static int Finalize(void * aContext) int TestUDP() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext); diff --git a/src/transport/tests/TestSessionManager.cpp b/src/transport/tests/TestSessionManager.cpp index f3abeacddd9e7a..2ae7902acd1335 100644 --- a/src/transport/tests/TestSessionManager.cpp +++ b/src/transport/tests/TestSessionManager.cpp @@ -1015,7 +1015,7 @@ int Finalize(void * aContext) */ int TestSessionManager() { - TestContext sContext; + static TestContext sContext; // Run test suit against one context nlTestRunner(&sSuite, &sContext);