| 34 | return ["gtest"] |
| 35 | |
| 36 | def run(self) -> None: |
| 37 | # Build Google Test, the C++ framework we use for testing C code. |
| 38 | # The source code for Google Test is copied to this repository. |
| 39 | gtest_dir = os.path.abspath( |
| 40 | os.path.join(os.path.dirname(__file__), "..", "external", "googletest") |
| 41 | ) |
| 42 | os.makedirs(self.build_temp, exist_ok=True) |
| 43 | subprocess.check_call( |
| 44 | ["make", "-f", os.path.join(gtest_dir, "make", "Makefile"), f"GTEST_DIR={gtest_dir}"], |
| 45 | cwd=self.build_temp, |
| 46 | ) |
| 47 | self.library_dirs = [self.build_temp] |
| 48 | return build_ext.run(self) |
| 49 | |
| 50 | |
| 51 | if "--run-capi-tests" in sys.argv: |