test: update tests to support ARM architecture#184
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideTests are enhanced to detect and include ARM64-specific flags by building a base argument list dynamically at runtime, conditionally inserting the --threads option on ARM64, and refactoring all test cases to reuse this new baseArgs slice instead of hard-coded literals. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Summary of ChangesHello @ilopezluna, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses test failures on ARM64 architecture, particularly on Apple Silicon Macs, by making the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull Request Overview
Updates tests to support ARM architecture by making them architecture-aware, fixing test failures on ARM64 systems like Apple Silicon Macs.
- Makes test arguments dynamically adapt to the runtime architecture
- Adds
--threadsargument for ARM64 systems to match production behavior - Refactors test structure to use shared base arguments across all test cases
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the tests to support ARM architecture by dynamically building the expected arguments. The approach is sound, but I've identified a potential issue in the thread calculation logic that could cause problems on single-core ARM machines. Additionally, I've suggested some readability improvements for constructing test data by using slices.Clone() from the standard library, which is more idiomatic for the Go version in use.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
The test was failing because it didn't account for ARM64-specific arguments that are automatically added by
NewDefaultLlamaCppConfig()when running on ARM64 architecture (like Apple Silicon Macs).Solution:
Updated the test to be architecture-aware by:
runtime.GOARCH--threadsargument when on ARM64 (matching the behavior inllamacpp_config.go)Summary by Sourcery
Tests: