test/genscripts.py
author us@chu.huenfield.org
Tue, 25 Dec 2018 14:46:45 +0100
branchsync
changeset 3209 c15b4ca2b52a
parent 3121 f33a2ae77177
child 3249 03119f76ea35
permissions -rw-r--r--
Replace use of Sequoia's backend with a custom key store.

- Sequoia's key store doesn't meet pep's needs (in particular, the
ability to search on a key's user id) and trying to shoehorn pep's
needs onto Sequoia's key store abstractions is just introducing
overhead with no appreciable gain in functionality.

- This patch changes the Sequoia backend to use a local sqlite
database to store the public keys.
     1 # This file is under GNU General Public License 3.0
     2 # see LICENSE.txt
     3 
     4 from os import listdir, getcwd
     5 from os.path import isfile, join
     6 from re import sub
     7 import os
     8 import stat
     9 import datetime
    10 
    11 srcpath = join(getcwd(), "src/engine_tests")
    12 
    13 ls = listdir(srcpath)
    14 
    15 for f in ls:
    16     if isfile(join(srcpath, f)):
    17         if (f.endswith(".cc")):
    18             suite = sub('\.cc$', '', f)
    19             outfile = open(suite, 'w')
    20             output = (
    21                 "#!/bin/bash\n"
    22                 "# This is a convenience script for launching individual tests and tab completion with TestDriver \n\n" +
    23                 "./TestDriver " + suite + "\n\n")
    24             outfile.write(output)
    25             os.chmod(suite, 
    26                      (stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH | stat.S_IXGRP | stat.S_IXOTH))
    27             outfile.close()