3679 dpb = _sys2bytes(os.defpath) |
3679 dpb = _sys2bytes(os.defpath) |
3680 sepb = _sys2bytes(os.pathsep) |
3680 sepb = _sys2bytes(os.pathsep) |
3681 for p in osenvironb.get(b'PATH', dpb).split(sepb): |
3681 for p in osenvironb.get(b'PATH', dpb).split(sepb): |
3682 name = os.path.join(p, program) |
3682 name = os.path.join(p, program) |
3683 if os.name == 'nt' or os.access(name, os.X_OK): |
3683 if os.name == 'nt' or os.access(name, os.X_OK): |
3684 return name |
3684 return _bytes2sys(name) |
3685 return None |
3685 return None |
3686 |
3686 |
3687 def _checktools(self): |
3687 def _checktools(self): |
3688 """Ensure tools required to run tests are present.""" |
3688 """Ensure tools required to run tests are present.""" |
3689 for p in self.REQUIREDTOOLS: |
3689 for p in self.REQUIREDTOOLS: |
3690 if os.name == 'nt' and not p.endswith(b'.exe'): |
3690 if os.name == 'nt' and not p.endswith(b'.exe'): |
3691 p += b'.exe' |
3691 p += b'.exe' |
3692 found = self._findprogram(p) |
3692 found = self._findprogram(p) |
3693 p = p.decode("utf-8") |
3693 p = p.decode("utf-8") |
3694 if found: |
3694 if found: |
3695 vlog("# Found prerequisite", p, "at", _bytes2sys(found)) |
3695 vlog("# Found prerequisite", p, "at", found) |
3696 else: |
3696 else: |
3697 print("WARNING: Did not find prerequisite tool: %s " % p) |
3697 print("WARNING: Did not find prerequisite tool: %s " % p) |
3698 |
3698 |
3699 |
3699 |
3700 def aggregateexceptions(path): |
3700 def aggregateexceptions(path): |