(self)
| 703 | return ret |
| 704 | |
| 705 | def run(self): |
| 706 | # Create logs directories and ccache dir. |
| 707 | _make_dir_if_not_exist(self.ccache_dir) |
| 708 | _make_dir_if_not_exist(self.log_dir) |
| 709 | |
| 710 | self.monitor.start() |
| 711 | try: |
| 712 | if not self.build_image: |
| 713 | self._create_build_image() |
| 714 | else: |
| 715 | self.image = self.build_image |
| 716 | ret = self._run_tests() |
| 717 | return ret |
| 718 | finally: |
| 719 | self.monitor.stop() |
| 720 | if self.cleanup_containers: |
| 721 | for c in self.containers: |
| 722 | self._stop_container(c) |
| 723 | self._rm_container(c) |
| 724 | if self.cleanup_image and self.image: |
| 725 | _call(["docker", "rmi", self.image], check=False) |
| 726 | logging.info("Memory usage: %s GB min, %s GB max", |
| 727 | self.monitor.min_memory_usage_gb, |
| 728 | self.monitor.max_memory_usage_gb) |
| 729 | |
| 730 | # Strings (really, regular expressions) pulled out into to the visual timeline. |
| 731 | _INTERESTING_STRINGS = [ |
no test coverage detected