Skip to content

fix: unit test of driver query#267

Merged
16bit-ykiko merged 1 commit into
clice-io:mainfrom
aurora0x27:unit-test
Sep 27, 2025
Merged

fix: unit test of driver query#267
16bit-ykiko merged 1 commit into
clice-io:mainfrom
aurora0x27:unit-test

Conversation

@aurora0x27

Copy link
Copy Markdown
Contributor

Triplets differs on different linux distros, causing assertion fails on some local machine

Add environment variable to ensure driver print Enlish message

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @aurora0x27, 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 an issue where unit tests for driver queries were failing on various Linux distributions due to inconsistencies in locale-dependent output. The core solution involves standardizing the driver's output language to English and making certain test assertions conditional on whether the build is occurring in a CI environment. This approach enhances the robustness and portability of the test suite, ensuring reliable results across diverse development and integration setups.

Highlights

  • Standardized Driver Output: The LANG=C environment variable is now explicitly set for driver invocations on non-Windows systems. This ensures consistent English output from the driver, preventing locale-dependent test failures that could arise from varying 'triplets' across Linux distributions.
  • CI-Specific Test Assertions: Specific unit test assertions related to the driver's target triplet and system include paths are now conditionally compiled. These checks will only be active when the code is built in a Continuous Integration (CI) environment, avoiding assertion failures on local machines with different configurations.
  • Build System Integration: Both CMake and xmake build configurations have been updated to define the CLICE_CI_ENVIRONMENT preprocessor macro when building in a CI context. This macro enables the conditional compilation logic for the CI-specific test assertions.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix a unit test failure related to driver queries on different Linux distributions by ensuring the driver's output is in English. This is achieved by setting the LANG=C environment variable when executing the driver. The changes also introduce a CLICE_CI_ENVIRONMENT compile definition to conditionally run assertions that are specific to the CI environment.

My review found a critical issue in src/Compiler/Command.cpp where a function is missing a return statement for Windows builds, which would cause a compilation failure. I've also pointed out a minor typo in a comment within the same function and provided a suggestion that fixes both issues.

Comment thread src/Compiler/Command.cpp
Triplets differs on different linux distros, cause assertion fails on
some local machine

Add environment variable to ensure driver print Enlish message
@16bit-ykiko 16bit-ykiko merged commit 2b35040 into clice-io:main Sep 27, 2025
9 checks passed
aurora0x27 added a commit to aurora0x27/clice that referenced this pull request Sep 28, 2025
@16bit-ykiko 16bit-ykiko changed the title Fix unit test of driver query fix: unit test of driver query Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants