[GPU] Check cl_cache_dir env variable for unit test (#17526)

This commit is contained in:
Mingyu Kim 2023-05-16 18:27:59 +09:00 committed by GitHub
parent 27047e995a
commit 8a847cc817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@
#include <cstdio>
#include <string>
#include <stdlib.h>
#include "intel_gpu/runtime/device_query.hpp"
#include "gtest/gtest.h"
@ -52,6 +53,11 @@ GTEST_API_ int main(int argc, char** argv) {
for(int i=0;i<new_argc;i++)
new_argv[i]=&varg[i][0];
if (const auto env_var = std::getenv("cl_cache_dir"))
printf("Env variable cl_cache_dir: %s\n", env_var);
else
printf("WARNING: cl_cache_dir is not set. Test will take longer than expected\n");
//gtest
testing::InitGoogleTest(&new_argc, new_argv);
auto retcode = RUN_ALL_TESTS();