Sha256: 7b6c41ea2922b27fee5c90d98d4d4cae0b1937507700eb94a7da06ede535c7d0
Contents?: true
Size: 1.17 KB
Versions: 377
Compression:
Stored size: 1.17 KB
Contents
# assignments ASSIGNMENT ?= "" ASSIGNMENTS = $(shell find ./exercises -maxdepth 1 -mindepth 1 -type d | awk -F/ '{print $$NF}' | sort) default: testgenerator test # output directories TMPDIR ?= "/tmp/" OUTDIR := $(shell mktemp -d "$(TMPDIR)$(ASSIGNMENT).XXXXXXXXXX") # language specific config (tweakable per language) FILEEXT := "ml" EXAMPLE := "example.$(FILEEXT)" SRCFILE := "$(shell echo $(ASSIGNMENT) | sed 's/-/_/g')" TSTFILE := "$(SRCFILE)_test.$(FILEEXT)" # Any additional arguments, such as -p for pretty output and others ARGS ?= "" # single test test-assignment: @echo "" @echo "" @echo "----------------------------------------------------------------" @echo "running tests for: $(ASSIGNMENT)" @cp -r ./exercises/$(ASSIGNMENT)/* $(OUTDIR) @cp ./exercises/$(ASSIGNMENT)/$(EXAMPLE) $(OUTDIR)/$(SRCFILE).$(FILEEXT) @make -C $(OUTDIR) @rm -rf $(OUTDIR) testgenerator: make -C ./tools/test-generator # all tests test: @for assignment in $(ASSIGNMENTS); do \ ASSIGNMENT=$$assignment $(MAKE) -s test-assignment || exit 1;\ done clean: make -C ./tools/test-generator clean @for assignment in $(ASSIGNMENTS); do \ make -C ./exercises/$$assignment clean;\ done .PHONY: clean
Version data entries
377 entries across 377 versions & 1 rubygems