#
# Makefile for running TSI unit tests
#

TESTS = $(wildcard *.t)
REPORT = ../report.txt

all: init report clean

init:
	@mkdir -p lib
	@mkdir -p tmp
	@cp ../../tsi/SHARED/*.pm lib
	@cp ../../tsi/linux_torque/*.pm lib

.PHONY: runtest $(TESTS)

runtest: $(TESTS)

$(TESTS):
	@echo "\n** Running test $@" >> $(REPORT)
	@perl $@ >> $(REPORT)

report: init runtest

clean:
	@rm -rf lib
	@rm -rf tmp