Skip to content

Commit b5a19b5

Browse files
committed
WIP
1 parent 89e812b commit b5a19b5

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Run tests
2828
run: |
29-
docker run --rm -v ${{ github.workspace }}:/src -v /mnt/jenkins:/mnt/jenkins:rw -v /var/cache/jenkins:/var/cache/jenkins:rw ci_rust_$GITHUB_SHA bash -ex -c '
29+
docker run --rm -v ${{ github.workspace }}:/src -v /mnt/jenkins/python-sdk-ci-test:/root/Documents/cepton w ci_rust_$GITHUB_SHA bash -ex -c '
3030
cd /app
3131
python3 -m unittest discover -s tests
3232
'

ci/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Use official Python 3.12 base image
22
FROM python:3.12-slim
33

4+
45
WORKDIR /app
6+
7+
# Create a location where the test calibration files will go
8+
RUN mkdir -p /root/Documents/cepton
9+
510
COPY . .
611
RUN pip install --upgrade pip && pip install .
712

tests/test_basic.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,18 @@ def test_initialize(self):
1212
"""Test initialize and deinitialize"""
1313
sdk.initialize()
1414
sdk.deinitialize()
15+
16+
def test_replay(self):
17+
"""Test that replay works"""
18+
sdk.initialize()
19+
sdk.enable_frame_fifo(0, 10)
20+
sdk.load_pcap("/root/Documents/cepton/lobby-1.pcap")
21+
22+
frame_counts = []
23+
for _ in range(10):
24+
frame = sdk.frame_fifo_get_frame(2000)
25+
frame_counts.append(frame.positions.shape[0])
26+
27+
self.assertTrue(all(count > 0 for count in frame_counts))
28+
29+
sdk.deinitialize()

0 commit comments

Comments
 (0)