From cb6536f354827db4c24b50be07bf22a1f1486faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 27 Apr 2015 21:36:06 +0200 Subject: Finish implementation of test.test --- scripts/test.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'scripts') diff --git a/scripts/test.py b/scripts/test.py index 5c70d13..3d2a2c1 100644 --- a/scripts/test.py +++ b/scripts/test.py @@ -3,13 +3,33 @@ import os import sys from conf import conf +from conf import sf import initialize +import iteration import kernel import boot def test(): initialize.gen_requred() # Call this to check initial solution + iteration.reset() # Reset iteration + conf.kernel_make_output = True kernel.make() + conf.boot_output = True + boot.boot() + print('------------------------------') + for nm in os.listdir(sf(conf.output_folder)): + if os.path.isfile(os.path.join(sf(conf.output_folder), nm)): + with open(os.path.join(sf(conf.output_folder), nm), 'r') as f: + print(nm + ':') + for line in f: + print(line, end='') + os.remove(os.path.join(sf(conf.output_folder), nm)) + # To be sure also try remove other file + try: + os.remove(sf(conf.solved_file)) + except OSError: + pass + ################################################################################# -- cgit v1.2.3