From d3a48ca81d89b68c78db9b549ba042e2fbdb1f47 Mon Sep 17 00:00:00 2001
From: Ask Hjorth Larsen <asklarsen@gmail.com>
Date: Wed, 5 Oct 2016 12:17:09 +0200
Subject: [PATCH] run tests in parallel

---
 parser/parser-gulp/runtests.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/parser/parser-gulp/runtests.py b/parser/parser-gulp/runtests.py
index 10b312c..85459b4 100755
--- a/parser/parser-gulp/runtests.py
+++ b/parser/parser-gulp/runtests.py
@@ -5,6 +5,7 @@ import re
 from optparse import OptionParser
 from subprocess import Popen, PIPE
 import os
+from ase.parallel import world
 
 p = OptionParser()
 opts, args = p.parse_args()
@@ -29,7 +30,9 @@ if len(args) == 0:
 else:
     testfiles = argv
 
-for testfile in testfiles:
+for i, testfile in enumerate(testfiles):
+    if i % world.size != world.rank:
+        continue
     dirname, basename = os.path.split(testfile)
     print(basename)
     args = 'python main.py --annotate'.split()
-- 
GitLab