summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testcase1.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/testcase1.py b/tools/testcase1.py
index 697cc99..81d589a 100755
--- a/tools/testcase1.py
+++ b/tools/testcase1.py
@@ -12,15 +12,16 @@ import sys
import struct
import hashlib
import itertools
+import os.path
from certtools import *
baseurls = [sys.argv[1]]
logpublickeyfile = sys.argv[2]
cacertfile = sys.argv[3]
+toolsdir = os.path.dirname(sys.argv[0])
+testdir = sys.argv[4]
-certfiles = ["../tools/testcerts/cert1.txt", "../tools/testcerts/cert2.txt",
- "../tools/testcerts/cert3.txt", "../tools/testcerts/cert4.txt",
- "../tools/testcerts/cert5.txt"]
+certfiles = [toolsdir + ("/testcerts/cert%d.txt" % e) for e in range(1, 6)]
cc1 = get_certs_from_file(certfiles[0])
cc2 = get_certs_from_file(certfiles[1])
@@ -147,8 +148,8 @@ def get_and_check_entry(timestamp, chain, leaf_index, baseurl):
len(submittedcertchain))
def merge():
- return subprocess.call(["../tools/merge", "--config", "../test/catlfish-test.cfg",
- "--localconfig", "../test/catlfish-test-local-merge.cfg"])
+ return subprocess.call([toolsdir + "/merge", "--config", testdir + "/catlfish-test.cfg",
+ "--localconfig", testdir + "/catlfish-test-local-merge.cfg"])
mergeresult = merge()
assert_equal(mergeresult, 0, "merge", quiet=True, fatal=True)