From e41089244b300af2b3e51ac1e9501b4cfe42264e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 22 May 2020 12:56:19 -0400 Subject: Attempt to turn on build_without_cgo tests Signed-off-by: Daniel J Walsh --- .cirrus.yml | 2 -- cmd/podman/system/service.go | 9 +++++++++ cmd/podman/system/varlink.go | 8 -------- pkg/specgen/generate/config_linux_nocgo.go | 3 ++- test/apiv2/test-apiv2 | 2 +- test/e2e/libpod_suite_remote_test.go | 2 +- test/e2e/libpod_suite_varlink_test.go | 2 +- test/endpoint/endpoint.go | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6a3fe5b31..2de08cf9e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -309,8 +309,6 @@ build_each_commit_task: build_without_cgo_task: - skip: $CI == 'true' - depends_on: - "gating" - "vendor" diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index 221738f33..0f42ae28b 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -17,6 +17,7 @@ import ( "github.com/containers/libpod/pkg/util" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) var ( @@ -52,6 +53,14 @@ func init() { flags.BoolVar(&srvArgs.Varlink, "varlink", false, "Use legacy varlink service instead of REST") _ = flags.MarkDeprecated("varlink", "valink API is deprecated.") + flags.SetNormalizeFunc(aliasTimeoutFlag) +} + +func aliasTimeoutFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName { + if name == "timeout" { + name = "time" + } + return pflag.NormalizedName(name) } func service(cmd *cobra.Command, args []string) error { diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go index de855eba6..6a38b3d28 100644 --- a/cmd/podman/system/varlink.go +++ b/cmd/podman/system/varlink.go @@ -8,7 +8,6 @@ import ( "github.com/containers/libpod/cmd/podman/registry" "github.com/containers/libpod/pkg/domain/entities" "github.com/spf13/cobra" - "github.com/spf13/pflag" ) var ( @@ -40,13 +39,6 @@ func init() { flags.SetNormalizeFunc(aliasTimeoutFlag) } -func aliasTimeoutFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName { - if name == "timeout" { - name = "time" - } - return pflag.NormalizedName(name) -} - func varlinkE(cmd *cobra.Command, args []string) error { uri := registry.DefaultVarlinkAddress if len(args) > 0 { diff --git a/pkg/specgen/generate/config_linux_nocgo.go b/pkg/specgen/generate/config_linux_nocgo.go index fc8ed206d..81d1c7011 100644 --- a/pkg/specgen/generate/config_linux_nocgo.go +++ b/pkg/specgen/generate/config_linux_nocgo.go @@ -5,10 +5,11 @@ package generate import ( "errors" + "github.com/containers/libpod/libpod/image" "github.com/containers/libpod/pkg/specgen" spec "github.com/opencontainers/runtime-spec/specs-go" ) -func (s *specgen.SpecGenerator) getSeccompConfig(configSpec *spec.Spec) (*spec.LinuxSeccomp, error) { +func getSeccompConfig(s *specgen.SpecGenerator, configSpec *spec.Spec, img *image.Image) (*spec.LinuxSeccomp, error) { return nil, errors.New("not implemented") } diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2 index 1af76b4be..11c914704 100755 --- a/test/apiv2/test-apiv2 +++ b/test/apiv2/test-apiv2 @@ -270,7 +270,7 @@ function start_service() { die "Cannot start service on non-localhost ($HOST)" fi - $PODMAN_BIN --root $WORKDIR system service --timeout 15 tcp:127.0.0.1:$PORT \ + $PODMAN_BIN --root $WORKDIR system service --time 15 tcp:127.0.0.1:$PORT \ &> $WORKDIR/server.log & service_pid=$! diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index e8cdf91ee..dde853413 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -95,7 +95,7 @@ func (p *PodmanTestIntegration) StartRemoteService() { args = append(args, "--log-level", "debug") } remoteSocket := p.RemoteSocket - args = append(args, "system", "service", "--timeout", "0", remoteSocket) + args = append(args, "system", "service", "--time", "0", remoteSocket) podmanOptions := getRemoteOptions(p, args) command := exec.Command(p.PodmanBinary, podmanOptions...) command.Stdout = os.Stdout diff --git a/test/e2e/libpod_suite_varlink_test.go b/test/e2e/libpod_suite_varlink_test.go index cbaed71cc..92c815b39 100644 --- a/test/e2e/libpod_suite_varlink_test.go +++ b/test/e2e/libpod_suite_varlink_test.go @@ -89,7 +89,7 @@ func (p *PodmanTestIntegration) StartVarlink() { varlinkEndpoint := p.RemoteSocket p.SetVarlinkAddress(p.RemoteSocket) - args := []string{"varlink", "--timeout", "0", varlinkEndpoint} + args := []string{"varlink", "--time", "0", varlinkEndpoint} podmanOptions := getVarlinkOptions(p, args) command := exec.Command(p.PodmanBinary, podmanOptions...) fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " ")) diff --git a/test/endpoint/endpoint.go b/test/endpoint/endpoint.go index 284f0d79c..6f4ae6b1f 100644 --- a/test/endpoint/endpoint.go +++ b/test/endpoint/endpoint.go @@ -73,7 +73,7 @@ func (p *EndpointTestIntegration) startVarlink(useImageCache bool) { varlinkEndpoint := p.VarlinkEndpoint //p.SetVarlinkAddress(p.RemoteSocket) - args := []string{"varlink", "--timeout", "0", varlinkEndpoint} + args := []string{"varlink", "--time", "0", varlinkEndpoint} podmanOptions := getVarlinkOptions(p, args) if useImageCache { cacheOptions := []string{"--storage-opt", fmt.Sprintf("%s.imagestore=%s", p.ImageCacheFS, p.ImageCacheDir)} -- cgit v1.2.3-54-g00ecf