| 116 | return ok; |
| 117 | } |
| 118 | static bool pf_directory_only(const char *directory, const char *allowed) { |
| 119 | cbm_dir_t *dir = cbm_opendir(directory); |
| 120 | if (!dir) |
| 121 | return false; |
| 122 | bool ok = true; |
| 123 | cbm_dirent_t *entry; |
| 124 | while ((entry = cbm_readdir(dir)) != NULL) { |
| 125 | if (pf_text(entry->name, ".") || pf_text(entry->name, "..")) |
| 126 | continue; |
| 127 | if (!allowed || !pf_text(entry->name, allowed)) |
| 128 | ok = false; |
| 129 | } |
| 130 | cbm_closedir(dir); |
| 131 | return ok; |
| 132 | } |
| 133 | static bool pf_env_start(pf_fixture_t *f) { |
| 134 | static const char *const names[] = {"CBM_WORKERS", "CBM_INDEX_SINGLE_THREAD", |
| 135 | "CBM_DISABLE_LSP_CROSS", "CBM_MEM_SPILL"}; |
no test coverage detected