• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <gtest/gtest.h>
17 #include "secodeFuzz.h"
18 #include <iostream>
19 #include <common.h>
20 
21 using namespace std;
22 
__asan_default_options()23 const char* __asan_default_options()
24 {
25     return "halt_on_error=0:log_path=./";
26 }
27 
main(int argc,char ** argv)28 int main(int argc, char **argv)
29 {
30     testing::InitGoogleTest(&argc, argv);
31 
32     // 设置报告路径
33     DT_Set_Report_Path(const_cast<char*>("./"));
34     // 设置是否输出覆盖率sancov文件
35     DT_Set_Is_Dump_Coverage(1);
36     //设置用例单次执行多久超时,4.9版本后已经默认开启,默认600s
37     DT_Set_TimeOut_Second(600);
38     // 设置单个测试例运行时间,如果设置的运行次数没到而运行时间到了,提前结束
39     DT_Set_Running_Time_Second(TIMEOUT_SECOND);
40     // //关闭内存泄露检测
41     DT_Enable_Leak_Check(0, 0);
42     cout << DT_Get_Version() << endl;
43     return RUN_ALL_TESTS();
44 }