Sha256: 5bdc9a6c448755e4d7500c5bf724034cc306c340a9650afc9f5aafa4c491c5f8
Contents?: true
Size: 1.16 KB
Versions: 160
Compression:
Stored size: 1.16 KB
Contents
# assignments ASSIGNMENT ?= "" IGNOREDIRS := "^(\.git|bin|node_modules|docs|.idea)$$" ASSIGNMENTS = $(shell find ./exercises -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3 | sort | grep -Ev $(IGNOREDIRS)) # output and intermediate directories TMPDIR ?= "/tmp" INTDIR := $(shell mktemp -d "$(TMPDIR)/$(ASSIGNMENT).XXXXXXXXXX") OUTDIR := $(shell mktemp -d "$(TMPDIR)/$(ASSIGNMENT).XXXXXXXXXX") # language specific config (tweakable per language) FILEEXT := "js" EXAMPLE := "example.$(FILEEXT)" TSTFILE := "$(ASSIGNMENT).spec.$(FILEEXT)" all: test node_modules: package.json @npm prune @npm install test-assignment: node_modules @printf "\e[4mRunning tests for $(ASSIGNMENT) assignment\e[0m\n" @cp gulpfile.js exercises/$(ASSIGNMENT) @cp package.json exercises/$(ASSIGNMENT) @cp exercises/grains/lib/big-integer.$(FILEEXT) $(OUTDIR) @sed 's/xit/it/g; s/xdescribe/describe/g' exercises/$(ASSIGNMENT)/$(TSTFILE) > $(INTDIR)/$(TSTFILE) @cp exercises/$(ASSIGNMENT)/$(EXAMPLE) $(INTDIR)/$(ASSIGNMENT).$(FILEEXT) @gulp lint test --input $(INTDIR) --output $(OUTDIR) test: @for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s test-assignment || exit 1; done
Version data entries
160 entries across 160 versions & 1 rubygems