Main entry point.
()
| 137 | |
| 138 | |
| 139 | def main(): |
| 140 | """Main entry point.""" |
| 141 | if len(sys.argv) < 3: |
| 142 | print( |
| 143 | "Usage: test_wrapper.py <runner_exe> <test_dll> [timeout_seconds]", |
| 144 | file=sys.stderr, |
| 145 | ) |
| 146 | return 1 |
| 147 | |
| 148 | runner_exe = sys.argv[1] |
| 149 | test_dll = sys.argv[2] |
| 150 | timeout_seconds = float(sys.argv[3]) if len(sys.argv) > 3 else DEFAULT_TIMEOUT |
| 151 | |
| 152 | if not os.path.exists(runner_exe): |
| 153 | print(f"Runner executable not found: {runner_exe}", file=sys.stderr) |
| 154 | return 1 |
| 155 | |
| 156 | if not os.path.exists(test_dll): |
| 157 | print(f"Test DLL not found: {test_dll}", file=sys.stderr) |
| 158 | return 1 |
| 159 | |
| 160 | return run_test_with_deadlock_detection(runner_exe, test_dll, timeout_seconds) |
| 161 | |
| 162 | |
| 163 | if __name__ == "__main__": |
no test coverage detected