-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathtest_pf_tasks.sh
More file actions
96 lines (81 loc) · 2.01 KB
/
test_pf_tasks.sh
File metadata and controls
96 lines (81 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# Test script for all pf tasks in .pf file
# This tests every command to ensure they work correctly
echo "=== Testing PF Tasks ==="
echo "Testing all commands from .pf file..."
echo
# Check if poetry is available
if ! command -v poetry &> /dev/null; then
echo "ERROR: Poetry not found. Cannot test pf tasks."
exit 1
fi
echo "Poetry found: $(poetry --version)"
echo
# Test basic import first
echo "=== Testing basic import ==="
if poetry run python -c 'import cdp; print("CDP import successful")'; then
echo "✓ Basic CDP import works"
else
echo "✗ Basic CDP import failed"
fi
echo
# Test individual make targets that pf tasks wrap
echo "=== Testing individual Makefile targets ==="
echo "Testing: make test-import"
if poetry run make test-import; then
echo "✓ test-import task works"
else
echo "✗ test-import task failed"
fi
echo
echo "Testing: make generate"
if poetry run make generate; then
echo "✓ generate task works"
else
echo "✗ generate task failed"
fi
echo
echo "Testing: make mypy-generate"
if poetry run make mypy-generate; then
echo "✓ mypy-generate task works"
else
echo "✗ mypy-generate task failed"
fi
echo
echo "Testing: make mypy-cdp"
if poetry run make mypy-cdp; then
echo "✓ mypy-cdp task works"
else
echo "✗ mypy-cdp task failed"
fi
echo
echo "Testing: make test-generate"
if poetry run make test-generate; then
echo "✓ test-generate task works"
else
echo "✗ test-generate task failed"
fi
echo
echo "Testing: make test-cdp"
if poetry run make test-cdp; then
echo "✓ test-cdp task works"
else
echo "✗ test-cdp task failed"
fi
echo
echo "Testing: make docs"
if poetry run make docs; then
echo "✓ docs task works"
else
echo "✗ docs task failed"
fi
echo
echo "Testing: make default (full pipeline)"
if poetry run make default; then
echo "✓ default task works"
else
echo "✗ default task failed"
fi
echo
echo "=== PF Task Testing Complete ==="
echo "All underlying commands for pf tasks have been tested."