diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-19 14:13:27 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-19 14:13:27 +0200 |
commit | ac21b2336faf2b8f10af99d7d296fc9b124a1716 (patch) | |
tree | 2e573e9ffea1eb483814c957a292fe686a41635c | |
parent | 9d59f748b06eeea00b1addbf48068455612007aa (diff) | |
download | linux-conf-perf-ac21b2336faf2b8f10af99d7d296fc9b124a1716.tar.gz linux-conf-perf-ac21b2336faf2b8f10af99d7d296fc9b124a1716.tar.bz2 linux-conf-perf-ac21b2336faf2b8f10af99d7d296fc9b124a1716.zip |
Remove configdiff
This script is not needed any more.
Same (and better) behaviour is now implemented in write_config.
-rw-r--r-- | scripts/configdiff.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/scripts/configdiff.py b/scripts/configdiff.py deleted file mode 100644 index 3cf1b16..0000000 --- a/scripts/configdiff.py +++ /dev/null @@ -1,48 +0,0 @@ -import os -import sys - -from conf import conf -import utils - - -def check(): - """Check if .config file in kernel tree is consistent with generated solution. - This containst code fragments from solution.py (apply) - """ - # Check if solution_file exist - if not os.path.isfile(conf.solution_file): - raise Exception("Solution file is missing. Run sat_solution and check existence of " + conf.solution_file) - - utils.build_symbol_map() # Ensure smap existence - srmap = {value:key for key, value in utils.smap.items()} - - # Read solution if satisfiable - with open(conf.solution_file, 'r') as f: - if not f.readline().rstrip() == 'SAT': - raise NoSolution() - solut = f.readline().split() - solut.remove('0') # Remove 0 at the end - solutb = [] - for sl in solut: # This is using that sat. solver output is sorted - if sl[0] == '-': - solutb.append(False) - else: - solutb.append(True) - - mismatch = False - with open(conf.linux_sources + '/.config', 'r') as f: - for line in f: - if (line[0] == '#') or (not '=' in line): - continue - indx = line.index('=') - if (line[indx + 1] == 'y'): - if (solutb[int(srmap[line[7:indx]]) - 1] == False): - print("W: Setting mismatch: " + line, end='') - mismatch = True - if (line[indx + 1] == 'm'): - print("W: module setting find: " + line, end='') - elif (line[indx + 1] == 'n'): - if (solutb[int(srmap[line[7:indx]]) - 1] == True): - print("W: Setting mismatch: " + line, end='') - mismatch = True - return mismatch |