#---------------------------------------------------------------------------- # 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 $ #---------------------------------------------------------------------------- #====================================================================== # # テストの要約出力 # #====================================================================== 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 # # 概要 # 実行したテストのログファイルをすべて取得します。 # # 参照しているグローバル変数 # なし #------------------------------------------------------- GetTestLogFiles(targets) = ret[] = foreach(target, $(targets)) if $(filter dotests%, $(basename $(target.target))) ret += $(file $(filter %.log, $(target.build-deps))) export export return $(ret) #------------------------------------------------------- # AddRulesToOutputTestSummary # # 概要 # 実行したテスト結果の要約を出力するルールを # .BUILD_SUCCESS に作成します。 # # 参照している変数 # 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) #====================================================================== # # ルール定義 # #====================================================================== # dotests系が対象の場合のみ要約出力用のルールを追加します。 if $(and $(not $(isEmpty $(filter dotests-%,$(TARGETS)))), \ $(not $(and $(defined SKIP_RUN), $(SKIP_RUN)))) AddRulesToOutputTestSummary()