mirror of https://github.com/axmolengine/axmol.git
Clean the data when the auto tests are finished.
This commit is contained in:
parent
0571383889
commit
669fc10d37
|
@ -4785,7 +4785,6 @@
|
|||
FA94B23C1B90497E0074B261 /* BaseTest.cpp */,
|
||||
FA94B23D1B90497E0074B261 /* BaseTest.h */,
|
||||
FA94B23E1B90497E0074B261 /* controller.cpp */,
|
||||
FADE78941B9C42E80061590D /* PerformanceLabelTest.h */,
|
||||
FA94B23F1B90497E0074B261 /* controller.h */,
|
||||
FA94B2411B90497E0074B261 /* testBasic.h */,
|
||||
FA94B2381B9045160074B261 /* PerformanceAllocTest.cpp */,
|
||||
|
@ -4793,6 +4792,7 @@
|
|||
FADE78971B9D5C640061590D /* PerformanceEventDispatcherTest.cpp */,
|
||||
FADE78981B9D5C640061590D /* PerformanceEventDispatcherTest.h */,
|
||||
FADE78931B9C42E80061590D /* PerformanceLabelTest.cpp */,
|
||||
FADE78941B9C42E80061590D /* PerformanceLabelTest.h */,
|
||||
FADE786E1B9451540061590D /* PerformanceNodeChildrenTest.h */,
|
||||
FADE786D1B9451540061590D /* PerformanceNodeChildrenTest.cpp */,
|
||||
FADE78711B9572990061590D /* PerformanceParticleTest.cpp */,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "AppDelegate.h"
|
||||
#include "Profile.h"
|
||||
#include "controller.h"
|
||||
|
||||
USING_NS_CC;
|
||||
|
@ -74,9 +73,7 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
|||
}
|
||||
|
||||
register_all_packages();
|
||||
|
||||
Profile::getInstance()->setDeviceName("device name");
|
||||
Profile::getInstance()->setEngineVersion(cocos2dVersion());
|
||||
|
||||
TestController::getInstance();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -118,10 +118,7 @@ Profile* Profile::getInstance()
|
|||
|
||||
void Profile::destroyInstance()
|
||||
{
|
||||
if (nullptr != s_profile)
|
||||
{
|
||||
delete s_profile;
|
||||
}
|
||||
CC_SAFE_DELETE(s_profile);
|
||||
}
|
||||
|
||||
Profile::Profile()
|
||||
|
|
|
@ -56,6 +56,9 @@ void TestController::startAutoTest()
|
|||
_logIndentation = "";
|
||||
_autoTestThread = std::thread(&TestController::traverseThreadFunc, this);
|
||||
_autoTestThread.detach();
|
||||
|
||||
Profile::getInstance()->setDeviceName("device name");
|
||||
Profile::getInstance()->setEngineVersion(cocos2dVersion());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +82,7 @@ void TestController::traverseThreadFunc()
|
|||
|
||||
// write the test data into file.
|
||||
Profile::getInstance()->flush();
|
||||
Profile::destroyInstance();
|
||||
}
|
||||
|
||||
void TestController::traverseTestList(TestList* testList)
|
||||
|
|
Loading…
Reference in New Issue