Skip to content

Commit ac144ad

Browse files
CopilotCISC
andcommitted
Update copilot instructions: add backend hardware note and server testing
Co-authored-by: CISC <1629204+CISC@users.noreply.github.com>
1 parent edd92b5 commit ac144ad

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/copilot-instructions.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ cmake -B build -DGGML_METAL=ON
4747
cmake --build build --config Release -j $(nproc)
4848
```
4949

50+
**Important Note**: While all backends can be built as long as the correct requirements for that backend are installed, you will not be able to run them without the correct hardware. The only backend that can be run for testing and validation is the CPU backend.
51+
5052
### Debug Builds
5153
Single-config generators:
5254
```bash
@@ -77,6 +79,21 @@ ctest --test-dir build --output-on-failure -j $(nproc)
7779
**Expected failures**: 2-3 tests may fail if network access is unavailable (they download models)
7880
**Test time**: ~30 seconds for passing tests
7981

82+
### Server Unit Tests
83+
Run server-specific unit tests after building the server:
84+
```bash
85+
# Build the server first
86+
cmake --build build --target llama-server
87+
88+
# Navigate to server tests and run
89+
cd tools/server/tests
90+
source ../../../.venv/bin/activate
91+
pip install -r requirements.txt
92+
./tests.sh
93+
```
94+
95+
**Server test dependencies**: The `.venv` environment includes the required dependencies for server unit tests (pytest, aiohttp, etc.). Tests can be run individually or with various options as documented in `tools/server/tests/README.md`.
96+
8097
### Test Categories
8198
- Tokenizer tests: Various model tokenizers (BERT, GPT-2, LLaMA, etc.)
8299
- Grammar tests: GBNF parsing and validation
@@ -202,7 +219,8 @@ Primary tools:
202219
1. **Format code**: `clang-format -i modified_files.cpp`
203220
2. **Build**: `cmake --build build --config Release`
204221
3. **Test**: `ctest --test-dir build --output-on-failure`
205-
4. **Manual validation**: Test relevant tools in `build/bin/`
222+
4. **Server tests** (if modifying server): `cd tools/server/tests && source ../../../.venv/bin/activate && ./tests.sh`
223+
5. **Manual validation**: Test relevant tools in `build/bin/`
206224

207225
### Performance Validation
208226
```bash

0 commit comments

Comments
 (0)