###############################################################################
#
# $Id$ $Name$
#
# The contents of this file are subject to the AAF SDK Public Source
# License Agreement Version 2.0 (the "License"); You may not use this
# file except in compliance with the License.  The License is available
# in AAFSDKPSL.TXT, or you may obtain a copy of the License from the
# Advanced Media Workflow Association, Inc., or its successor.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
# the License for the specific language governing rights and limitations
# under the License.  Refer to Section 3.3 of the License for proper use
# of this Exhibit.
#
# WARNING:  Please contact the Advanced Media Workflow Association,
# Inc., for more information about any additional licenses to
# intellectual property covering the AAF Standard that may be required
# to create and distribute AAF compliant products.
# (http://www.amwa.tv/policies).
#
# Copyright Notices:
# The Original Code of this file is Copyright 1998-2009, licensor of the
# Advanced Media Workflow Association.  All rights reserved.
#
# The Original Code of this file is Copyright 1998-2009, Licensor of the
# AAF Association.
#
###############################################################################


PROGNAME = BuildTestFile

PROGLIBS = -lexpat

AAFBASE ?= ../../../..

RUNONETEST = env AAFSDKBINDIR=$(AAFSDKBINDIR) EXE=$(EXE) ./RunOneTest.sh

include ../../aafanalyzer.mk

.PHONY: clean
clean::
	rm -f *.aaf *.actual

.PHONY: xmlformat
xmlformat: 
	./xmlformatall.sh

buildtestfile: $(AAFSDKBINDIR)/BuildTestFile$(EXE)

.PHONY: check
check:  clean buildtestfile alltests

.PHONY: alltests
alltests: EPAcyclicTest \
          EPDerivationTest1 \
          EPDerivationTest2 \
          EPDerivationTest3 \
          EPDerivationTest4 \
          EPNameTest \
          EPContainedTrackTest \
          EPEditRateTest \
          EPEditRateTest2 \
          EPEditRateTest3 \
          EPEditRateTest4 \
          EPEditRateTest5 \
          EPEditRateTest6 \
          EPEffectTest \
          EPDefinitionTest \
          EPDefinitionTest2 \
          EPHeaderTest1 \
          EPHeaderTest2 \
          EPHeaderTest3 \
          EPParameterTest \
          EPAnnotationTest \
          EPAnnotationTest2 \
          EPMultiChannelAudioTest \
          EPTrackContentsTest

.PHONY: EPAcyclicTest
EPAcyclicTest: buildtestfile
	$(RUNONETEST) EPAcyclicTest "Acyclic Analysis Test"

.PHONY: EPDerivationTest1
EPDerivationTest1: buildtestfile
	# If python and xmlformat are installed then the EPDerivationTest1.xml file
	# can be generated by activating the following line:
	#./GenDerivationTestXml.py | xmlformat > EPDerivationTest1.xml
	$(RUNONETEST) EPDerivationTest1 "Mob Derivation Test"

.PHONY: EPDerivationTest2
EPDerivationTest2: buildtestfile
	$(RUNONETEST) EPDerivationTest2 "Mob Derivation Test"

.PHONY: EPDerivationTest3
EPDerivationTest3: buildtestfile
	$(RUNONETEST) EPDerivationTest3 "Mob Derivation Test"

.PHONY: EPDerivationTest4
EPDerivationTest4: buildtestfile
	$(RUNONETEST) EPDerivationTest4 "Mob Derivation Test"

.PHONY: EPNameTest
EPNameTest: buildtestfile
	$(RUNONETEST) EPNameTest "Edit Protocol Naming Test"

.PHONY: EPContainedTrackTest
EPContainedTrackTest: buildtestfile
	$(RUNONETEST) EPContainedTrackTest "Edit Protocol Mob Contained Tracks Test"

.PHONY: EPEditRateTest
EPEditRateTest: buildtestfile
	$(RUNONETEST) EPEditRateTest "Edit Protocol Edit Rate Test"

.PHONY: EPEditRateTest2
EPEditRateTest2: buildtestfile
	$(RUNONETEST) EPEditRateTest2 "Edit Protocol Edit Rate Test"

.PHONY: EPEditRateTest3
EPEditRateTest3: buildtestfile
	$(RUNONETEST) EPEditRateTest3 "Edit Protocol Edit Rate Test"

.PHONY: EPEditRateTest4
EPEditRateTest4: buildtestfile
	$(RUNONETEST) EPEditRateTest4 "Edit Protocol Edit Rate Test"

.PHONY: EPEditRateTest5
EPEditRateTest5: buildtestfile
	$(RUNONETEST) EPEditRateTest5 "Edit Protocol Edit Rate Test"

.PHONY: EPEditRateTest6
EPEditRateTest6: buildtestfile
	$(RUNONETEST) EPEditRateTest6 "Edit Protocol Edit Rate Test"

.PHONY: EPEffectTest
EPEffectTest: buildtestfile
	$(RUNONETEST) EPEffectTest "Edit Protocol Effect Test"

.PHONY: EPDefinitionTest
EPDefinitionTest: buildtestfile
	$(RUNONETEST) EPDefinitionTest "Edit Protocol Definition Test"

.PHONY: EPDefinitionTest2
EPDefinitionTest2: buildtestfile
	$(RUNONETEST) EPDefinitionTest2 "Edit Protocol Definition Test"

.PHONY: EPHeaderTest1
EPHeaderTest1: buildtestfile
	$(RUNONETEST) EPHeaderTest1 "Edit Protocol Header Test"

.PHONY: EPHeaderTest2
EPHeaderTest2: buildtestfile
	$(RUNONETEST) EPHeaderTest2 "Edit Protocol Header Test"

.PHONY: EPHeaderTest3
EPHeaderTest3: buildtestfile
	$(RUNONETEST) EPHeaderTest3 "Edit Protocol Header Test"

.PHONY: EPParameterTest
EPParameterTest: buildtestfile
	$(RUNONETEST) EPParameterTest "Edit Protocol Parameter Test"

.PHONY: EPAnnotationTest
EPAnnotationTest: buildtestfile
	$(RUNONETEST) EPAnnotationTest "Edit Protocol Annotation Test"

.PHONY: EPAnnotationTest2
EPAnnotationTest2: buildtestfile
	$(RUNONETEST) EPAnnotationTest2 "Edit Protocol Annotation Test"

.PHONY: EPMultiChannelAudioTest
EPMultiChannelAudioTest: buildtestfile
	$(RUNONETEST) EPMultiChannelAudioTest "Edit Protocol Multi-Channel Audio Test"

.PHONY: EPTrackContentsTest
EPTrackContentsTest: buildtestfile
	$(RUNONETEST) EPTrackContentsTest "Edit Protocol Track Contents Test"
