#---------------------------------------------------------------------------- # Project: Horizon # File: CTR.build.tests.om # # Copyright (C)2009-2011 Nintendo Co., Ltd. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Rev:$ #---------------------------------------------------------------------------- TEST_TARGETS = CCFLAGS += --diag-suppress=2817 CTR_NO_BANNER_ICON = true public.FilterTestAttributes(process) = if $(not $(defined TEST_ATTRIBUTES)) TEST_ATTRIBUTES = export if $(not $(defined TEST_INCLUDE)) TEST_INCLUDE = BASIC export else TEST_INCLUDE = $(split $",",$(TEST_INCLUDE)) export if $(not $(defined TEST_EXCLUDE)) TEST_EXCLUDE = export else TEST_EXCLUDE = $(split $",",$(TEST_EXCLUDE)) export attributes = $(ParseProcessAttribute null, $(rootname $(process)), $(TEST_ATTRIBUTES)) if $(isEmpty $(attributes)) attributes = BASIC export has_includes = $(filter $(TEST_INCLUDE), $(attributes)) has_excludes = $(filter $(TEST_EXCLUDE), $(attributes)) if $(and $(isEmpty $(has_excludes)), $(not $(isEmpty $(has_includes)))) return $(process) return $(EMPTY) public.FilterTest(sources) = filtered_sources = $(sources) if $(defined TEST_FILTER) regex = $"^\("$(compileToRegex $(TEST_FILTER))$"\)"\$ filtered_sources = foreach( source, $(sources) ) if $(isFilterMatch $(regex), $(rootname $(basename $(source)))) filtered_sources += $(source) export filtered_sources export filtered_sources export filtered_sources return $(filtered_sources) if $(not $(defined OBJECTS)) OBJECTS = export if $(and $(defined DESCRIPTOR), $(defined DESC_PARAM)) if $(not $(defined DESC_BASE)) foreach(TARGET, $(BUILDER.getTargets $(SUPPORTED_TARGETS))) DESC_BASE = $(TARGET.getDefaultDescriptorPath) export export if $(defined DESC_BASE) DESC($(DESCRIPTOR), $(DESC_PARAM), $(DESC_BASE)) if $(defined SOURCES_TEST) if $(filter test tests dotest dotests dotests-%, $(TARGETS)) LIBS += libnn_test librtport BUILD_TESTS = true if $(not $(defined TEST_ENVIRONMENT_PROCESSLIST)) TEST_ENVIRONMENT_PROCESSLIST = true export TEST_ENVIRONMENT_PROCESSLIST if $(not $(defined TEST_ENVIRONMENT_EMUMEM)) TEST_ENVIRONMENT_EMUMEM = true export TEST_ENVIRONMENT_EMUMEM if $(not $(defined TEST_ENVIRONMENT_IMPORT)) TEST_ENVIRONMENT_IMPORT = false if $(not $(defined TEST_ENVIRONMENT_ARM9)) TEST_ENVIRONMENT_ARM9 = false export TEST_ENVIRONMENT_ARM9 if $(not $(defined TEST_ENVIRONMENT_SPI)) TEST_ENVIRONMENT_SPI = true export TEST_ENVIRONMENT_SPI if $(not $(defined TEST_COMMON_SOURCES)) TEST_COMMON_SOURCES = export TEST_COMMON_SOURCES # cdi is not created for tests that are not executed with the process list CTR_MAKE_DEVELOPMENT_IMAGE = $(TEST_ENVIRONMENT_PROCESSLIST) foreach(SOURCE_TEST, $(FilterTest $(SOURCES_TEST))) foreach(TARGET, $(BUILDER.getTargets $(SUPPORTED_TARGETS))) EXEFILE = $(TestProgram $(TARGET), $(SOURCE_TEST) $(TEST_COMMON_SOURCES) $(OBJECTS)) TEST_TARGETS += $(EXEFILE) export export export export DefineDefaultRules()