nvda
d8bf3091 - Replace scons checkPot with standalone runcheckpot.bat (#19676)

Commit
60 days ago
Replace scons checkPot with standalone runcheckpot.bat (#19676) 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.
Author
Parents
Loading