[PR #1569] [CLOSED] RFC - initial foundation for distributed integration test rigging #10619

Closed
opened 2026-04-12 23:05:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1569
Author: @dhiltgen
Created: 12/16/2023
Status: Closed

Base: mainHead: integration_testing


📝 Commits (1)

  • 15c2d4b First cut at some distributed test rigging

📊 Changes

13 files changed (+526 additions, -16 deletions)

View changed files

📝 .dockerignore (+1 -1)
📝 .gitignore (+2 -1)
📝 Dockerfile.build (+2 -0)
scripts/binaries.py (+67 -0)
scripts/build_all.sh (+63 -0)
📝 scripts/build_darwin.sh (+23 -8)
📝 scripts/build_linux.sh (+1 -0)
📝 scripts/build_remote.py (+27 -1)
scripts/machine.py (+224 -0)
scripts/regression_suite.py (+62 -0)
📝 server/llm_image_test.go (+2 -2)
📝 server/llm_test.go (+6 -3)
test-systems.yaml (+46 -0)

📄 Description

This adds some new script rigging that may help flesh out integration tests.

It doesn't actually do any interesting testing yet (just a hello world), but demonstrates how this could work and be layered into PyTest or similar frameworks.

At present, it requires you're running on a mac.
First build all target architectures:

./scripts/build_all.sh <some-windows-remote-name>

This will produce both regular and coverage instrumented binaries in ./dist/

There's a yaml config file to drive what the remote target systems are: test-system.yaml

Then you can run a

python3 ./scripts/regression_suite.py

which will figure out the remote target system OS/arch, and then copy over the required binary (if not already present) and then run the server with coverage, and then run a hello world client, then shutdown the server, and gather coverage data. You can use the experimental variant env var to force certain llm libraries to increase coverage.

I've confirmed it works on linux and windows.

Notable gaps:

  • Still need to add a docker/container based test mechanism
  • Serial running is lame, but I just wanted to prove out the concept - it should really use some test framework to parallelize the run across all the systems, and be smart about hostnames so it doesn't hit the same host multiple times in parallel.
  • WSL on windows needs support
  • It should work on remote mac systems, but I haven't tested it yet.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/1569 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 12/16/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `integration_testing` --- ### 📝 Commits (1) - [`15c2d4b`](https://github.com/ollama/ollama/commit/15c2d4be7aed27abb19d82f258adfcc58bf01b3c) First cut at some distributed test rigging ### 📊 Changes **13 files changed** (+526 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+1 -1) 📝 `.gitignore` (+2 -1) 📝 `Dockerfile.build` (+2 -0) ➕ `scripts/binaries.py` (+67 -0) ➕ `scripts/build_all.sh` (+63 -0) 📝 `scripts/build_darwin.sh` (+23 -8) 📝 `scripts/build_linux.sh` (+1 -0) 📝 `scripts/build_remote.py` (+27 -1) ➕ `scripts/machine.py` (+224 -0) ➕ `scripts/regression_suite.py` (+62 -0) 📝 `server/llm_image_test.go` (+2 -2) 📝 `server/llm_test.go` (+6 -3) ➕ `test-systems.yaml` (+46 -0) </details> ### 📄 Description This adds some new script rigging that may help flesh out integration tests. It doesn't actually do any interesting testing yet (just a [hello world](https://github.com/jmorganca/ollama/pull/1569/files#diff-aea44eb9fc093044f1591164d21a64fef7e13e504088f1599e4685f9835ddb4d)), but demonstrates how this could work and be layered into PyTest or similar frameworks. At present, it requires you're running on a mac. First [build all target architectures](https://github.com/jmorganca/ollama/pull/1569/files#diff-ad855df3d2b5ffdf734facd7dbd1c5d4dd1da6fcd50110f86015e64ef9c9d88e): ``` ./scripts/build_all.sh <some-windows-remote-name> ``` This will produce both regular and coverage instrumented binaries in `./dist/` There's a yaml config file to drive what the remote target systems are: [test-system.yaml](https://github.com/jmorganca/ollama/pull/1569/files#diff-e4638e57348bd44ab998a6ec8e425553e91e72712b8da5dafaa2506ac8633408) Then you can run a ``` python3 ./scripts/regression_suite.py ``` which will figure out the remote target system OS/arch, and then copy over the required binary (if not already present) and then run the server with coverage, and then run a hello world client, then shutdown the server, and gather coverage data. You can use the experimental variant env var to force certain llm libraries to increase coverage. I've confirmed it works on linux and windows. Notable gaps: * Still need to add a docker/container based test mechanism * Serial running is lame, but I just wanted to prove out the concept - it should really use some test framework to parallelize the run across all the systems, and be smart about hostnames so it doesn't hit the same host multiple times in parallel. * WSL on windows needs support * It should work on remote mac systems, but I haven't tested it yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:05:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#10619