benchci 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. benchci-0.1.0/LICENSE +60 -0
  2. benchci-0.1.0/PKG-INFO +224 -0
  3. benchci-0.1.0/README.md +187 -0
  4. benchci-0.1.0/pyproject.toml +63 -0
  5. benchci-0.1.0/setup.cfg +4 -0
  6. benchci-0.1.0/src/benchci/__init__.py +1 -0
  7. benchci-0.1.0/src/benchci/agent/__init__.py +0 -0
  8. benchci-0.1.0/src/benchci/agent/client.py +431 -0
  9. benchci-0.1.0/src/benchci/agent/config.py +79 -0
  10. benchci-0.1.0/src/benchci/agent/models.py +109 -0
  11. benchci-0.1.0/src/benchci/agent/registry.py +98 -0
  12. benchci-0.1.0/src/benchci/agent/scheduler.py +39 -0
  13. benchci-0.1.0/src/benchci/agent/server.py +812 -0
  14. benchci-0.1.0/src/benchci/agent/state.py +49 -0
  15. benchci-0.1.0/src/benchci/auth/client.py +62 -0
  16. benchci-0.1.0/src/benchci/auth/session.py +54 -0
  17. benchci-0.1.0/src/benchci/cli.py +490 -0
  18. benchci-0.1.0/src/benchci/commands/__init__.py +0 -0
  19. benchci-0.1.0/src/benchci/commands/doctor.py +648 -0
  20. benchci-0.1.0/src/benchci/config/__init__.py +0 -0
  21. benchci-0.1.0/src/benchci/config/bench.py +452 -0
  22. benchci-0.1.0/src/benchci/config/suite.py +400 -0
  23. benchci-0.1.0/src/benchci/gpio/__init__.py +3 -0
  24. benchci-0.1.0/src/benchci/gpio/base.py +88 -0
  25. benchci-0.1.0/src/benchci/gpio/factory.py +274 -0
  26. benchci-0.1.0/src/benchci/gpio/local_gpio.py +347 -0
  27. benchci-0.1.0/src/benchci/gpio/mock.py +136 -0
  28. benchci-0.1.0/src/benchci/gpio/remote_gpio.py +383 -0
  29. benchci-0.1.0/src/benchci/runner/__init__.py +0 -0
  30. benchci-0.1.0/src/benchci/runner/local.py +2226 -0
  31. benchci-0.1.0/src/benchci/runner/transport_logging.py +76 -0
  32. benchci-0.1.0/src/benchci/runner/uart_reader.py +174 -0
  33. benchci-0.1.0/src/benchci/transport/__init__.py +13 -0
  34. benchci-0.1.0/src/benchci/transport/base.py +37 -0
  35. benchci-0.1.0/src/benchci/transport/can.py +190 -0
  36. benchci-0.1.0/src/benchci/transport/factory.py +96 -0
  37. benchci-0.1.0/src/benchci/transport/modbus_base.py +121 -0
  38. benchci-0.1.0/src/benchci/transport/modbus_rtu.py +44 -0
  39. benchci-0.1.0/src/benchci/transport/modbus_tcp.py +46 -0
  40. benchci-0.1.0/src/benchci/transport/uart.py +86 -0
  41. benchci-0.1.0/src/benchci.egg-info/PKG-INFO +224 -0
  42. benchci-0.1.0/src/benchci.egg-info/SOURCES.txt +44 -0
  43. benchci-0.1.0/src/benchci.egg-info/dependency_links.txt +1 -0
  44. benchci-0.1.0/src/benchci.egg-info/entry_points.txt +2 -0
  45. benchci-0.1.0/src/benchci.egg-info/requires.txt +19 -0
  46. benchci-0.1.0/src/benchci.egg-info/top_level.txt +1 -0
