diff options
author | Magnus Ahltorp <map@kth.se> | 2016-10-13 15:10:20 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2016-10-13 15:16:29 +0200 |
commit | c1dfe32e2ba948e62535102ab6dbafa60c3c6eda (patch) | |
tree | f645ce96cb3ec311115f3a4bba410132ca1dc2e9 /tools | |
parent | 4213c3f7987b5f2a01fb12049ae7d5b84645640d (diff) |
Make tests run independently from cwdlarge-tests3
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testcase1.py | 11 |
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) |