/extras/hs-test/.build.ok
/extras/hs-test/.build.cov.ok
/extras/hs-test/.last_hst_ppid
+/extras/hs-test/.goimports.ok
/extras/hs-test/summary/
# ./configure
@apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
@touch .deps.ok
+.goimports.ok:
+ @rm -f .goimports.ok
+ @touch .goimports.ok
+
.PHONY: checkstyle-go
-checkstyle-go:
- @output=$$(gofmt -d $${WS_ROOT}); \
- if [ -z "$$output" ]; then \
+checkstyle-go: .goimports.ok
+ $(eval GOPATH := $(shell go env GOPATH))
+ @output=$$($(GOPATH)/bin/goimports -d $${WS_ROOT}); \
+ status=$$?; \
+ if [ $$status -ne 0 ]; then \
+ exit $$status; \
+ elif [ -z "$$output" ]; then \
echo "*******************************************************************"; \
echo "Checkstyle OK."; \
echo "*******************************************************************"; \
fi
.PHONY: fixstyle-go
-fixstyle-go:
+fixstyle-go: .goimports.ok
+ $(eval GOPATH := $(shell go env GOPATH))
@echo "Modified files:"
- @gofmt -w -l $(WS_ROOT)
+ @$(GOPATH)/bin/goimports -w -l $(WS_ROOT)
@go mod tidy
@echo "*******************************************************************"
@echo "Fixstyle done."
import (
"bytes"
"fmt"
- "github.com/onsi/gomega/ghttp"
- "github.com/onsi/gomega/gmeasure"
"io"
"math/rand"
"net"
"sync"
"time"
+ "github.com/onsi/gomega/ghttp"
+ "github.com/onsi/gomega/gmeasure"
+
. "fd.io/hs-test/infra"
. "github.com/onsi/ginkgo/v2"
)
"bytes"
"context"
"fmt"
- "github.com/docker/go-units"
"os"
"os/exec"
"regexp"
"text/template"
"time"
+ "github.com/docker/go-units"
+
"github.com/cilium/cilium/pkg/sysctl"
containerTypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
"bufio"
"errors"
"fmt"
- . "github.com/onsi/ginkgo/v2"
"os"
"os/exec"
"strconv"
"strings"
+
+ . "github.com/onsi/ginkgo/v2"
)
var CgroupPath = "/sys/fs/cgroup/"
"bufio"
"flag"
"fmt"
- "github.com/edwarnicke/exechelper"
"io"
"log"
"net/http"
"strings"
"time"
+ "github.com/edwarnicke/exechelper"
+
containerTypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
"github.com/onsi/gomega/gmeasure"
import (
"fmt"
- . "github.com/onsi/ginkgo/v2"
"reflect"
"runtime"
"strings"
+
+ . "github.com/onsi/ginkgo/v2"
)
var cpuPinningTests = map[string][]func(s *CpuPinningSuite){}
import (
"fmt"
- . "github.com/onsi/ginkgo/v2"
"reflect"
"runtime"
"strings"
+
+ . "github.com/onsi/ginkgo/v2"
)
const (
import (
"fmt"
- . "github.com/onsi/ginkgo/v2"
"reflect"
"runtime"
"strings"
+
+ . "github.com/onsi/ginkgo/v2"
)
// These correspond to names used in yaml config
"context"
"encoding/json"
"fmt"
- "go.fd.io/govpp/binapi/ethernet_types"
"io"
"net"
"os"
"syscall"
"time"
+ "go.fd.io/govpp/binapi/ethernet_types"
+
"github.com/edwarnicke/exechelper"
. "github.com/onsi/ginkgo/v2"
"github.com/sirupsen/logrus"
package main
import (
- . "fd.io/hs-test/infra"
"fmt"
+
+ . "fd.io/hs-test/infra"
)
func init() {
package main
import (
- . "fd.io/hs-test/infra"
"fmt"
- . "github.com/onsi/ginkgo/v2"
"os"
"strings"
+
+ . "fd.io/hs-test/infra"
+ . "github.com/onsi/ginkgo/v2"
)
func init() {
package main
import (
- . "fd.io/hs-test/infra"
"fmt"
+
+ . "fd.io/hs-test/infra"
)
func init() {
package main
import (
- api "git.fd.io/govpp.git/api"
- gomock "github.com/golang/mock/gomock"
reflect "reflect"
time "time"
+
+ api "git.fd.io/govpp.git/api"
+ gomock "github.com/golang/mock/gomock"
)
// MockChannel is a mock of Channel interface
"bytes"
"encoding/json"
"fmt"
+
"git.fd.io/govpp.git/examples/bin_api/vpe"
)
package main
import (
+ reflect "reflect"
+
adapter "git.fd.io/govpp.git/adapter"
gomock "github.com/golang/mock/gomock"
- reflect "reflect"
)
// MockStatsAPI is a mock of StatsAPI interface
import (
"flag"
"fmt"
+ "log"
+
"git.fd.io/govpp.git"
"git.fd.io/govpp.git/adapter"
"git.fd.io/govpp.git/adapter/vppapiclient"
"git.fd.io/govpp.git/core"
"git.fd.io/govpp.git/examples/bin_api/interfaces"
"git.fd.io/govpp.git/examples/bin_api/vpe"
- "log"
)
//////////////////////////////////////
package main
import (
+ "math/rand"
+ "testing"
+ "time"
+
"git.fd.io/govpp.git/adapter"
"git.fd.io/govpp.git/api"
"git.fd.io/govpp.git/examples/bin_api/interfaces"
"git.fd.io/govpp.git/examples/bin_api/vpe"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
- "math/rand"
- "testing"
- "time"
)
var (