Check that all required scripts exist and are functional.
(self)
| 203 | return False |
| 204 | |
| 205 | def _check_script_dependencies(self) -> bool: |
| 206 | """Check that all required scripts exist and are functional.""" |
| 207 | try: |
| 208 | required_scripts = ["workflow-orchestrator.py", "validation-runner.py", "testing-runner.py", "build-runner.py", "verify-version-sync.py"] |
| 209 | |
| 210 | scripts_dir = self.root_path / "scripts" |
| 211 | missing_scripts = [] |
| 212 | broken_scripts = [] |
| 213 | |
| 214 | for script_name in required_scripts: |
| 215 | script_path = scripts_dir / script_name |
| 216 | |
| 217 | if not script_path.exists(): |
| 218 | missing_scripts.append(script_name) |
| 219 | continue |
| 220 | |
| 221 | # Test script execution |
| 222 | try: |
| 223 | result = subprocess.run([sys.executable, str(script_path), "--help"], capture_output=True, text=True, cwd=self.root_path, timeout=30, shell=False) # nosec |
| 224 | |
| 225 | if result.returncode == 0: |
| 226 | print(f" [PASS] {script_name} - Functional") |
| 227 | else: |
| 228 | broken_scripts.append(f"{script_name}: {result.stderr}") |
| 229 | print(f" [FAIL] {script_name} - Not functional") |
| 230 | |
| 231 | except subprocess.TimeoutExpired: |
| 232 | broken_scripts.append(f"{script_name}: Timeout") |
| 233 | print(f" [FAIL] {script_name} - Timeout") |
| 234 | except Exception as e: |
| 235 | broken_scripts.append(f"{script_name}: {str(e)}") |
| 236 | print(f" [FAIL] {script_name} - Error: {e}") |
| 237 | |
| 238 | if missing_scripts: |
| 239 | self.steps[2].error = f"Missing scripts: {missing_scripts}" |
| 240 | return False |
| 241 | |
| 242 | if broken_scripts: |
| 243 | self.steps[2].error = f"Broken scripts: {broken_scripts}" |
| 244 | return False |
| 245 | |
| 246 | print(f" [PASS] All {len(required_scripts)} scripts validated") |
| 247 | return True |
| 248 | |
| 249 | except Exception as e: |
| 250 | self.steps[2].error = str(e) |
| 251 | return False |
| 252 | |
| 253 | def _test_modular_workflows(self) -> bool: |
| 254 | """Test modular workflows using the workflow tester.""" |