Skip to content

Commit 24cfe4f

Browse files
committed
win bug fixes
1 parent 8ddf7fd commit 24cfe4f

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

.github/workflows/test-scripts.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@ jobs:
306306
- name: Sync BrowserStack logs to workspace (Windows)
307307
if: always()
308308
run: |
309-
$dest = "${env:GITHUB_WORKSPACE}\bs-logs"
309+
$dest = Join-Path $env:GITHUB_WORKSPACE "bs-logs"
310310
New-Item -ItemType Directory -Force -Path $dest | Out-Null
311311
312-
$logPath = "$env:USERPROFILE\.browserstack\NOW\logs"
312+
$logPath = Join-Path $env:USERPROFILE ".browserstack\NOW\logs"
313313
314314
if (Test-Path $logPath) {
315315
Write-Host "Copying logs from $logPath"
316-
Copy-Item -Path "$logPath\*" -Destination $dest -Recurse -Force -ErrorAction SilentlyContinue
316+
Copy-Item -Path (Join-Path $logPath "*") -Destination $dest -Recurse -Force -ErrorAction SilentlyContinue
317317
}
318318
else {
319319
Write-Host "No logs found at $logPath"
@@ -326,7 +326,7 @@ jobs:
326326
name: browserstack-logs-windows
327327
path: |
328328
${{ github.workspace }}/bs-logs
329-
C:\Temp\run_test_*.log
329+
${{ env.USERPROFILE }}\run_test_*.log
330330
retention-days: 30
331331
if-no-files-found: ignore
332332

@@ -483,16 +483,17 @@ jobs:
483483
test-summary:
484484
name: Test Summary
485485
runs-on: ubuntu-latest
486-
needs: [test-mac, test-linux]
486+
needs: [test-mac, test-linux, test-windows]
487487
if: always()
488488
steps:
489489
- name: Check test results
490490
run: |
491491
echo "=== Test Results Summary ==="
492492
echo "macOS Tests: ${{ needs.test-mac.result }}"
493493
echo "Linux Tests: ${{ needs.test-linux.result }}"
494+
echo "Windows Tests: ${{ needs.test-windows.result }}"
494495
495-
if [ "${{ needs.test-mac.result }}" = "failure" ] || [ "${{ needs.test-linux.result }}" = "failure" ]; then
496+
if [ "${{ needs.test-mac.result }}" = "failure" ] || [ "${{ needs.test-linux.result }}" = "failure" ] [ "${{ needs.test-windows.result }}" = "failure" ]; then
496497
echo "❌ Some tests failed"
497498
exit 1
498499
fi
@@ -503,4 +504,4 @@ jobs:
503504
run: |
504505
echo "✅ All script validations passed successfully!"
505506
echo "- mac/run.sh and supporting scripts validated on macOS and Linux"
506-
echo "- win/run.ps1 and supporting scripts validated on Windows (temporarily disabled)"
507+
echo "- win/run.ps1 and supporting scripts validated on Windows"

win/common-utils.ps1

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,6 @@ function Generate-Mobile-Platforms {
363363
}
364364

365365
function Detect-OS {
366-
367-
$response = ""
368-
369-
# Detect OS using .NET APIs
370-
$isWindows = [System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform([System.Runtime.InteropServices.OSPlatform]::Windows)
371-
372-
if ($isWindows) {
373-
$response = "windows"
374-
}
375-
else {
376-
$response = "unknown"
377-
}
378-
379-
$env:NOW_OS = $response
366+
367+
$env:NOW_OS = "windows"
380368
}

0 commit comments

Comments
 (0)