forked from TrueCloudLab/rclone
Compare commits
4 commits
tcl/master
...
fix-5951-m
Author | SHA1 | Date | |
---|---|---|---|
|
69fdcd4300 | ||
|
c0331c0c83 | ||
|
533377a955 | ||
|
f6f7bb35d5 |
4 changed files with 66 additions and 50 deletions
100
.github/workflows/build.yml
vendored
100
.github/workflows/build.yml
vendored
|
@ -25,22 +25,22 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job_name: ['linux', 'mac_amd64', 'mac_arm64', 'windows_amd64', 'windows_386', 'other_os', 'go1.15', 'go1.16']
|
||||
job_name: ['mac_amd64', 'mac_arm64']
|
||||
|
||||
include:
|
||||
- job_name: linux
|
||||
os: ubuntu-latest
|
||||
go: '1.17.x'
|
||||
gotags: cmount
|
||||
build_flags: '-include "^linux/"'
|
||||
check: true
|
||||
quicktest: true
|
||||
racequicktest: true
|
||||
librclonetest: true
|
||||
deploy: true
|
||||
# - job_name: linux
|
||||
# os: ubuntu-latest
|
||||
# go: '1.17.x'
|
||||
# gotags: cmount
|
||||
# build_flags: '-include "^linux/"'
|
||||
# check: true
|
||||
# quicktest: true
|
||||
# racequicktest: true
|
||||
# librclonetest: true
|
||||
# deploy: true
|
||||
|
||||
- job_name: mac_amd64
|
||||
os: macOS-latest
|
||||
os: macos-11
|
||||
go: '1.17.x'
|
||||
gotags: 'cmount'
|
||||
build_flags: '-include "^darwin/amd64" -cgo'
|
||||
|
@ -49,51 +49,51 @@ jobs:
|
|||
deploy: true
|
||||
|
||||
- job_name: mac_arm64
|
||||
os: macOS-latest
|
||||
os: macos-11
|
||||
go: '1.17.x'
|
||||
gotags: 'cmount'
|
||||
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -macos-sdk macosx11.1 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
|
||||
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
|
||||
deploy: true
|
||||
|
||||
- job_name: windows_amd64
|
||||
os: windows-latest
|
||||
go: '1.17.x'
|
||||
gotags: cmount
|
||||
build_flags: '-include "^windows/amd64" -cgo'
|
||||
build_args: '-buildmode exe'
|
||||
quicktest: true
|
||||
racequicktest: true
|
||||
deploy: true
|
||||
# - job_name: windows_amd64
|
||||
# os: windows-latest
|
||||
# go: '1.17.x'
|
||||
# gotags: cmount
|
||||
# build_flags: '-include "^windows/amd64" -cgo'
|
||||
# build_args: '-buildmode exe'
|
||||
# quicktest: true
|
||||
# racequicktest: true
|
||||
# deploy: true
|
||||
|
||||
- job_name: windows_386
|
||||
os: windows-latest
|
||||
go: '1.17.x'
|
||||
gotags: cmount
|
||||
goarch: '386'
|
||||
cgo: '1'
|
||||
build_flags: '-include "^windows/386" -cgo'
|
||||
build_args: '-buildmode exe'
|
||||
quicktest: true
|
||||
deploy: true
|
||||
# - job_name: windows_386
|
||||
# os: windows-latest
|
||||
# go: '1.17.x'
|
||||
# gotags: cmount
|
||||
# goarch: '386'
|
||||
# cgo: '1'
|
||||
# build_flags: '-include "^windows/386" -cgo'
|
||||
# build_args: '-buildmode exe'
|
||||
# quicktest: true
|
||||
# deploy: true
|
||||
|
||||
- job_name: other_os
|
||||
os: ubuntu-latest
|
||||
go: '1.17.x'
|
||||
build_flags: '-exclude "^(windows/|darwin/|linux/)"'
|
||||
compile_all: true
|
||||
deploy: true
|
||||
# - job_name: other_os
|
||||
# os: ubuntu-latest
|
||||
# go: '1.17.x'
|
||||
# build_flags: '-exclude "^(windows/|darwin/|linux/)"'
|
||||
# compile_all: true
|
||||
# deploy: true
|
||||
|
||||
- job_name: go1.15
|
||||
os: ubuntu-latest
|
||||
go: '1.15.x'
|
||||
quicktest: true
|
||||
racequicktest: true
|
||||
# - job_name: go1.15
|
||||
# os: ubuntu-latest
|
||||
# go: '1.15.x'
|
||||
# quicktest: true
|
||||
# racequicktest: true
|
||||
|
||||
- job_name: go1.16
|
||||
os: ubuntu-latest
|
||||
go: '1.16.x'
|
||||
quicktest: true
|
||||
racequicktest: true
|
||||
# - job_name: go1.16
|
||||
# os: ubuntu-latest
|
||||
# go: '1.16.x'
|
||||
# quicktest: true
|
||||
# racequicktest: true
|
||||
|
||||
name: ${{ matrix.job_name }}
|
||||
|
||||
|
@ -134,7 +134,7 @@ jobs:
|
|||
run: |
|
||||
brew update
|
||||
brew install --cask macfuse
|
||||
if: matrix.os == 'macOS-latest'
|
||||
if: matrix.os == 'macos-11'
|
||||
|
||||
- name: Install Libraries on Windows
|
||||
shell: powershell
|
||||
|
|
|
@ -10,11 +10,17 @@
|
|||
package cmount
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/rclone/rclone/fstest/testy"
|
||||
"github.com/rclone/rclone/vfs/vfstest"
|
||||
)
|
||||
|
||||
func TestMount(t *testing.T) {
|
||||
// Disable tests under macOS and the CI since they are locking up
|
||||
if runtime.GOOS == "darwin" {
|
||||
testy.SkipUnreliable(t)
|
||||
}
|
||||
vfstest.RunTests(t, false, mount)
|
||||
}
|
||||
|
|
|
@ -16,11 +16,16 @@ import (
|
|||
"github.com/rclone/rclone/cmd/mountlib"
|
||||
"github.com/rclone/rclone/fs/config/configfile"
|
||||
"github.com/rclone/rclone/fs/rc"
|
||||
"github.com/rclone/rclone/fstest/testy"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestRc(t *testing.T) {
|
||||
// Disable tests under macOS and the CI since they are locking up
|
||||
if runtime.GOOS == "darwin" {
|
||||
testy.SkipUnreliable(t)
|
||||
}
|
||||
ctx := context.Background()
|
||||
configfile.Install()
|
||||
mount := rc.Calls.Get("mount/mount")
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/config"
|
||||
"github.com/rclone/rclone/fstest"
|
||||
"github.com/rclone/rclone/fstest/testy"
|
||||
"github.com/rclone/rclone/lib/file"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -303,6 +304,10 @@ func (a *APIClient) request(path string, in, out interface{}, wantErr bool) {
|
|||
}
|
||||
|
||||
func testMountAPI(t *testing.T, sockAddr string) {
|
||||
// Disable tests under macOS and the CI since they are locking up
|
||||
if runtime.GOOS == "darwin" {
|
||||
testy.SkipUnreliable(t)
|
||||
}
|
||||
if _, mountFn := mountlib.ResolveMountMethod(""); mountFn == nil {
|
||||
t.Skip("Test requires working mount command")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue