aboutsummaryrefslogtreecommitdiff
path: root/rpkid/tests/yamltest.py
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/tests/yamltest.py')
-rw-r--r--rpkid/tests/yamltest.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/rpkid/tests/yamltest.py b/rpkid/tests/yamltest.py
index 6d4a6381..47c53c19 100644
--- a/rpkid/tests/yamltest.py
+++ b/rpkid/tests/yamltest.py
@@ -168,6 +168,7 @@ class allocation(object):
pubd_port = -1
rsync_port = -1
rootd_port = -1
+ rpkic_counter = 0L
@classmethod
def allocate_port(cls):
@@ -429,6 +430,11 @@ class allocation(object):
"comment = RPKI test"))
f.close()
+ @classmethod
+ def next_rpkic_counter(cls):
+ cls.rpkic_counter += 10000
+ return str(cls.rpkic_counter)
+
def run_rpkic(self, *args):
"""
Run rpkic for this entity.
@@ -439,7 +445,9 @@ class allocation(object):
cmd.append(self.path("rpkic.%s.prof" % rpki.sundial.now()))
cmd.extend(a for a in args if a is not None)
print 'Running "%s"' % " ".join(cmd)
- subprocess.check_call(cmd, cwd = self.host.path())
+ env = os.environ.copy()
+ env["YAMLTEST_RPKIC_COUNTER"] = self.next_rpkic_counter()
+ subprocess.check_call(cmd, cwd = self.host.path(), env = env)
def run_python_daemon(self, prog):
"""