@@ -6805,6 +6805,28 @@ TEST_F(ProjMgrUnitTests, TestNoDbgconf) {
68056805 EXPECT_FALSE (cbuildrun[" cbuild-run" ][" debugger" ][" dbgconf" ].IsDefined ());
68066806}
68076807
6808+ TEST_F (ProjMgrUnitTests, MissingDbgconf) {
6809+ const string csolutionFile = testinput_folder + " /TestSolution/test.csolution.yml" ;
6810+ const string dbgconf = testinput_folder + " /TestSolution/.cmsis/test+CM0.dbgconf" ;
6811+ char * argv[6 ];
6812+ argv[1 ] = (char *)" convert" ;
6813+ argv[2 ] = (char *)csolutionFile.c_str ();
6814+ argv[3 ] = (char *)" -a" ;
6815+ argv[4 ] = (char *)" CM0" ;
6816+ EXPECT_EQ (0 , RunProjMgr (5 , argv, m_envp));
6817+
6818+ // remove dbgconf file and convert again but with --no-update-rte
6819+ // the missing dbgconf is just a warning, the convert must succeed
6820+ StdStreamRedirect streamRedirect;
6821+ EXPECT_TRUE (RteFsUtils::RemoveFile (dbgconf));
6822+ EXPECT_FALSE (RteFsUtils::Exists (dbgconf));
6823+ argv[5 ] = (char *)" --no-update-rte" ;
6824+ EXPECT_EQ (0 , RunProjMgr (6 , argv, m_envp));
6825+ auto errStr = streamRedirect.GetErrorString ();
6826+ auto expected = " warning csolution: file '" + dbgconf + " ' not found; use --update-rte" ;
6827+ EXPECT_TRUE (errStr.find (expected) != string::npos);
6828+ }
6829+
68086830TEST_F (ProjMgrUnitTests, TestRunDebugMulticore) {
68096831 char * argv[7 ];
68106832 const string& csolution = testinput_folder + " /TestRunDebug/run-debug.csolution.yml" ;
0 commit comments