Skip to content

Commit

Permalink
Build block-listener as a standard binary
Browse files Browse the repository at this point in the history
It was inadvertently placed in build/docker/bin even though
docker workflows were not consuming it.  Lets make it a
first class binary.

Change-Id: I3b21a5ee38834e6a5f27c64b059a2447fb253d27
Signed-off-by: Gregory Haskins <gregory.haskins@gmail.com>
  • Loading branch information
ghaskins committed Aug 24, 2016
1 parent 1d8e305 commit 3832045
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ unit-test: peer-image gotools
.PHONY: images
images: $(patsubst %,build/image/%/.dummy, $(IMAGES))

behave-deps: images peer
behave-deps: images peer build/bin/block-listener
behave: behave-deps
@echo "Running behave tests"
@cd bddtests; behave $(BEHAVE_OPTS)
Expand Down Expand Up @@ -140,7 +140,12 @@ build/bin:
# Both peer and peer-image depend on ccenv-image and javaenv-image (all docker env images it supports)
build/bin/peer: build/image/ccenv/.dummy build/image/javaenv/.dummy
build/image/peer/.dummy: build/image/ccenv/.dummy build/image/javaenv/.dummy
build/image/peer/.dummy: build/docker/bin/examples/events/block-listener/

build/bin/block-listener:
@mkdir -p $(@D)
$(CGO_FLAGS) GOBIN=$(abspath $(@D)) go install $(PKGNAME)/examples/events/block-listener
@echo "Binary available as $@"
@touch $@

build/bin/%: build/image/base/.dummy $(PROJECT_FILES)
@mkdir -p $(@D)
Expand Down Expand Up @@ -172,7 +177,7 @@ build/image/ccenv/.dummy: build/image/src/.dummy build/image/ccenv/bin/protoc-ge
docker build -t $(PROJECT_NAME)-ccenv:latest $(@D)
@touch $@

# Special override for java-image
# Special override for java-image
build/image/javaenv/.dummy: Makefile $(JAVASHIM_DEPS)
@echo "Building docker javaenv-image"
@mkdir -p $(@D)
Expand Down
2 changes: 1 addition & 1 deletion bddtests/steps/peer_basic_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ def step_impl(context):
def step_impl(context):
gopath = os.environ.get('GOPATH')
assert gopath is not None, "Please set GOPATH properly!"
listener = os.path.join(gopath, "src/github.com/hyperledger/fabric/build/docker/bin/block-listener")
listener = os.path.join(gopath, "src/github.com/hyperledger/fabric/build/bin/block-listener")
assert os.path.isfile(listener), "Please build the block-listener binary!"
bdd_test_util.start_background_process(context, "eventlistener", [listener, "-listen-to-rejections"] )

Expand Down

0 comments on commit 3832045

Please sign in to comment.