diff options
author | Karel Kočí <cynerd@email.cz> | 2015-05-02 13:28:08 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-05-02 13:28:08 +0200 |
commit | 0124ff6822df8e626dec1240dc77a0a64da5a725 (patch) | |
tree | 0fae4fe249e9d6ea8ec2cc075d5c866d1e536517 /scripts | |
parent | c1eb1bb0e63499bc48ce41510886064746cba239 (diff) | |
download | linux-conf-perf-0124ff6822df8e626dec1240dc77a0a64da5a725.tar.gz linux-conf-perf-0124ff6822df8e626dec1240dc77a0a64da5a725.tar.bz2 linux-conf-perf-0124ff6822df8e626dec1240dc77a0a64da5a725.zip |
Fixes in scripts and add minisat_args
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/initialize.py | 4 | ||||
-rw-r--r-- | scripts/solution.py | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/scripts/initialize.py b/scripts/initialize.py index 8fb06df..40d9eb5 100644 --- a/scripts/initialize.py +++ b/scripts/initialize.py @@ -6,7 +6,7 @@ import shutil import utils from conf import conf from conf import sf -from exceptions import MissingFile +import exceptions def parse_kconfig(): "Execute parse_kconfig in linux_sources directory." @@ -24,7 +24,7 @@ def gen_requred(): "Generates required depenpency from .config file in linux source tree." if not os.path.isfile(sf(conf.linux_dot_config)): - raise MissingFile(sf(conf.linux_dot_config), + raise exceptions.MissingFile(sf(conf.linux_dot_config), 'Generate initial configuration. Execute make defconfig in linux folder. Or use make menuconfig and change configuration.') utils.build_symbol_map() # Ensure smap existence diff --git a/scripts/solution.py b/scripts/solution.py index 21f6d88..a09257a 100644 --- a/scripts/solution.py +++ b/scripts/solution.py @@ -36,7 +36,7 @@ def generate(): if ln not in lines: lines.add(ln) if os.path.isfile(sf(conf.required_file)): - for lnn in open((conf.required_file), 'r'): + for lnn in open(sf(conf.required_file), 'r'): ln = lnn.rstrip() if ln not in lines: lines.add(ln) @@ -54,9 +54,11 @@ def generate(): # Execute minisat if conf.minisat_output: - subprocess.call(['minisat', w_file.name, sf(conf.solution_file)]) + subprocess.call(['minisat', w_file.name, sf(conf.solution_file)] + + conf.minisat_args) else: - subprocess.call(['minisat', w_file.name, sf(conf.solution_file)], stdout=subprocess.DEVNULL) + subprocess.call(['minisat', w_file.name, sf(conf.solution_file)] + + conf.minisat_args, stdout=subprocess.DEVNULL) os.remove(w_file.name) @@ -98,6 +100,7 @@ def apply(): f.write( ntx + txt + " ") f.write("\n") + # Load variable count with open(sf(conf.symbol_map_file)) as f: for var_num, l in enumerate(f): pass |