benchci-0.1.0/LICENSE ADDED
@@ -0,0 +1,60 @@
1
+ # BenchCI License
2
+
3
+ Copyright (c) 2026 BenchCI
4
+
5
+ All rights reserved.
6
+
7
+ ---
8
+
9
+ # License Terms
10
+
11
+ BenchCI is proprietary software.
12
+
13
+ Permission to use BenchCI is granted only to licensed users under the terms of a commercial agreement.
14
+
15
+ This license governs the use of the BenchCI software distributed by BenchCI.
16
+
17
+ ---
18
+
19
+ # Permitted Use
20
+
21
+ Licensed users may:
22
+
23
+ - install BenchCI within their organization
24
+ - run BenchCI on development machines or CI environments
25
+ - integrate BenchCI into internal workflows
26
+ - use BenchCI for firmware validation and testing
27
+
28
+ ---
29
+
30
+ # Restrictions
31
+
32
+ Users may NOT:
33
+
34
+ - redistribute BenchCI software
35
+ - publish BenchCI binaries
36
+ - sublicense BenchCI
37
+ - reverse engineer the software for redistribution
38
+ - remove licensing or copyright notices
39
+
40
+ ---
41
+
42
+ # Ownership
43
+
44
+ BenchCI and all associated intellectual property remain the exclusive property of BenchCI.
45
+
46
+ ---
47
+
48
+ # Warranty
49
+
50
+ BenchCI is provided "as is" without warranty of any kind.
51
+
52
+ BenchCI shall not be liable for damages arising from the use of the software.
53
+
54
+ ---
55
+
56
+ # Contact
57
+
58
+ Licensing inquiries:
59
+
60
+ tech@benchci.dev
benchci-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: benchci
3
+ Version: 0.1.0
4
+ Summary: Continuous Integration for Embedded Hardware
5
+ Author: BenchCI
6
+ License-Expression: LicenseRef-Proprietary
7
+ Project-URL: Homepage, https://benchci.dev
8
+ Project-URL: Documentation, https://docs.benchci.dev
9
+ Project-URL: Source, https://github.com/BenchCI/BenchCI
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Testing
16
+ Classifier: Topic :: Software Development :: Embedded Systems
17
+ Requires-Python: >=3.11
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: typer>=0.12
21
+ Requires-Dist: pyserial>=3.5
22
+ Requires-Dist: pyyaml>=6.0
23
+ Requires-Dist: pydantic>=2.6
24
+ Requires-Dist: fastapi>=0.110
25
+ Requires-Dist: uvicorn>=0.27
26
+ Requires-Dist: httpx>=0.27
27
+ Requires-Dist: python-multipart>=0.0.9
28
+ Requires-Dist: pymodbus>=3.6
29
+ Requires-Dist: python-can>=4.0
30
+ Requires-Dist: gpiod; platform_system == "Linux"
31
+ Provides-Extra: docs
32
+ Requires-Dist: sphinx>=7; extra == "docs"
33
+ Requires-Dist: furo; extra == "docs"
34
+ Requires-Dist: myst-parser; extra == "docs"
35
+ Requires-Dist: sphinxcontrib-mermaid; extra == "docs"
36
+ Dynamic: license-file
37
+
38
+ # BenchCI
39
+
40
+ [![Documentation](https://img.shields.io/badge/docs-available-blue)](https://docs.benchci.dev)
41
+ [![Early Access](https://img.shields.io/badge/status-early--access-orange)](mailto:tech@benchci.dev)
42
+ ![Hardware CI](https://img.shields.io/badge/focus-hardware%20CI-success)
43
+ ![Embedded](https://img.shields.io/badge/target-embedded%20systems-blueviolet)
44
+ [![License](https://img.shields.io/badge/license-commercial-lightgrey)]()
45
+
46
+ > **Run hardware-in-the-loop tests on real embedded devices — locally or in CI.**
47
+
48
+ BenchCI is a lightweight test runner for embedded systems that lets you define hardware tests declaratively and execute them against real devices using UART, Modbus, and GPIO.
49
+
50
+ ---
51
+
52
+ ## ⚡ Why BenchCI?
53
+
54
+ Testing embedded firmware usually looks like this:
55
+
56
+ * Flash firmware manually
57
+ * Open serial terminal
58
+ * Send commands
59
+ * Watch logs
60
+ * Write ad-hoc scripts
61
+ * Repeat for every release
62
+
63
+ 👉 This does **not scale**.
64
+
65
+ BenchCI turns this into a **repeatable, automated, CI-ready workflow**.
66
+
67
+ ---
68
+
69
+ ## 🧠 What BenchCI Does
70
+
71
+ BenchCI connects your CI pipeline directly to real hardware and allows you to:
72
+
73
+ * Flash firmware automatically
74
+ * Interact with devices over UART, Modbus RTU/TCP
75
+ * Control and monitor GPIO lines
76
+ * Validate behavior with structured test steps
77
+ * Generate reproducible test artifacts
78
+
79
+ ---
80
+
81
+ ## 🏗️ How It Works
82
+
83
+ ```
84
+ CI Pipeline / Developer
85
+
86
+
87
+ benchci run
88
+
89
+
90
+ BenchCI Agent
91
+
92
+
93
+ Hardware Device
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 🧰 CLI Workflow
99
+
100
+ BenchCI provides built-in tools to help you validate your setup:
101
+
102
+ - `benchci doctor` — check system dependencies
103
+ - `benchci validate` — validate configuration files
104
+ - `benchci login` — authenticate with BenchCI services
105
+
106
+ These commands help ensure reliable execution before running tests.
107
+
108
+ ---
109
+
110
+ ## 🚀 Example (30 seconds)
111
+
112
+ Define your test suite:
113
+
114
+ ```yaml
115
+ name: firmware_tests
116
+
117
+ tests:
118
+
119
+ - name: boot_ok
120
+ steps:
121
+ - expect_uart:
122
+ contains: "[BOOT] OK"
123
+ within_ms: 3000
124
+
125
+ - name: ping
126
+ steps:
127
+ - send_uart: "PING\n"
128
+ - expect_uart:
129
+ contains: "PONG"
130
+ within_ms: 1000
131
+ ```
132
+
133
+ Run it:
134
+
135
+ ```
136
+ benchci run -b board.yaml -s suite.yaml -a build/fw.elf
137
+ ```
138
+
139
+ BenchCI will:
140
+
141
+ * flash firmware
142
+ * reset the device
143
+ * execute tests
144
+ * validate responses
145
+ * store logs and results
146
+
147
+ ---
148
+
149
+ ## 🔌 Supported Interfaces
150
+
151
+ BenchCI is designed for real hardware interaction:
152
+
153
+ * UART communication
154
+ * Modbus RTU
155
+ * Modbus TCP
156
+ * Linux GPIO (input, output, edge detection)
157
+
158
+ ---
159
+
160
+ ## 📦 Output Artifacts
161
+
162
+ Each run produces structured results:
163
+
164
+ ```
165
+ benchci-results/
166
+ ├── transport.log
167
+ ├── flash.log
168
+ ├── gpio.log
169
+ └── results.json
170
+ ```
171
+
172
+ Perfect for CI pipelines and debugging.
173
+
174
+ ---
175
+
176
+ ## 🔄 CI Integration
177
+
178
+ BenchCI is built for automation:
179
+
180
+ * GitLab CI support (example included)
181
+ * Works with any CI runner connected to hardware
182
+ * Agent-based execution for remote benches
183
+
184
+ See: `examples/ci/gitlab`
185
+
186
+ ---
187
+
188
+ ## 📚 Documentation
189
+
190
+ Full documentation:
191
+
192
+ 👉 https://docs.benchci.dev
193
+
194
+ Key topics:
195
+
196
+ * Quickstart
197
+ * Installation
198
+ * Board configuration
199
+ * Test suite definition
200
+ * CI integration
201
+ * Architecture
202
+
203
+ ---
204
+
205
+ ## 📌 Repository Contents
206
+
207
+ This repository contains:
208
+
209
+ * documentation
210
+ * configuration examples
211
+ * CI integration examples
212
+ * helper tools
213
+
214
+ BenchCI source code is maintained in a private repository.
215
+
216
+ ---
217
+
218
+ ## 💼 License
219
+
220
+ BenchCI is a commercial product.
221
+
222
+ To request access:
223
+
224
+ 📧 [tech@benchci.dev](mailto:tech@benchci.dev)
@@ -0,0 +1,187 @@
1
+ # BenchCI
2
+
3
+ [![Documentation](https://img.shields.io/badge/docs-available-blue)](https://docs.benchci.dev)
4
+ [![Early Access](https://img.shields.io/badge/status-early--access-orange)](mailto:tech@benchci.dev)
5
+ ![Hardware CI](https://img.shields.io/badge/focus-hardware%20CI-success)
6
+ ![Embedded](https://img.shields.io/badge/target-embedded%20systems-blueviolet)
7
+ [![License](https://img.shields.io/badge/license-commercial-lightgrey)]()
8
+
9
+ > **Run hardware-in-the-loop tests on real embedded devices — locally or in CI.**
10
+
11
+ BenchCI is a lightweight test runner for embedded systems that lets you define hardware tests declaratively and execute them against real devices using UART, Modbus, and GPIO.
12
+
13
+ ---
14
+
15
+ ## ⚡ Why BenchCI?
16
+
17
+ Testing embedded firmware usually looks like this:
18
+
19
+ * Flash firmware manually
20
+ * Open serial terminal
21
+ * Send commands
22
+ * Watch logs
23
+ * Write ad-hoc scripts
24
+ * Repeat for every release
25
+
26
+ 👉 This does **not scale**.
27
+
28
+ BenchCI turns this into a **repeatable, automated, CI-ready workflow**.
29
+
30
+ ---
31
+
32
+ ## 🧠 What BenchCI Does
33
+
34
+ BenchCI connects your CI pipeline directly to real hardware and allows you to:
35
+
36
+ * Flash firmware automatically
37
+ * Interact with devices over UART, Modbus RTU/TCP
38
+ * Control and monitor GPIO lines
39
+ * Validate behavior with structured test steps
40
+ * Generate reproducible test artifacts
41
+
42
+ ---
43
+
44
+ ## 🏗️ How It Works
45
+
46
+ ```
47
+ CI Pipeline / Developer
48
+
49
+
50
+ benchci run
51
+
52
+
53
+ BenchCI Agent
54
+
55
+
56
+ Hardware Device
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 🧰 CLI Workflow
62
+
63
+ BenchCI provides built-in tools to help you validate your setup:
64
+
65
+ - `benchci doctor` — check system dependencies
66
+ - `benchci validate` — validate configuration files
67
+ - `benchci login` — authenticate with BenchCI services
68
+
69
+ These commands help ensure reliable execution before running tests.
70
+
71
+ ---
72
+
73
+ ## 🚀 Example (30 seconds)
74
+
75
+ Define your test suite:
76
+
77
+ ```yaml
78
+ name: firmware_tests
79
+
80
+ tests:
81
+
82
+ - name: boot_ok
83
+ steps:
84
+ - expect_uart:
85
+ contains: "[BOOT] OK"
86
+ within_ms: 3000
87
+
88
+ - name: ping
89
+ steps:
90
+ - send_uart: "PING\n"
91
+ - expect_uart:
92
+ contains: "PONG"
93
+ within_ms: 1000
94
+ ```
95
+
96
+ Run it:
97
+
98
+ ```
99
+ benchci run -b board.yaml -s suite.yaml -a build/fw.elf
100
+ ```
101
+
102
+ BenchCI will:
103
+
104
+ * flash firmware
105
+ * reset the device
106
+ * execute tests
107
+ * validate responses
108
+ * store logs and results
109
+
110
+ ---
111
+
112
+ ## 🔌 Supported Interfaces
113
+
114
+ BenchCI is designed for real hardware interaction:
115
+
116
+ * UART communication
117
+ * Modbus RTU
118
+ * Modbus TCP
119
+ * Linux GPIO (input, output, edge detection)
120
+
121
+ ---
122
+
123
+ ## 📦 Output Artifacts
124
+
125
+ Each run produces structured results:
126
+
127
+ ```
128
+ benchci-results/
129
+ ├── transport.log
130
+ ├── flash.log
131
+ ├── gpio.log
132
+ └── results.json
133
+ ```
134
+
135
+ Perfect for CI pipelines and debugging.
136
+
137
+ ---
138
+
139
+ ## 🔄 CI Integration
140
+
141
+ BenchCI is built for automation:
142
+
143
+ * GitLab CI support (example included)
144
+ * Works with any CI runner connected to hardware
145
+ * Agent-based execution for remote benches
146
+
147
+ See: `examples/ci/gitlab`
148
+
149
+ ---
150
+
151
+ ## 📚 Documentation
152
+
153
+ Full documentation:
154
+
155
+ 👉 https://docs.benchci.dev
156
+
157
+ Key topics:
158
+
159
+ * Quickstart
160
+ * Installation
161
+ * Board configuration
162
+ * Test suite definition
163
+ * CI integration
164
+ * Architecture
165
+
166
+ ---
167
+
168
+ ## 📌 Repository Contents
169
+
170
+ This repository contains:
171
+
172
+ * documentation
173
+ * configuration examples
174
+ * CI integration examples
175
+ * helper tools
176
+
177
+ BenchCI source code is maintained in a private repository.
178
+
179
+ ---
180
+
181
+ ## 💼 License
182
+
183
+ BenchCI is a commercial product.
184
+
185
+ To request access:
186
+
187
+ 📧 [tech@benchci.dev](mailto:tech@benchci.dev)
@@ -0,0 +1,63 @@
1
+ [project]
2
+ name = "benchci"
3
+ dynamic = ["version"]
4
+ description = "Continuous Integration for Embedded Hardware"
5
+ authors = [
6
+ { name = "BenchCI" }
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.11"
10
+ license = "LicenseRef-Proprietary"
11
+ license-files = ["LICENSE"]
12
+ dependencies = [
13
+ "typer>=0.12",
14
+ "pyserial>=3.5",
15
+ "pyyaml>=6.0",
16
+ "pydantic>=2.6",
17
+ "fastapi>=0.110",
18
+ "uvicorn>=0.27",
19
+ "httpx>=0.27",
20
+ "python-multipart>=0.0.9",
21
+ "pymodbus>=3.6",
22
+ "python-can>=4.0",
23
+ 'gpiod; platform_system == "Linux"',
24
+ ]
25
+
26
+ classifiers = [
27
+ "Development Status :: 3 - Alpha",
28
+ "Intended Audience :: Developers",
29
+ "Programming Language :: Python :: 3",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Topic :: Software Development :: Testing",
33
+ "Topic :: Software Development :: Embedded Systems",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ docs = [
38
+ "sphinx>=7",
39
+ "furo",
40
+ "myst-parser",
41
+ "sphinxcontrib-mermaid",
42
+ ]
43
+
44
+ [project.urls]
45
+ Homepage = "https://benchci.dev"
46
+ Documentation = "https://docs.benchci.dev"
47
+ Source = "https://github.com/BenchCI/BenchCI"
48
+
49
+ [project.scripts]
50
+ benchci = "benchci.cli:app"
51
+
52
+ [build-system]
53
+ requires = ["setuptools>=68", "wheel"]
54
+ build-backend = "setuptools.build_meta"
55
+
56
+ [tool.setuptools.dynamic]
57
+ version = { attr = "benchci.__version__" }
58
+
59
+ [tool.setuptools]
60
+ package-dir = {"" = "src"}
61
+
62
+ [tool.setuptools.packages.find]
63
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
File without changes