[Chapel Merge] Workaround sporadic cygwin compilation errors

Branch: refs/heads/main
Revision: 0f08cdf
Author: ronawho
Link: Unavailable
Log Message:

Merge pull request #19390 from ronawho/sleep-cygwin-exec-rm

Workaround sporadic cygwin compilation errors

[reviewed by @tzinsky]

On cygwin we've been seeing an issue where after a test is run,
some other process has a handle on the executable and we can't create a new
executable with the same name for a bit. If a test ran and we have
additional compopts (which means the exec name will be reused) wait a
second while cleaning up the executable to give the other process time
to release its handle.

See Cray/chapel-private#3143 for more info

Modified Files:
M util/test/sub_test.py

Compare: https://github.com/chapel-lang/chapel/compare/cf84f12a60db...0f08cdfb9551