flamenco/pkg/shaman/testsupport/testsupport.go
Sybren A. Stüvel d60af809be Shaman: skip certain tests if the platform cannot do symlinking reliably
Windows 10 Home ("Core") only allows symlinking when running as admin,
which is not recommended for Flamenco Manager. Instead of failing unit
tests on this system, simply skip them. This reduces noise when developing
on this platform (i.e. my personal laptop) a lot.
2023-10-15 14:26:32 +02:00

18 lines
350 B
Go

package testsupport
import (
"testing"
"projects.blender.org/studio/flamenco/pkg/sysinfo"
)
func SkipTestIfUnableToSymlink(t *testing.T) {
can, err := sysinfo.CanSymlink()
switch {
case err != nil:
t.Fatalf("error checking platform symlinking capabilities: %v", err)
case !can:
t.Skip("symlinking not possible on current platform")
}
}