#---------------------------------------------------------------------------- # Project: Horizon # File: CTR.commondefs.test.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: 34692 $ #---------------------------------------------------------------------------- #====================================================================== # # Test summary output # #====================================================================== private.TEST_TARGETS = $(filter dotests-%,$(TARGETS)) private.TEST_SUMMAY = $(ROOT_IMAGES)/tests/nnTest-Report.txt private.SUMMARY_TEST = $(absname $(ROOT_TOOLS)$(DIRSEP)_private$(DIRSEP)TestReport.py) #------------------------------------------------------- # GetTestLogFiles # # Overview # Get all log files of executed tests. # # Global variable that is referenced # None. #------------------------------------------------------- GetTestLogFiles(targets) = ret[] = foreach(target, $(targets)) if $(filter dotests%, $(basename $(target.target))) ret += $(file $(filter %.log, $(target.build-deps))) export export return $(ret) #------------------------------------------------------- # AddRulesToOutputTestSummary # # Overview # The rule to output the summary of the results of the executed test is created in .BUILD_SUCCESS. # # # Referenced variable # SUMMARY_TEST TEST_SUMMAY #------------------------------------------------------- AddRulesToOutputTestSummary() = if $(file-exists $(SUMMARY_TEST)) .BUILD_SUCCESS: $(makeDirectory $(dirname $(TEST_SUMMAY))) python $(SUMMARY_TEST) $(GetTestLogFiles $(find-build-targets Succeeded)) > $(TEST_SUMMAY) || true cat $(TEST_SUMMAY) #====================================================================== # # Root definition # #====================================================================== # Add summary output rule only when dotests series is targeted. if $(and $(not $(isEmpty $(filter dotests-%,$(TARGETS)))), \ $(not $(and $(defined SKIP_RUN), $(SKIP_RUN)))) AddRulesToOutputTestSummary()