# $Id: Makefile,v 1.2 2002/02/18 18:47:52 thockin Exp $
# Copyright 2002 Sun Microsystems, Inc.  All rights reserved.

include ../../../dynamic.mk

COMPONENTS = ../../server.a

TESTS = edtest1 edtest2 edtest3 edtest4

test: $(TESTS)
	$(warning some tests are commented out)
# edtest1 and edtest2 currently don't run
#	./edtest1 >edtest1.out 2>&1
#	./edtest2 >edtest2.out 2>&1
# cleanup and create tmp for a codb location
# we need it clean so it gets the same oids
	$(RM) -r tmp; mkdir -p tmp
	./edtest3 >edtest3.out 2>&1
	diff -u edtest3.expected edtest3.out
	$(RM) -r tmp; mkdir -p tmp
	./edtest4 >edtest4.out 2>&1
	diff -u edtest4.expected edtest4.out

$(TESTS): %: %.c $(COMPONENTS)
	$(CC) -o $@ $(CFLAGS) $^ $(LIBS) -lcommon -lpam

clean:
	$(RM) $(TESTS) *.out
	$(RM) -r tmp
