aboutsummaryrefslogtreecommitdiff
path: root/scripts/solution.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-07-17 11:50:04 +0200
committerKarel Kočí <cynerd@email.cz>2015-07-17 12:07:08 +0200
commit1ad844cee99d5d7b737b62f56eb5ccdc806f433d (patch)
tree08a33aa2d935d8be5b23a2667fe50622b474bf80 /scripts/solution.py
parent485c55bcca5ad0480cf3c73b006a98e26ccc3f52 (diff)
downloadlinux-conf-perf-1ad844cee99d5d7b737b62f56eb5ccdc806f433d.tar.gz
linux-conf-perf-1ad844cee99d5d7b737b62f56eb5ccdc806f433d.tar.bz2
linux-conf-perf-1ad844cee99d5d7b737b62f56eb5ccdc806f433d.zip
Remove possibility of generating next solution in loop.
Only possibility now is generating all solutions on initialisation. Remove solution generating phase.
Diffstat (limited to 'scripts/solution.py')
-rw-r--r--scripts/solution.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/scripts/solution.py b/scripts/solution.py
index 930297b..722aaaf 100644
--- a/scripts/solution.py
+++ b/scripts/solution.py
@@ -17,7 +17,7 @@ def generate():
if not os.path.isfile(sf(conf.rules_file)):
raise exceptions.MissingFile(conf.rules_file,"Run parse_kconfig.")
- if os.path.isfile(sf(conf.solution_file)) and conf.gen_all_solution_oninit:
+ if os.path.isfile(sf(conf.solution_file)):
raise exceptions.SolutionGenerated()
w_file = tempfile.NamedTemporaryFile(delete=False)
@@ -28,11 +28,6 @@ def generate():
ln = lnn.rstrip()
if ln not in lines:
lines.add(ln)
- if os.path.isfile(sf(conf.solved_file)):
- for lnn in open(sf(conf.solved_file), 'r'):
- ln = lnn.rstrip()
- if ln not in lines:
- lines.add(ln)
if os.path.isfile(sf(conf.required_file)):
for lnn in open(sf(conf.required_file), 'r'):
ln = lnn.rstrip()
@@ -57,8 +52,7 @@ def generate():
pass
picosat_cmd = [sf(conf.picosat), w_file.name]
- if (conf.gen_all_solution_oninit):
- picosat_cmd += ['--all']
+ picosat_cmd += conf.picosat_args
satprc = subprocess.Popen(picosat_cmd, stdout = subprocess.PIPE)
with open(os.path.join(sf(conf.log_folder), "picosat.log"), 'a') as f:
@@ -77,10 +71,6 @@ def generate():
for sl in solut:
fm.write(str(sl) + ' ')
fm.write('\n')
- with open(sf(conf.solved_file), 'a') as fs:
- for sl in solut:
- fs.write(str(-1 * sl) + ' ')
- fs.write('\n')
except ValueError:
pass
solut = []