diff options
Diffstat (limited to 'meta/files/ext-sdk-prepare.py')
| -rw-r--r-- | meta/files/ext-sdk-prepare.py | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py index 80db8bb16a..605e2ebefa 100644 --- a/meta/files/ext-sdk-prepare.py +++ b/meta/files/ext-sdk-prepare.py | |||
| @@ -27,6 +27,21 @@ def exec_watch(cmd, **options): | |||
| 27 | 27 | ||
| 28 | return process.returncode, buf | 28 | return process.returncode, buf |
| 29 | 29 | ||
| 30 | def check_unexpected(lines, recipes): | ||
| 31 | """Check for unexpected output lines from dry run""" | ||
| 32 | unexpected = [] | ||
| 33 | for line in lines.splitlines(): | ||
| 34 | if 'Running task' in line: | ||
| 35 | for recipe in recipes: | ||
| 36 | if recipe in line: | ||
| 37 | break | ||
| 38 | else: | ||
| 39 | line = line.split('Running', 1)[-1] | ||
| 40 | if 'do_rm_work' not in line: | ||
| 41 | unexpected.append(line.rstrip()) | ||
| 42 | elif 'Running setscene' in line: | ||
| 43 | unexpected.append(line.rstrip()) | ||
| 44 | return unexpected | ||
| 30 | 45 | ||
| 31 | def main(): | 46 | def main(): |
| 32 | if len(sys.argv) < 2: | 47 | if len(sys.argv) < 2: |
| @@ -67,17 +82,7 @@ def main(): | |||
| 67 | 82 | ||
| 68 | try: | 83 | try: |
| 69 | out = subprocess.check_output('bitbake %s -n' % ' '.join(sdk_targets), stderr=subprocess.STDOUT, shell=True) | 84 | out = subprocess.check_output('bitbake %s -n' % ' '.join(sdk_targets), stderr=subprocess.STDOUT, shell=True) |
| 70 | unexpected = [] | 85 | unexpected = check_unexpected(out, recipes) |
| 71 | for line in out.splitlines(): | ||
| 72 | if 'Running task' in line: | ||
| 73 | for recipe in recipes: | ||
| 74 | if recipe in line: | ||
| 75 | break | ||
| 76 | else: | ||
| 77 | line = line.split('Running', 1)[-1] | ||
| 78 | unexpected.append(line.rstrip()) | ||
| 79 | elif 'Running setscene' in line: | ||
| 80 | unexpected.append(line.rstrip()) | ||
| 81 | except subprocess.CalledProcessError as e: | 86 | except subprocess.CalledProcessError as e: |
| 82 | print('ERROR: Failed to execute dry-run:\n%s' % e.output) | 87 | print('ERROR: Failed to execute dry-run:\n%s' % e.output) |
| 83 | return 1 | 88 | return 1 |
