Skip to content

Commit

Permalink
test: fix makefile issues in test tools
Browse files Browse the repository at this point in the history
Fixes: #731

Signed-off-by: Qi Feng Huo <huoqif@cn.ibm.com>
  • Loading branch information
Qi Feng Huo authored and wainersm committed Mar 27, 2023
1 parent 6f6f46a commit 0935bab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions test/tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# (C) Copyright Confidential Containers Contributors
# SPDX-License-Identifier: Apache-2.0

.PHONY: clean provisioner-cli
.PHONY: all clean force

ARCH ?= $(subst x86_64,amd64,$(shell uname -m))
BUILTIN_CLOUD_PROVIDERS ?= aws azure ibmcloud vsphere libvirt
Expand All @@ -17,8 +17,12 @@ ifneq (,$(filter libvirt,$(BUILTIN_CLOUD_PROVIDERS)))
GOOPTIONS := $(subst CGO_ENABLED=0,CGO_ENABLED=1,$(GOOPTIONS))
endif

all: $(BINARIES)

.PHONY: provisioner-cli
provisioner-cli: ## Build provisioner-cli for developer
provisioner-cli: caa-provisioner-cli

caa-provisioner-cli: force ## Build provisioner-cli for developer
$(GOOPTIONS) go build $(GOFLAGS) -o caa-provisioner-cli "provisioner-cli/main.go"

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions test/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ tools for development and testing.
### Build provisioner-cli
In the root directory of `test/tools`, run command as below to build the cli program:
```bash
make provisioner-cli
make all
```

Program is generated: `test/tools/caa-provisioner-cli`.
Optionally, `BUILTIN_CLOUD_PROVIDERS` could also be used to build the CLI for specific providers, like:
```bash
make BUILTIN_CLOUD_PROVIDERS="ibmcloud" provisioner-cli
make BUILTIN_CLOUD_PROVIDERS="ibmcloud" all
```

### Use provisioner-cli
Expand Down

0 comments on commit 0935bab

Please sign in to comment.