| 78 | |
| 79 | |
| 80 | static uint8_t* GetRawFile(const char* path, uint32_t* size, bool override) |
| 81 | { |
| 82 | const char* override_path = override ? "/zipfiles" : ""; |
| 83 | const char* alternatives[2] = { |
| 84 | "build/src/test%s%s", |
| 85 | "src/test%s%s" |
| 86 | }; |
| 87 | for (int i = 0; i < DM_ARRAY_SIZE(alternatives); ++i) |
| 88 | { |
| 89 | char path_buffer[256]; |
| 90 | dmSnPrintf(path_buffer, sizeof(path_buffer), alternatives[i], override_path, path); |
| 91 | |
| 92 | char host_buffer[256]; |
| 93 | dmTestUtil::MakeHostPath(host_buffer, sizeof(host_buffer), path_buffer); |
| 94 | if (!dmSys::Exists(host_buffer)) |
| 95 | continue; |
| 96 | return dmTestUtil::ReadHostFile(path_buffer, size); |
| 97 | } |
| 98 | return 0; |
| 99 | } |
| 100 | |
| 101 | // **************************************************************************************************************** |
| 102 |
no test coverage detected