|
78 | 78 | projects: ${{ matrix.project }} |
79 | 79 | build: true # we need to build due to xUnitv3 |
80 | 80 | restore: true # we need to restore since we disabled caching |
| 81 | + verbosity-level: diagnostic |
81 | 82 |
|
82 | 83 | test_windows: |
83 | 84 | name: call-test-windows |
|
96 | 97 | test-arguments: -- RunConfiguration.DisableAppDomain=true |
97 | 98 | build: true # we need to build for .net48 |
98 | 99 | restore: true # apparently we need to restore for .net48 |
| 100 | + verbosity-level: diagnostic |
99 | 101 |
|
100 | 102 | integration_test: |
101 | 103 | name: ⚗️ Integration Test |
@@ -133,13 +135,92 @@ jobs: |
133 | 135 |
|
134 | 136 | - name: Fix Linux test apphost permissions |
135 | 137 | run: | |
136 | | - echo "Ensuring xUnit v3 test apphosts are executable on Linux..." |
137 | | - echo "Configuration: ${{ matrix.configuration }}" |
138 | | - # Dump a bit of info for debugging |
139 | | - find . -path "*/bin/${{ matrix.configuration }}/net*/*" -maxdepth 1 -type f -name "*Tests*" -print || true |
140 | | - # Actually fix permissions |
141 | | - find . -path "*/bin/${{ matrix.configuration }}/net*/*" -type f -name "*Tests*" -exec chmod +x {} + |
142 | | - echo "Permissions fixed." |
| 138 | + set -euo pipefail |
| 139 | +
|
| 140 | + echo "=== Context ===" |
| 141 | + echo "Runner: $RUNNER_OS / $RUNNER_ARCH" |
| 142 | + echo "Configuration: ${{ inputs.configuration }}" |
| 143 | + echo "Workspace: $GITHUB_WORKSPACE" |
| 144 | + echo "PWD: $(pwd)" |
| 145 | + echo "Event: $GITHUB_EVENT_NAME" |
| 146 | + echo "Ref: $GITHUB_REF" |
| 147 | + echo "SHA: $GITHUB_SHA" |
| 148 | + echo |
| 149 | +
|
| 150 | + echo "=== .NET info ===" |
| 151 | + dotnet --info || true |
| 152 | + echo |
| 153 | +
|
| 154 | + echo "=== Git state ===" |
| 155 | + git rev-parse HEAD || true |
| 156 | + git status --porcelain || true |
| 157 | + git rev-parse --is-shallow-repository || true |
| 158 | + echo |
| 159 | +
|
| 160 | + # Paths we care about |
| 161 | + BIN_GLOB="*/bin/${{ inputs.configuration }}/net*/*" |
| 162 | + OBJ_GLOB="*/obj/${{ inputs.configuration }}/net*/*" |
| 163 | +
|
| 164 | + echo "=== Brute-force chmod (bin + obj) ===" |
| 165 | + find . -type f \( -path "$BIN_GLOB" -o -path "$OBJ_GLOB" \) -exec chmod a+x {} + 2>/dev/null || true |
| 166 | + echo "chmod completed (errors ignored)." |
| 167 | + echo |
| 168 | +
|
| 169 | + echo "=== Mount options (look for noexec) ===" |
| 170 | + # If binaries live on a noexec mount, chmod won't help. |
| 171 | + mount | sed -n '1,200p' || true |
| 172 | + echo |
| 173 | +
|
| 174 | + echo "=== Candidate executables (top 200) ===" |
| 175 | + # Show what we might execute; exclude obvious managed files |
| 176 | + find . -type f -path "$BIN_GLOB" \ |
| 177 | + ! -name "*.dll" ! -name "*.pdb" ! -name "*.json" ! -name "*.xml" \ |
| 178 | + -printf "%m %u:%g %s %p\n" | head -n 200 || true |
| 179 | + echo |
| 180 | +
|
| 181 | + echo "=== Likely xUnit / test hosts (if present) ===" |
| 182 | + # These names vary; do not rely on just *Tests* |
| 183 | + find . -type f -path "$BIN_GLOB" \( \ |
| 184 | + -name "testhost*" -o \ |
| 185 | + -name "*xunit*" -o \ |
| 186 | + -name "*Tests*" -o \ |
| 187 | + -name "*.runsettings" \ |
| 188 | + \) -printf "%m %u:%g %s %p\n" | head -n 200 || true |
| 189 | + echo |
| 190 | +
|
| 191 | + echo "=== Deep diagnostics for any 'testhost' or apphost candidates ===" |
| 192 | + # For each likely executable, show the facts that explain 'permission denied' vs 'exec format error' |
| 193 | + while IFS= read -r f; do |
| 194 | + echo "--- $f ---" |
| 195 | + ls -la "$f" || true |
| 196 | +
|
| 197 | + # Identify file type and architecture |
| 198 | + file -L "$f" || true |
| 199 | +
|
| 200 | + # If it's an ELF binary, show its dynamic interpreter and linked libs (exec format errors often show up here) |
| 201 | + if file -L "$f" | grep -q "ELF"; then |
| 202 | + echo "readelf -l (interpreter):" |
| 203 | + readelf -l "$f" 2>/dev/null | sed -n '1,80p' || true |
| 204 | + echo "ldd (dependencies):" |
| 205 | + ldd "$f" 2>/dev/null || true |
| 206 | + fi |
| 207 | +
|
| 208 | + # If it's a script, CRLF in the shebang can cause 'Exec format error' |
| 209 | + if head -c 2 "$f" 2>/dev/null | grep -q "#!"; then |
| 210 | + echo "shebang:" |
| 211 | + head -n 1 "$f" | cat -A || true |
| 212 | + fi |
| 213 | +
|
| 214 | + echo |
| 215 | + done < <( |
| 216 | + find . -type f -path "$BIN_GLOB" \( \ |
| 217 | + -name "testhost*" -o \ |
| 218 | + -name "*xunit*" -o \ |
| 219 | + -name "*Tests*" \ |
| 220 | + \) | head -n 50 |
| 221 | + ) || true |
| 222 | +
|
| 223 | + echo "=== Done diagnostics step ===" |
143 | 224 | shell: bash |
144 | 225 |
|
145 | 226 | - name: Test with ${{ matrix.configuration }} build |
|
0 commit comments