Gitlet / testing / Makefile
Makefile
Raw
# This makefile is defined to give you the following targets:
#
#    default: Same as check
#    check: Run the integration tests.
#    clean: Remove all files and directories generated by testing.
#

SHELL = /bin/bash

# Flags to Java interpreter: check assertions
JFLAGS = -ea

# See comment in ../Makefile
PYTHON = python3

RMAKE = "$(MAKE)"

TESTER = CLASSPATH="$$(pwd)/..:$(CLASSPATH):;$$(pwd)/..;$(CLASSPATH)" $(PYTHON) tester.py

TESTER_FLAGS =

TESTS = samples/*.in *.in

.PHONY: default check clean std

# First, and therefore default, target.
default:
	$(RMAKE) -C .. 
	$(RMAKE) PYTHON=$(PYTHON) check

check:
	@echo "Testing application gitlet.Main..."
	$(TESTER) $(TESTER_FLAGS) $(TESTS)

# 'make clean' will clean up stuff you can reconstruct.
clean:
	$(RM) -r */*~ *~ __pycache__