aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-27 21:36:06 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-27 21:36:06 +0200
commitcb6536f354827db4c24b50be07bf22a1f1486faa (patch)
tree4e7e13d92fad522e7f73d1e8794b2e3768e5412c /scripts
parent4986e12ffffb30aeaad57929fecab69c656ef398 (diff)
downloadlinux-conf-perf-cb6536f354827db4c24b50be07bf22a1f1486faa.tar.gz
linux-conf-perf-cb6536f354827db4c24b50be07bf22a1f1486faa.tar.bz2
linux-conf-perf-cb6536f354827db4c24b50be07bf22a1f1486faa.zip
Finish implementation of test.test
Diffstat (limited to 'scripts')
-rw-r--r--scripts/test.py20
1 files changed, 20 insertions, 0 deletions
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
+
#################################################################################