diff options
author | Loïc Hoguin <[email protected]> | 2020-06-18 15:02:43 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-06-18 15:02:43 +0200 |
commit | 9de378e9b0489775a41dedea085e9d77ca52e256 (patch) | |
tree | 0ce6954a8230747a5310be4bdb99878c856a159f /test | |
parent | 944c69634a4914684ce0d4eaf0b4f5950e06993a (diff) | |
download | erlang.mk-9de378e9b0489775a41dedea085e9d77ca52e256.tar.gz erlang.mk-9de378e9b0489775a41dedea085e9d77ca52e256.tar.bz2 erlang.mk-9de378e9b0489775a41dedea085e9d77ca52e256.zip |
Add initial Concuerror integration
https://concuerror.com/
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_concuerror.mk | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/plugin_concuerror.mk b/test/plugin_concuerror.mk new file mode 100644 index 0000000..f1b9288 --- /dev/null +++ b/test/plugin_concuerror.mk @@ -0,0 +1,39 @@ +# Concuerror plugin. + +CONCUERROR_TARGETS = $(call list_targets,concuerror) + +.PHONY: concuerror $(CONCUERROR_TARGETS) + +concuerror: $(CONCUERROR_TARGETS) + +concuerror-app: init + + $i "Bootstrap a new OTP application named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap $v + + $i "Create a test module with a function that returns immediately" + $t mkdir $(APP)/test + $t printf "%s\n" \ + "-module(concuerror_success)." \ + "-export([test/0])." \ + "test() -> ok." > $(APP)/test/concuerror_success.erl + + $i "Add the test case to CONCUERROR_TESTS" + $t perl -ni.bak -e 'print;if ($$.==1) {print "CONCUERROR_TESTS += concuerror_success:test\n"}' $(APP)/Makefile + + $i "Confirm that Concuerror completes successfully" + $t $(MAKE) -C $(APP) concuerror $v + + $i "Create a test module with a function that has no local return" + $t printf "%s\n" \ + "-module(concuerror_error)." \ + "-export([test/0])." \ + "test() -> 1 = 2, ok." > $(APP)/test/concuerror_error.erl + + $i "Add the test case to CONCUERROR_TESTS" + $t perl -ni.bak -e 'print;if ($$.==1) {print "CONCUERROR_TESTS += concuerror_error:test\n"}' $(APP)/Makefile + + $i "Confirm that Concuerror errors out" + $t ! $(MAKE) -C $(APP) concuerror $v |