Skip to content

Conversation

@kajogo777
Copy link
Member

Problem

Windows CI build failing with error:

%1 is not a valid Win32 application. (os error 193)

The daemon executor tests use Unix shell scripts (.sh files with #!/bin/sh shebang) which cannot execute on Windows.

Failed job: https://github.com/stakpak/agent/actions/runs/21791278038/job/62870926643

Solution

Added #[cfg(unix)] attribute to skip shell script tests on Windows:

  • test_script_exit_0
  • test_script_exit_1
  • test_script_exit_2
  • test_script_timeout
  • test_capture_stderr
  • test_missing_script
  • test_large_output
  • create_script() helper function and related imports

The test_check_result_methods test remains cross-platform as it only tests struct methods without executing scripts.

Testing

  • ✅ All 9 executor tests pass on macOS/Unix
  • ✅ No compilation warnings
  • On Windows, 8 tests will be skipped (only test_check_result_methods runs)

The daemon executor tests use Unix shell scripts (.sh files with #!/bin/sh shebang)
which cannot run on Windows, causing CI failures with error:
'%1 is not a valid Win32 application. (os error 193)'

Added #[cfg(unix)] to:
- All shell script execution tests (test_script_exit_*, test_timeout, etc.)
- Helper function create_script() and its imports
- test_missing_script (uses Unix path format)

The test_check_result_methods test remains cross-platform as it only
tests struct methods without executing scripts.
@kajogo777 kajogo777 merged commit 3b59dcc into main Feb 8, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant