Skip to content

Commit

Permalink
Fix failing tests on windows-2022 due to WSL tool changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Jan 23, 2023
1 parent 13a8890 commit b4ffb29
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/template/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,18 @@ jobs:
&& (steps.execute_action.outcome == 'success')
shell: wsl-bash {0}
run: >
wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8
cat
<(wsl.exe --list || true)
<(wsl.exe --list || true | iconv -f UTF-16LE -t UTF-8)
<(wslconfig.exe /list || true)
<(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8)
[[
"$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)"
"$(cat
<(wsl.exe --list || true)
<(wsl.exe --list || true | iconv -f UTF-16LE -t UTF-8)
<(wslconfig.exe /list || true)
<(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8))"
==
*${{ matrix.distribution.wsl-id }}\ \(Default\)*
]]
Expand Down Expand Up @@ -923,12 +931,18 @@ jobs:
&& (steps.execute_action4.outcome == 'success')
shell: wsl-bash {0}
run: >
wslconfig.exe /list
wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8
cat
<(wsl.exe --list || true)
<(wsl.exe --list || true | iconv -f UTF-16LE -t UTF-8)
<(wslconfig.exe /list || true)
<(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8)
[[
"$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)"
"$(cat
<(wsl.exe --list || true)
<(wsl.exe --list || true | iconv -f UTF-16LE -t UTF-8)
<(wslconfig.exe /list || true)
<(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8))"
==
*${{ matrix.distributions.distribution2.wsl-id }}\ \(Default\)*
]]
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,11 @@ jobs:
shell: "wsl-bash {0}"
- if: "always() && (steps.execute_action.outcome == 'success')"
name: "Test - the default distribution should be correct"
run: "wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n[[ \"$(wslconfig.exe\
\ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.wsl-id\
run: "cat <(wsl.exe --list || true) <(wsl.exe --list || true | iconv -f UTF-16LE\
\ -t UTF-8) <(wslconfig.exe /list || true) <(wslconfig.exe /list || true |\
\ iconv -f UTF-16LE -t UTF-8)\n[[ \"$(cat <(wsl.exe --list || true) <(wsl.exe\
\ --list || true | iconv -f UTF-16LE -t UTF-8) <(wslconfig.exe /list || true)\
\ <(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8))\" == *${{ matrix.distribution.wsl-id\
\ }}\\ \\(Default\\)* ]]\n"
shell: "wsl-bash {0}"
- if: "always() && (steps.execute_action.outcome == 'success')"
Expand Down Expand Up @@ -311,8 +314,11 @@ jobs:
shell: "wsl-bash {0}"
- if: "always() && (steps.execute_action1.outcome == 'success')"
name: "Test - the default distribution should be correct"
run: "wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n[[ \"$(wslconfig.exe\
\ /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distribution.wsl-id\
run: "cat <(wsl.exe --list || true) <(wsl.exe --list || true | iconv -f UTF-16LE\
\ -t UTF-8) <(wslconfig.exe /list || true) <(wslconfig.exe /list || true |\
\ iconv -f UTF-16LE -t UTF-8)\n[[ \"$(cat <(wsl.exe --list || true) <(wsl.exe\
\ --list || true | iconv -f UTF-16LE -t UTF-8) <(wslconfig.exe /list || true)\
\ <(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8))\" == *${{ matrix.distribution.wsl-id\
\ }}\\ \\(Default\\)* ]]\n"
shell: "wsl-bash {0}"
- if: "always() && (steps.execute_action1.outcome == 'success')"
Expand Down Expand Up @@ -827,8 +833,11 @@ jobs:
- if: "always() && (steps.execute_action4.outcome == 'success')"
name: "Test - the default distribution should be the last installed distribution\
\ with set-as-default true"
run: "wslconfig.exe /list\nwslconfig.exe /list | iconv -f UTF-16LE -t UTF-8\n\
[[ \"$(wslconfig.exe /list | iconv -f UTF-16LE -t UTF-8)\" == *${{ matrix.distributions.distribution2.wsl-id\
run: "cat <(wsl.exe --list || true) <(wsl.exe --list || true | iconv -f UTF-16LE\
\ -t UTF-8) <(wslconfig.exe /list || true) <(wslconfig.exe /list || true |\
\ iconv -f UTF-16LE -t UTF-8)\n[[ \"$(cat <(wsl.exe --list || true) <(wsl.exe\
\ --list || true | iconv -f UTF-16LE -t UTF-8) <(wslconfig.exe /list || true)\
\ <(wslconfig.exe /list || true | iconv -f UTF-16LE -t UTF-8))\" == *${{ matrix.distributions.distribution2.wsl-id\
\ }}\\ \\(Default\\)* ]]\n"
shell: "wsl-bash {0}"
- if: "always() && (steps.execute_action4.outcome == 'success')"
Expand Down Expand Up @@ -1390,4 +1399,4 @@ jobs:
"user-id": "Ubuntu-16.04"
"match-pattern": "*Ubuntu*16.04*"
"default-absent-tool": "dos2unix"
fail-fast: false
fail-fast: false

0 comments on commit b4ffb29

Please sign in to comment.