[GPU] fix gpu tests --help and memory leak (#15055)

This commit is contained in:
Vladimir Dudnik 2023-01-13 13:00:43 +03:00 committed by GitHub
parent 32e74f339e
commit 9fe4db56fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ GTEST_API_ int main(int argc, char** argv) {
//gflags
gflags::AllowCommandLineReparsing();
gflags::ParseCommandLineFlags(&argc, &argv, true);
gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
if (FLAGS_device_suffix != -1 && cldnn::device_query::device_id == -1)
cldnn::device_query::device_id = FLAGS_device_suffix;
//restore cmdline arg for gtest
@ -54,5 +54,7 @@ GTEST_API_ int main(int argc, char** argv) {
//gtest
testing::InitGoogleTest(&new_argc, new_argv);
return RUN_ALL_TESTS();
auto retcode = RUN_ALL_TESTS();
delete[] new_argv;
return retcode;
}