Run the test, and return 0 on success, 2 otherwise.
| 110 | |
| 111 | // Run the test, and return 0 on success, 2 otherwise. |
| 112 | static int RunTest(const std::string &binary_name) { |
| 113 | int rc = 0; |
| 114 | string_vec str; |
| 115 | |
| 116 | if (!tensorflow::GetPlatformStrings(binary_name, &str)) { |
| 117 | CheckStr(str, "__linux__", AS_STR(__linux__)); |
| 118 | CheckStr(str, "_WIN32", AS_STR(_WIN32)); |
| 119 | CheckStr(str, "__APPLE__", AS_STR(__APPLE__)); |
| 120 | CheckStr(str, "__x86_64__", AS_STR(__x86_64__)); |
| 121 | CheckStr(str, "__aarch64__", AS_STR(__aarch64__)); |
| 122 | CheckStr(str, "__powerpc64__", AS_STR(__powerpc64__)); |
| 123 | CheckStr(str, "TF_PLAT_STR_VERSION", TF_PLAT_STR_VERSION_); |
| 124 | } else { |
| 125 | perror(binary_name.c_str()); |
| 126 | rc = 2; |
| 127 | } |
| 128 | |
| 129 | return rc; |
| 130 | } |
| 131 | |
| 132 | int main(int argc, char *argv[]) { |
| 133 | tensorflow::Env *env = tensorflow::Env::Default(); |