Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork937
Commit9717b8d
committed
Install WSL system on CI for hook tests
This makes three of the four hook-related tests pass instead offailing, and changes the way the fourth fails.GitPython uses bash.exe to run hooks that are (or appear to be)shell scripts. On many Windows systems, this is the bash.exe in thesystem32 directory, which delegates to bash in a WSL system if atleast one such system is installed (for the current user), andgives an error otherwise. It may be a bug that GitPython ends upusing this bash.exe when WSL is installed but no WSL systems exist,since that is actually a fairly common situation. One place thathappened was on the GitHub Actions runners used for Windows jobs.Those runners have WSL available, and are capable of running WSL 1systems (not currently WSL 2 systems), but no WSL systems wereactually installed.This commit fixes that cause of failure, for all four tests ithappened in, by setting up a Debian WSL system on the test runner.(This increases the amount of time it takes Windows jobs to run,but that might be possible to improve on.) Three of those fourtests now pass, while the other fails for another reason.The newly passing tests are:- test/test_index.py::TestIndex::test_commit_msg_hook_fail- test/test_index.py::TestIndex::test_pre_commit_hook_fail- test/test_index.py::TestIndex::test_pre_commit_hook_successThe test that still fails, but differently, is:- test/test_index.py::TestIndex::test_commit_msg_hook_successI had previously found that test to fail on a local WSL 2 system,and attempted to add a suitable xfail marking in881456b (#1679).But the condition I wrote there *appears* to have a bug related tothe different orders in which subproces.Popen and shutil.which findexecutables, causing it not always to detect when the WSL-relatedbash.exe is the one the Popen call in git.index.fun.run_commit_hookwill use.1 parent2784e40 commit9717b8d
1 file changed
+6
-0
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
38 | 44 |
| |
39 | 45 |
| |
40 | 46 |
| |
|
0 commit comments
Comments
(0)