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)
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()
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:
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 = []