echo off :: ############################################################################### :: # :: # Copyright (C) 2009-2013 Nintendo. 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. :: # :: ############################################################################### ::Insert code to delete all files except for the .rpx and .rpl :: if not exist %CAFE_ROOT%\masteringtemp ( mkdir %CAFE_ROOT%\masteringtemp ) if not exist %CAFE_ROOT%\mstrtestlogs ( mkdir %CAFE_ROOT%\mstrtestlogs ) set MSTR_LOGDIR=%CAFE_ROOT%\mstrtestlogs set TEST_RPX_DIR=%CAFE_ROOT%\system\bin\ghs\cafe\demo\gx2\garden\motionBlur\DEBUG set TEST_RPX=motionBlur @echo on ::Create default app, cos, and meta.xml files cafex run -b %TEST_RPX_DIR%\%TEST_RPX%.rpx cafex stop :: echo off ::Test1 - Basic mastering test- Provide all paths @echo makemaster with -r -o and -w arguments @echo *#*#*#*#*#*# TEST 1 BEGIN #*#*#*#*#*#* cafex makemaster -r %TEST_RPX_DIR%\%TEST_RPX%.rpx -o %CAFE_ROOT%\motionBlur_CafeX_DEBUG -w %CAFE_ROOT%\masteringtemp > %MSTR_LOGDIR%\Test1_log.txt if exist %CAFE_ROOT%\motionBlur_CafeX_DEBUG.wumad ( %CAFE_ROOT%\system\bin\tool\mastering\comparewumad.exe motionBlur_CafeX_DEBUG.wumad motionBlur_Script_DEBUG.wumad > %MSTR_LOGDIR%\Test1_cmp.txt ) else ( @echo Mastering process did not generate a wumad! See %MSTR_LOGDIR%\Test1_log.txt for details. @echo *#*#*#*#*#*# TEST 1 FAIL #*#*#*#*#*#* ) @echo *#*#*#*#*#*# TEST 1 END #*#*#*#*#*#* @echo . ::Test2 - Basic mastering test- Provide no paths @echo makemaster with no arguments @echo *#*#*#*#*#*# TEST 2 BEGIN #*#*#*#*#*#* cafex makemaster > %MSTR_LOGDIR%\Test2_log.txt if exist %TEST_RPX_DIR%\%TEST_RPX%.wumad ( %CAFE_ROOT%\system\bin\tool\mastering\comparewumad.exe %TEST_RPX_DIR%\motionBlur.wumad %CAFE_ROOT%\motionBlur_Script_DEBUG.wumad > %MSTR_LOGDIR%\Test2_cmp.txt ) else ( @echo Mastering process did not generate a wumad! See %MSTR_LOGDIR%\Test2_log.txt for details. @echo *#*#*#*#*#*# TEST 2 FAIL #*#*#*#*#*#* ) @echo *#*#*#*#*#*# TEST 2 END #*#*#*#*#*#* @echo . ::Test3 - Add system partition @echo makemaster with system update partition @echo *#*#*#*#*#*# TEST 3 BEGIN #*#*#*#*#*#* cafex makemaster -u -o %CAFE_ROOT%\motionBlur_CafeX_D_Part > %MSTR_LOGDIR%\Test3_log.txt if exist %CAFE_ROOT%\motionBlur_CafeX_D_Part.wumad ( %CAFE_ROOT%\system\bin\tool\mastering\comparewumad.exe %CAFE_ROOT%\motionBlur_CafeX_D_Part.wumad %CAFE_ROOT%\motionBlur_Script_DEBUG_Part.wumad > %MSTR_LOGDIR%\Test3_cmp.txt ) else ( @echo Mastering process did not generate a wumad! See %MSTR_LOGDIR%\Test3_log.txt for details. @echo *#*#*#*#*#*# TEST 3 FAIL #*#*#*#*#*#* ) @echo *#*#*#*#*#*# TEST 3 END #*#*#*#*#*#* @echo . ::Test4 - Create patch @echo *#*#*#*#*#*# TEST 4 BEGIN #*#*#*#*#*#* cafex makemaster -o %CAFE_ROOT%\helloworldv2_CafeX -p %CAFE_ROOT%\helloworldv1.wumad -r %CAFE_ROOT%\system\bin\ghs\cafe\demo\helloworld\DEBUG\helloworld.rpx > %MSTR_LOGDIR%\Test4_log.txt if exist %CAFE_ROOT%\helloworldv2_CafeX.wumad ( %CAFE_ROOT%\system\bin\tool\mastering\comparewumad.exe %CAFE_ROOT%\helloworldv2_CafeX.wumad %CAFE_ROOT%\helloworldv2.wumad > %MSTR_LOGDIR%\Test4_cmp.txt ) else ( @echo Mastering process did not generate a wumad! See %MSTR_LOGDIR%\Test4_log.txt for details. @echo *#*#*#*#*#*# TEST 4 FAIL #*#*#*#*#*#* goto EndTest4 ) ::Check for .diff existence if exist %CAFE_ROOT%\helloworldv2_CafeX.diff ( @echo Diff the .diffs here! ) else ( @echo Mastering process did not generate a diff file! See %MSTR_LOGDIR%\Test4_log.txt for details. @echo *#*#*#*#*#*# TEST 4 FAIL #*#*#*#*#*#* ) :EndTest4 @echo *#*#*#*#*#*# TEST 4 END #*#*#*#*#*#* @echo . ::Test5 - Create AOC @echo Test AOC creation w/ makeaoc command @echo *#*#*#*#*#*# TEST 5 BEGIN #*#*#*#*#*#* set OLD_CAFE_CONTENT_DIR=%CAFE_CONTENT_DIR% set OLD_CAFE_CODE_DIR=%CAFE_CODE_DIR% set CAFE_CODE_DIR=%CAFE_ROOT%\AOCTutorial\code set CAFE_CONTENT_DIR=%CAFE_ROOT%\AOCTutorial\content cafex makeaoc %CAFE_ROOT%\AOCTutorial\AOC1\ AOC1CafeX > %MSTR_LOGDIR%\Test5_log.txt if exist %CAFE_ROOT%\AOCTutorial\AOC1\outdir\AOC1CafeX.wumad ( comparewumad.exe %CAFE_ROOT%\AOCTutorial\AOC1\outdir\AOC1CafeX.wumad %CAFE_ROOT%\AOC1Script.wumad > %MSTR_LOGDIR%\Test5_cmp.txt ) else ( @echo Mastering process did not generate a wumad! See %MSTR_LOGDIR%\Test5_log.txt for details. @echo *#*#*#*#*#*# TEST 5 FAIL #*#*#*#*#*#* ) @echo *#*#*#*#*#*# TEST 5 END #*#*#*#*#*#* set CAFE_CODE_DIR=%OLD_CAFE_CODE_DIR% set CAFE_CONTENT_DIR=%OLD_CAFE_CONTENT_DIR% @echo . @echo Test the help message @echo *#*#*#*#*#*# HELP MESSAGE #*#*#*#*#*#* ::Last test - help message cafex makemaster -h @echo *#*#*#*#*#*# HELP MSG END #*#*#*#*#*#* @echo -*-*-*-*-*-* ALL TESTS COMPLETE *-*-*-*-*-*-