Skip to content

Commit

Permalink
Update build scripts to always run tests for all MXNet engine types
Browse files Browse the repository at this point in the history
This patch updates `Build.mak` to ensure that unittests and integration
tests will always be run for all of the supported engine types.  As well
as making it easier to run tests for all engines locally, this will make
it possible to greatly simplify our CI setup.
  • Loading branch information
joseph-wakeling-sociomantic committed Jun 21, 2018
1 parent b2c9635 commit 0aa2462
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Build.mak
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,25 @@ endif
download-mnist: $C/script/download-mnist
$(call exec,sh $(if $V,,-x) $^,$(MNIST_DATA_DIR),$^)

# helper function to run tests
run_test = $(call exec,MXNET_ENGINE_TYPE=$2 $1,$1,$2)

# extra build dependencies for integration tests
$O/test-mxnet: override LDFLAGS += -lz
$O/test-mxnet: override DFLAGS += -debug=MXNetHandleManualFree

# extra runtime dependencies for integration tests
$O/test-mxnet.stamp: override ITFLAGS += $(MNIST_DATA_DIR)
$O/test-mxnet.stamp: download-mnist
$O/test-mxnet.stamp: $O/test-mxnet download-mnist
$(call run_test,$<,NaiveEngine)
$(call run_test,$<,ThreadedEngine)
$(call run_test,$<,ThreadedEnginePerDevice)
$Vtouch $@

$O/%unittests: override LDFLAGS += -lz

$O/allunittests.stamp: $O/allunittests
$(call run_test,$<,NaiveEngine)
$(call run_test,$<,ThreadedEngine)
$(call run_test,$<,ThreadedEnginePerDevice)
$Vtouch $@

0 comments on commit 0aa2462

Please sign in to comment.