diff options
author | bors-servo <metajack+bors@gmail.com> | 2014-11-23 11:57:36 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2014-11-23 11:57:36 -0700 |
commit | af42f1afc1dd2bcad50690c694c52b6b4f2d121a (patch) | |
tree | 8120644207911aa1d40a080fac21dc7868d0bb44 | |
parent | 593e3bc40c8c135f4fa1f0c6e59c6159edd76d74 (diff) | |
parent | cb38675f4822ae6ffd500d99f82dd4b7c591c329 (diff) | |
download | servo-af42f1afc1dd2bcad50690c694c52b6b4f2d121a.tar.gz servo-af42f1afc1dd2bcad50690c694c52b6b4f2d121a.zip |
auto merge of #4072 : frewsxcv/servo/test-files, r=jdm
Fixes #3910
-rw-r--r-- | python/servo/testing_commands.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 125d841f174..9498f1beb2c 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -30,12 +30,12 @@ class MachCommands(CommandBase): self.context.built_tests = True def find_test(self, prefix): - candidates = [ - f for f in os.listdir(path.join(self.context.topdir, "target")) - if f.startswith(prefix + "-")] - if candidates: - return path.join(self.context.topdir, "target", candidates[0]) - return None + target_contents = os.listdir(path.join(self.context.topdir, "target")) + for filename in target_contents: + if filename.startswith(prefix + "-"): + filepath = path.join(self.context.topdir, "target", filename) + if path.isfile(filepath) and os.access(filepath, os.X_OK): + return filepath def run_test(self, prefix, args=[]): t = self.find_test(prefix) |