• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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/**
17 * define the testcase type : TestType, Size , Level
18 */
19export const TAG: string = '[Hypium]';
20
21export const DEFAULT: byte = 0B0000;
22
23export class PrintTag {
24    static OHOS_REPORT_WORKER_STATUS: string = 'OHOS_REPORT_WORKER_STATUS';
25    static OHOS_REPORT_ALL_RESULT: string = 'OHOS_REPORT_ALL_RESULT';
26    static OHOS_REPORT_ALL_CODE: string = 'OHOS_REPORT_ALL_CODE';
27    static OHOS_REPORT_ALL_STATUS: string = 'OHOS_REPORT_ALL_STATUS';
28    static OHOS_REPORT_RESULT: string = 'OHOS_REPORT_RESULT';
29    static OHOS_REPORT_CODE: string = 'OHOS_REPORT_CODE';
30    static OHOS_REPORT_STATUS: string = 'OHOS_REPORT_STATUS';
31    static OHOS_REPORT_SUM: string = 'OHOS_REPORT_SUM';
32    static OHOS_REPORT_STATUS_CODE: string = 'OHOS_REPORT_STATUS_CODE';
33};
34
35export class TestType {
36    static FUNCTION: short = 0B1;
37    static PERFORMANCE: short = 0B1 << 1;
38    static POWER: short = 0B1 << 2;
39    static RELIABILITY: short = 0B1 << 3;
40    static SECURITY: short = 0B1 << 4;
41    static GLOBAL: short = 0B1 << 5;
42    static COMPATIBILITY: short = 0B1 << 6;
43    static USER: short = 0B1 << 7;
44    static STANDARD: short = 0B1 << 8;
45    static SAFETY: short = 0B1 << 9;
46    static RESILIENCE: short = 0B1 << 10;
47};
48
49export class Size {
50    static SMALLTEST: int = 0B1 << 16;
51    static MEDIUMTEST: int = 0B1 << 17;
52    static LARGETEST: int = 0B1 << 18;
53};
54
55export class Level {
56    static LEVEL0: int = 0B1 << 24;
57    static LEVEL1: int = 0B1 << 25;
58    static LEVEL2: int = 0B1 << 26;
59    static LEVEL3: int = 0B1 << 27;
60    static LEVEL4: int = 0B1 << 28;
61};
62
63const TESTTYPE: Map<string, int> = new Map<string, int>()
64TESTTYPE.set("function", 1)
65TESTTYPE.set("performance", 1 << 1)
66TESTTYPE.set("power", 1 << 2)
67TESTTYPE.set("reliability", 1 << 3)
68TESTTYPE.set("security", 1 << 4)
69TESTTYPE.set("global", 1 << 5)
70TESTTYPE.set("compatibility", 1 << 6)
71TESTTYPE.set("user", 1 << 7)
72TESTTYPE.set("standard", 1 << 8)
73TESTTYPE.set("safety", 1 << 9)
74TESTTYPE.set("resilience", 1 << 10)
75export TESTTYPE
76
77
78export const LEVEL: int[] = [1 << 24, 1 << 25, 1 << 26, 1 << 27, 1 << 28]
79
80const SIZE: Map<string, int> = new Map<string, int>()
81SIZE.set("small", 1 << 16)
82SIZE.set("medium", 1 << 17)
83SIZE.set("large", 1 << 18)
84export SIZE
85
86export const KEYSET: string[] = [
87    '-s class', '-s notClass', '-s suite', '-s itName',
88    '-s level', '-s testType', '-s size', '-s timeout',
89    '-s dryRun', '-s random', '-s breakOnError', '-s stress',
90    '-s coverage', '-s skipMessage', '-s runSkipped',
91    'class', 'notClass', 'suite', 'itName',
92    'level', 'testType', 'size', 'timeout', 'dryRun', 'random',
93    'breakOnError', 'stress', 'coverage', 'skipMessage', 'runSkipped'
94];
95