| 144 | } |
| 145 | |
| 146 | int main(int argc, char *argv[]) |
| 147 | { |
| 148 | const char *pmem_directory = "/tmp/"; |
| 149 | |
| 150 | if (argc > 2) { |
| 151 | std::cerr << "Usage: pmem_cpp_allocator [directory path]\n" |
| 152 | << "\t[directory path] - directory where temporary file is created (default = \"/tmp/\")" |
| 153 | << std::endl; |
| 154 | return 0; |
| 155 | } else if (argc == 2) { |
| 156 | struct stat st; |
| 157 | if (stat(argv[1], &st) != 0 || !S_ISDIR(st.st_mode)) { |
| 158 | fprintf(stderr,"%s : Invalid path to pmem kind directory", argv[1]); |
| 159 | return 1; |
| 160 | } |
| 161 | pmem_directory = argv[1]; |
| 162 | } |
| 163 | |
| 164 | cpp_allocator_test(pmem_directory); |
| 165 | return 0; |
| 166 | } |
nothing calls this directly
no test coverage detected