
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.
18 lines
350 B
Go
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")
|
|
}
|
|
}
|