Remove misleading scons tests build target#19606
Merged
Merged
Conversation
The `scons tests` command only ran translation string comment checks (equivalent to `scons checkPot`), which was misleading since users expected it to run all tests. The target has been removed by inlining the checkPot target definition from tests/sconscript into the main sconstruct file and deleting the tests/sconscript file. Individual test commands should be used instead: - `scons checkPot` for translation string checks - `rununittests.bat` for unit tests - `runsystemtests.bat` for system tests - `runlint.bat` for linting
a615aa6 to
820400f
Compare
seanbudd
reviewed
Feb 13, 2026
seanbudd
approved these changes
Feb 13, 2026
tareh7z
pushed a commit
to tareh7z/nvda
that referenced
this pull request
Feb 16, 2026
Closes nvaccess#16799 Summary of the issue: The scons tests command only ran translation string comment checks (equivalent to scons checkPot), which was misleading since users expected it to run all tests. Description of user facing changes: None. Description of developer facing changes: The scons tests build target has been removed. Running scons tests now produces an explicit error message directing users to the correct commands: scons checkPot for translation string checks rununittests.bat for unit tests runsystemtests.bat for system tests runlint.bat for linting Description of development approach: Removed the tests/sconscript file that defined the misleading tests target. Inlined the checkPot target definition from tests/sconscript into the main sconstruct file. Added an explicit tests alias that raises SCons.Errors.UserError with a helpful error message, preventing SCons from silently succeeding due to the existing tests/ directory.
bramd
added a commit
to bramd/nvda
that referenced
this pull request
Feb 23, 2026
Remove the checkPot target from sconstruct and provide a standalone runcheckpot.bat script that calls scons pot then validates the output with tests/checkPot.py. This follows up on PR nvaccess#19606 review feedback to stop using SCons for checkPot entirely. Also fixes tests/checkPot.py __main__ to call sys.exit() with the error count so exit codes propagate correctly when run standalone.
5 tasks
bramd
added a commit
to bramd/nvda
that referenced
this pull request
Feb 23, 2026
Remove the checkPot target from sconstruct and provide a standalone runcheckpot.bat script that calls scons pot then validates the output with tests/checkPot.py. This follows up on PR nvaccess#19606 review feedback to stop using SCons for checkPot entirely. Also fixes tests/checkPot.py __main__ to call sys.exit() with the error count so exit codes propagate correctly when run standalone.
bramd
added a commit
to bramd/nvda
that referenced
this pull request
Feb 23, 2026
Remove the checkPot target from sconstruct and provide a standalone runcheckpot.bat script that calls scons pot then validates the output with tests/checkPot.py. This follows up on PR nvaccess#19606 review feedback to stop using SCons for checkPot entirely. Also fixes tests/checkPot.py __main__ to call sys.exit() with the error count so exit codes propagate correctly when run standalone.
seanbudd
pushed a commit
that referenced
this pull request
Mar 3, 2026
Link to issue number: N/A Summary of the issue: scons checkPot is more a utility and not really part of the build. Having a separate runcheckpot.bat is consistent with other utilities like rununittests or runlint. This has been suggested in a comment on PR #19606. Since that PR was already merged, this change is done in this new PR. Description of user facing changes: None Description of developer facing changes: The scons checkPot command has been replaced with runcheckpot.bat. This script generates the pot file via scons pot, then runs tests/checkPot.py directly on the output. Any arguments (e.g. --all-cores, -j 1) are forwarded to the scons pot invocation. Since we need an up-to-date pot file to run checks and generating that file is part of the SCons build, we still have the overhead of calling SCons when running runcheckpot.bat. Description of development approach: Created runcheckpot.bat following the naming and structure conventions of existing bat files (rununittests.bat, runlicensecheck.bat, etc.). Removed the checkPot target, action, and alias from sconstruct (the pot target is unchanged). Updated the pre-commit hook from language: system (invoking cmd.exe /c "scons checkPot") to language: script (invoking ./runcheckpot.bat), matching how other bat-based hooks are configured. Updated ci/scripts/tests/translationCheck.ps1 to call runcheckpot.bat. Fixed tests/checkPot.py __main__ block to call sys.exit() with the error count. Previously it only printed the count, which meant standalone invocation always exited 0 regardless of errors. This was not a problem when SCons used the return value directly, but is critical now that the script is invoked via bat file. Updated developer documentationchangelog entry.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Closes #16799
Summary of the issue:
The
scons testscommand only ran translation string comment checks (equivalent toscons checkPot), which was misleading since users expected it to run all tests.Description of user facing changes:
None.
Description of developer facing changes:
The
scons testsbuild target has been removed. Runningscons testsnow produces an explicit error message directing users to the correct commands:scons checkPotfor translation string checksrununittests.batfor unit testsrunsystemtests.batfor system testsrunlint.batfor lintingDescription of development approach:
tests/sconscriptfile that defined the misleadingteststarget.checkPottarget definition fromtests/sconscriptinto the mainsconstructfile.testsalias that raisesSCons.Errors.UserErrorwith a helpful error message, preventing SCons from silently succeeding due to the existingtests/directory.Testing strategy:
scons testsnow exits with code 2 and displays the error message with alternative commands.scons checkPotcontinues to work correctly.Known issues with pull request:
None.
Code Review Checklist: