{
if (0 == strcmp(path, OC_SECURITY_DB_DAT_FILE_NAME))
{
- std::string file_name = SVR_DB_FILE_NAME;
#ifndef LOCAL_RUNNING
- file_name = "./service/resource-encapsulation/unittests/oic_svr_db_re_client.dat";
+ std::string file_name =
+ "./service/resource-encapsulation/unittests/oic_svr_db_re_client.dat";
+ if (0 == access(file_name.c_str(), F_OK))
+ {
+ return fopen(file_name.c_str(), mode);
+ }
#endif
- return fopen(file_name.c_str(), mode);
+ return fopen(SVR_DB_FILE_NAME, mode);
}
return fopen(path, mode);
}
'service/resource-encapsulation/unittests/rcs_client_test')
else:
rcs_test_env.AppendUnique(CPPDEFINES = ['LOCAL_RUNNING'])
- if lib_env.get('SECURED') == '1':
- src_dir = rcs_test_env.get('SRC_DIR')
- svr_db_src_dir = os.path.join(src_dir, 'service/resource-encapsulation/unittests/')
- svr_db_build_dir = os.path.join(rcs_test_env.get('BUILD_DIR'), 'service', 'resource-encapsulation', 'unittests') + os.sep
- rcs_test_env.Alias("install",
- rcs_test_env.Install(svr_db_build_dir,
- os.path.join(svr_db_src_dir,
- 'oic_svr_db_re_client.dat')))
+
+if lib_env.get('SECURED') == '1':
+ src_dir = rcs_test_env.get('SRC_DIR')
+ svr_db_src_dir = os.path.join(src_dir, 'service/resource-encapsulation/unittests/')
+ svr_db_build_dir = os.path.join(rcs_test_env.get('BUILD_DIR'), 'service', 'resource-encapsulation', 'unittests') + os.sep
+ rcs_test_env.Alias("install",
+ rcs_test_env.Install(svr_db_build_dir,
+ os.path.join(svr_db_src_dir,
+ 'oic_svr_db_re_client.dat')))
\ No newline at end of file