gitannex: skip end to end tests under the race detector

The end to end tests exercise rclone via a separate subprocess spawned
by git-annex, and that subprocess is not built with race
instrumentation.

Running them in the race test therefore adds several minutes to CI
without providing any race coverage. The unit tests in this package
still run under the race detector.
This commit is contained in:
Nick Craig-Wood
2026-08-02 18:25:09 +01:00
parent b3168b3ad6
commit c9cd065458
+8
View File
@@ -18,6 +18,7 @@ import (
"github.com/rclone/rclone/fstest"
"github.com/rclone/rclone/fstest/testy"
"github.com/rclone/rclone/lib/buildinfo"
"github.com/rclone/rclone/lib/israce"
)
// checkRcloneBinaryVersion runs whichever rclone is on the PATH and checks
@@ -194,6 +195,13 @@ func skipE2eTestIfNecessary(t *testing.T) {
t.Skip("Skipping on macOS CI - tests frequently time out")
}
// The code under test runs in a separate rclone subprocess which is not
// built with race instrumentation, so running these tests under the race
// detector costs time without adding any race coverage.
if israce.Enabled {
t.Skip("Skipping because the race detector cannot observe the rclone subprocess")
}
// TODO: Support e2e tests on Windows. Need to evaluate the semantics of the
// HOME and PATH environment variables.
switch runtime.GOOS {