Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4a5c9411
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4a5c9411
编写于
7月 13, 2022
作者:
W
wangshi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加xts测试入口
Signed-off-by:
N
wangshi
<
wangshi@kaihongdigi.com
>
上级
50efcbd9
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
136 addition
and
218 deletion
+136
-218
graphic/vkgl/src/ActsApp.cpp
graphic/vkgl/src/ActsApp.cpp
+103
-180
graphic/vkgl/src/ActsApp.h
graphic/vkgl/src/ActsApp.h
+33
-38
未找到文件。
graphic/vkgl/src/ActsApp.cpp
浏览文件 @
4a5c9411
...
...
@@ -12,98 +12,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ActsApp.h"
#include <iostream>
#include "tcuPlatform.hpp"
#include "tcuTestContext.hpp"
#include "tcuTestSessionExecutor.hpp"
#include "tcuTestHierarchyUtil.hpp"
#include "tcuCommandLine.hpp"
#include "tcuTestLog.hpp"
#include "qpInfo.h"
#include "qpDebugOut.h"
#include "deMath.h"
#include "ActsApp.h"
namespace
tcu
{
using
std
::
string
;
/*--------------------------------------------------------------------****!
* Writes all packages found stdout without any
* separations. Recommended to be used with a single package
* only. It's possible to use test selectors for limiting the export
* to one package in a multipackage binary.
*--------------------------------------------------------------------*/
static
void
writeCaselistsToStdout
(
TestPackageRoot
&
root
,
TestContext
&
testCtx
)
{
DefaultHierarchyInflater
inflater
(
testCtx
);
de
::
MovePtr
<
const
CaseListFilter
>
caseListFilter
(
testCtx
.
getCommandLine
().
createCaseListFilter
(
testCtx
.
getArchive
()));
TestHierarchyIterator
iter
(
root
,
inflater
,
*
caseListFilter
);
while
(
iter
.
getState
()
!=
TestHierarchyIterator
::
STATE_FINISHED
)
{
iter
.
next
();
tcu
::
TestNode
*
testNode
=
iter
.
getNode
();
while
(
testNode
->
getNodeType
()
!=
NODETYPE_PACKAGE
)
{
if
(
iter
.
getState
()
==
TestHierarchyIterator
::
STATE_ENTER_NODE
)
std
::
cout
<<
(
isTestNodeTypeExecutable
(
testNode
->
getNodeType
())
?
"TEST"
:
"GROUP"
)
<<
": "
<<
iter
.
getNodePath
()
<<
"
\n
"
;
iter
.
next
();
}
DE_ASSERT
(
iter
.
getState
()
==
TestHierarchyIterator
::
STATE_LEAVE_NODE
&&
testNode
->
getNodeType
()
==
NODETYPE_PACKAGE
);
iter
.
next
();
};
}
/*--------------------------------------------------------------------****!
* Verifies that amber capability requirements in the .amber files
* match with capabilities defined on the CTS C code.
****--------------------------------------------------------------------*/
static
void
verifyAmberCapabilityCoherency
(
TestPackageRoot
&
root
,
TestContext
&
testCtx
)
{
DefaultHierarchyInflater
inflater
(
testCtx
);
de
::
MovePtr
<
const
CaseListFilter
>
caseListFilter
(
testCtx
.
getCommandLine
().
createCaseListFilter
(
testCtx
.
getArchive
()));
TestHierarchyIterator
iter
(
root
,
inflater
,
*
caseListFilter
);
int
count
=
0
;
int
errorCount
=
0
;
bool
ok
=
true
;
while
(
iter
.
getState
()
!=
TestHierarchyIterator
::
STATE_FINISHED
)
{
iter
.
next
();
tcu
::
TestNode
*
testNode
=
iter
.
getNode
();
while
(
testNode
->
getNodeType
()
!=
NODETYPE_PACKAGE
)
{
if
(
iter
.
getState
()
==
TestHierarchyIterator
::
STATE_ENTER_NODE
&&
isTestNodeTypeExecutable
(
testNode
->
getNodeType
()))
{
std
::
cout
<<
iter
.
getNodePath
()
<<
"
\n
"
;
testCtx
.
getLog
()
<<
tcu
::
TestLog
::
Message
<<
iter
.
getNodePath
()
<<
tcu
::
TestLog
::
EndMessage
;
count
++
;
};
iter
.
next
();
};
DE_ASSERT
(
iter
.
getState
()
==
TestHierarchyIterator
::
STATE_LEAVE_NODE
&&
testNode
->
getNodeType
()
==
NODETYPE_PACKAGE
);
iter
.
next
();
};
std
::
cout
<<
count
<<
" amber tests, "
<<
errorCount
<<
" errors.
\n
"
;
if
(
!
ok
)
{
TCU_THROW
(
InternalError
,
"One or more CTS&Amber test requirements do not match; check log for details"
);
};
}
using
std
::
string
;
/*--------------------------------------------------------------------****!
/*
* \brief Construct test application
*
* If a fatal error occurs during initialization constructor will call
* die() with debug information.
*
* \param platform Reference to platform implementation.
*--------------------------------------------------------------------
*/
ActsApp
::
ActsApp
(
Platform
&
platform
,
Archive
&
archive
,
TestLog
&
log
,
const
CommandLine
&
cmdLine
)
*/
ActsApp
::
ActsApp
(
Platform
&
platform
,
Archive
&
archive
,
TestLog
&
log
,
const
CommandLine
&
cmdLine
)
:
m_platform
(
platform
),
m_watchDog
(
DE_NULL
),
m_crashHandler
(
DE_NULL
),
...
...
@@ -111,28 +42,16 @@ namespace tcu {
m_testCtx
(
DE_NULL
),
m_testRoot
(
DE_NULL
),
m_testExecutor
(
DE_NULL
)
{
{
print
(
"dEQP Core %s (0x%08x) starting..
\n
"
,
qpGetReleaseName
(),
qpGetReleaseId
());
print
(
" target implementation = '%s'
\n
"
,
qpGetTargetName
());
if
(
!
deSetRoundingMode
(
DE_ROUNDINGMODE_TO_NEAREST_EVEN
))
{
qpPrintf
(
"WARNING: Failed to set floating-point rounding mode!
\n
"
);
};
}
try
{
const
RunMode
runMode
=
cmdLine
.
getRunMode
();
// Initialize watchdog
if
(
cmdLine
.
isWatchDogEnabled
())
{
TCU_CHECK_INTERNAL
(
m_watchDog
=
qpWatchDog_create
(
onWatchdogTimeout
,
this
,
WATCHDOG_TOTAL_TIME_LIMIT_SECS
,
WATCHDOG_INTERVAL_TIME_LIMIT_SECS
));
};
// Initialize crash handler.
if
(
cmdLine
.
isCrashHandlingEnabled
())
{
TCU_CHECK_INTERNAL
(
m_crashHandler
=
qpCrashHandler_create
(
onCrash
,
this
));
};
// Create test context
m_testCtx
=
new
TestContext
(
m_platform
,
archive
,
log
,
cmdLine
,
m_watchDog
);
...
...
@@ -142,58 +61,50 @@ namespace tcu {
// \note No executor is created if runmode is not EXECUTE
if
(
runMode
==
RUNMODE_EXECUTE
)
{
m_testExecutor
=
new
TestSessionExecutor
(
*
m_testRoot
,
*
m_testCtx
);
}
else
if
(
runMode
==
RUNMODE_DUMP_STDOUT_CASELIST
)
{
writeCaselistsToStdout
(
*
m_testRoot
,
*
m_testCtx
);
}
else
if
(
runMode
==
RUNMODE_DUMP_XML_CASELIST
)
{
writeXmlCaselistsToFiles
(
*
m_testRoot
,
*
m_testCtx
,
cmdLine
);
}
else
if
(
runMode
==
RUNMODE_DUMP_TEXT_CASELIST
)
{
writeTxtCaselistsToFiles
(
*
m_testRoot
,
*
m_testCtx
,
cmdLine
);
}
else
if
(
runMode
==
RUNMODE_VERIFY_AMBER_COHERENCY
)
{
verifyAmberCapabilityCoherency
(
*
m_testRoot
,
*
m_testCtx
);
}
else
{
DE_ASSERT
(
false
);
};
}
}
catch
(
const
std
::
exception
&
e
)
{
cleanup
();
die
(
"Failed to initialize dEQP: %s"
,
e
.
what
());
};
}
}
ActsApp
::~
ActsApp
(
void
)
{
ActsApp
::~
ActsApp
(
void
)
{
cleanup
();
}
}
void
ActsApp
::
cleanup
(
void
)
{
void
ActsApp
::
cleanup
(
void
)
{
delete
m_testExecutor
;
delete
m_testRoot
;
delete
m_testCtx
;
m_testExecutor
=
DE_NULL
m_testRoot
=
DE_NULL
m_testCtx
=
DE_NULL
m_testExecutor
=
DE_NULL
;
m_testRoot
=
DE_NULL
;
m_testCtx
=
DE_NULL
;
if
(
m_crashHandler
)
{
qpCrashHandler_destroy
(
m_crashHandler
);
};
}
if
(
m_watchDog
)
{
qpWatchDog_destroy
(
m_watchDog
);
};
}
}
/*--------------------------------------------------------------------****!
/*
* \brief Step forward test execution
* \return true if application should call iterate() again and false
* if test execution session is complete.
****--------------------------------------------------------------------
*/
bool
ActsApp
::
iterate
(
void
)
{
*/
bool
ActsApp
::
iterate
(
void
)
{
if
(
!
m_testExecutor
)
{
DE_ASSERT
(
m_testCtx
->
getCommandLine
().
getRunMode
()
!=
RUNMODE_EXECUTE
);
return
false
;
};
}
// Poll platform events
const
bool
platformOk
=
m_platform
.
processEvents
();
...
...
@@ -205,14 +116,26 @@ namespace tcu {
testExecOk
=
m_testExecutor
->
iterate
();
}
catch
(
const
std
::
exception
&
e
)
{
die
(
"%s"
,
e
.
what
());
};
};
}
}
return
platformOk
&&
testExecOk
;
}
}
const
TestRunStatus
&
ActsApp
::
getResult
(
void
)
const
{
const
TestRunStatus
&
ActsApp
::
getResult
(
void
)
const
{
return
m_testExecutor
->
getStatus
();
}
void
ActsApp
::
onWatchdogTimeout
(
qpTimeoutReason
reason
)
{
if
(
!
m_crashLock
.
tryLock
()
||
m_crashed
)
{
return
;
// In crash handler already.
}
m_crashed
=
true
;
m_testCtx
->
getLog
().
terminateCase
(
QP_TEST_RESULT_TIMEOUT
);
die
(
"Watchdog timer timeout for %s"
,
(
reason
==
QP_TIMEOUT_REASON_INTERVAL_LIMIT
?
"touch interval"
:
"total time"
));
}
}
// tcu
graphic/vkgl/src/ActsApp.h
浏览文件 @
4a5c9411
...
...
@@ -13,39 +13,35 @@
* limitations under the License.
*/
#ifndef _A
ctsApp
_HPP
#define _A
ctsApp
_HPP
#ifndef _A
CTSAPP
_HPP
#define _A
CTSAPP
_HPP
#include "tcuDefs.hpp"
#include "qpWatchDog.h"
#include "qpCrashHandler.h"
#include "deMutex.hpp"
#include "tcuResource.hpp"
#include "tcuPlatform.hpp"
#include "tcuTestContext.hpp"
#include "tcuTestSessionExecutor.hpp"
#include "tcuTestSessionExecutor.hpp"
#include "tcuCommandLine.hpp"
#include "tcuTestLog.hpp"
#include "tcuTestPackageRoot.hpp"
#include "tcuTestSessionExecutor.hpp"
#include "tcuTestPackage.hpp"
namespace
tcu
{
enum
class
EWATCHDOG
{
enum
class
EWATCHDOG
{
WATCHDOG_TOTAL_TIME_LIMIT_SECS
=
300
,
WATCHDOG_INTERVAL_TIME_LIMIT_SECS
=
30
};
};
class
ActsApp
{
public:
ActsApp
(
Platform
&
platform
,
Archive
&
archive
,
TestLog
&
log
,
const
CommandLine
&
cmdLine
);
virtual
~
ActsApp
(
void
);
class
ActsApp
{
public:
ActsApp
(
Platform
&
platform
,
Archive
&
archive
,
TestLog
&
log
,
const
CommandLine
&
cmdLine
);
virtual
~
ActsApp
(
void
);
bool
iterate
(
void
);
bool
iterate
(
void
);
const
TestRunStatus
&
getResult
(
void
)
const
;
protected:
protected:
void
cleanup
(
void
);
void
onWatchdogTimeout
(
qpTimeoutReason
reason
);
Platform
&
m_platform
;
qpWatchDog
*
m_watchDog
;
qpCrashHandler
*
m_crashHandler
;
...
...
@@ -55,7 +51,6 @@ namespace tcu {
TestContext
*
m_testCtx
;
TestPackageRoot
*
m_testRoot
;
TestSessionExecutor
*
m_testExecutor
;
};
};
}
// tcu
#endif // _ActsApp_HPP
\ No newline at end of file
#endif // _ACTSAPP_HPP
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录