Start Pythonising the Makefile test cleanup actions.
parent
c4cf7db682
commit
d199a7512e
|
@ -27,6 +27,7 @@ from __future__ import with_statement
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from codecs import open as open
|
from codecs import open as open
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
from glob import glob
|
||||||
from inspect import getabsfile
|
from inspect import getabsfile
|
||||||
from inspect import currentframe
|
from inspect import currentframe
|
||||||
from time import gmtime
|
from time import gmtime
|
||||||
|
@ -1064,9 +1065,21 @@ def main(args):
|
||||||
if os.path.isdir(_tempd):
|
if os.path.isdir(_tempd):
|
||||||
shutil.rmtree(_tempd)
|
shutil.rmtree(_tempd)
|
||||||
|
|
||||||
|
def before_run():
|
||||||
|
if os.path.isdir(_util._here):
|
||||||
|
print("_util._here says we're here: %s" % _util._here)
|
||||||
|
pattern = os.path.join(_util._here, '*ring')
|
||||||
|
rings = glob(pattern)
|
||||||
|
if len(rings) > 0:
|
||||||
|
for ring in rings:
|
||||||
|
fn = os.path.basename(ring)
|
||||||
|
os.rename(ring, os.path.join(_tests, 'generated-keys'))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
before_run()
|
||||||
|
|
||||||
suite_names = list()
|
suite_names = list()
|
||||||
for name, methodset in suites.items():
|
for name, methodset in suites.items():
|
||||||
suite_names.append(name)
|
suite_names.append(name)
|
||||||
|
|
Loading…
Reference in New Issue