summaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorRoberto Bertó <463349+robertoberto@users.noreply.github.com>2026-05-19 03:15:55 -0300
committerGitHub <noreply@github.com>2026-05-19 03:15:55 -0300
commit294d060ac1557ed70cab7a12f97d930f9dc4baf9 (patch)
tree25e03a160fb1dc05a27a9118a7a6f573f0ffd123 /run_tests.py
parentffd5ba16eb1ada42a582db4ac8bdaf29f66a868f (diff)
parent6071528289e4a8b11a772433c33851136d30f133 (diff)
downloadpyvyos-294d060ac1557ed70cab7a12f97d930f9dc4baf9.tar.gz
pyvyos-294d060ac1557ed70cab7a12f97d930f9dc4baf9.zip
Merge pull request #31 from vyos-contrib/release/v0.4.0-cleanupv0.4.0
Release v0.4.0 — cleanup and consolidation
Diffstat (limited to 'run_tests.py')
-rw-r--r--run_tests.py64
1 files changed, 0 insertions, 64 deletions
diff --git a/run_tests.py b/run_tests.py
deleted file mode 100644
index e09886e..0000000
--- a/run_tests.py
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-"""Script para executar todos os testes e validar a instalação."""
-
-import subprocess
-import sys
-
-
-def run_command(cmd, description):
- """Executa um comando e mostra o resultado."""
- print(f"\n{'='*60}")
- print(f"{description}")
- print(f"{'='*60}")
- try:
- result = subprocess.run(
- cmd, shell=True, check=True, capture_output=True, text=True
- )
- print(result.stdout)
- if result.stderr:
- print("STDERR:", result.stderr)
- return True
- except subprocess.CalledProcessError as e:
- print(f"ERRO: {e}")
- print("STDOUT:", e.stdout)
- print("STDERR:", e.stderr)
- return False
-
-
-def main():
- """Executa todos os testes."""
- print("=== PyVyOS Test Suite ===\n")
-
- steps = [
- ("uv sync", "1. Sincronizando dependências"),
- ("uv run python test_quick.py", "2. Verificação rápida de imports"),
- ("uv run pytest tests/test_shims.py -v", "3. Testes de shims"),
- ("uv run pytest tests/utils/ -v", "4. Testes de utils"),
- ("uv run pytest tests/test_exceptions.py -v", "5. Testes de exceptions"),
- (
- "uv run pytest tests/modules/test_vy_device.py::test_shim_compatibility -v",
- "6. Teste de compatibilidade",
- ),
- ("uv run pytest tests/ -v --tb=short", "7. TODOS os testes"),
- ]
-
- results = []
- for cmd, desc in steps:
- success = run_command(cmd, desc)
- results.append((desc, success))
- if not success:
- print(f"\n❌ Falha em: {desc}")
- sys.exit(1)
-
- print(f"\n{'='*60}")
- print("✅ TODOS OS TESTES PASSARAM!")
- print(f"{'='*60}\n")
-
- for desc, success in results:
- status = "✅" if success else "❌"
- print(f"{status} {desc}")
-
-
-if __name__ == "__main__":
- main()
-