• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14require 'logger'
15require 'fileutils'
16require 'date'
17
18require_relative 'command'
19require_relative 'definitions'
20require_relative 'test'
21require_relative 'test_case'
22require_relative 'parser'
23
24module Generator
25  LOG = Logger.new(STDOUT)
26  LOG.level = Logger::INFO
27
28  DEFINITIONS =         'definitions'
29  DEF_TEMPLATE =        'template'
30  DEF_MAIN =            'main'
31  DEF_TEMPLATE_NAME =   'name'
32
33  TESTS =                'tests'
34  TESTS_INCLUDE =        'include'
35  TEST_SKIP =            'skip'
36  TEST_ONLY =            'only'
37  TEST_NAME =            'file-name'
38
39  TEST_ISA =             'isa'
40  TEST_ISA_TITLE =       'title'
41  TEST_ISA_DESCRIPTION = 'description'
42  TEST_COMMAND_ISA =     'isa'
43  TEST_COMMAND_ISA_DESCR = 'description'
44  TEST_CMD_ISA_INSTR =   'instructions'
45
46  TEST_COMMANDS =        'commands'
47  TEST_DESCRIPTION=      'description'
48  TEST_PANDA_OPTIONS =   'panda-options'
49  TEST_RUN_OPTIONS =     'runner-options'
50  TEST_COMMAND_SKIP =    'skip'
51  TEST_COMMAND_ONLY =    'only'
52  COMMAND_FILE_NAME =    'file-name'
53  TEST_CODE_TEMPLATE =   'code-template'
54  TEST_HEADER_TEMPLATE = 'header-template'
55  TEST_CHECK_TYPE =      'check-type'
56  TEST_IGNORE =          'ignore'
57  TEST_BUG_ID =          'bugid'
58  TEST_TAGS =            'tags'
59  TEST_TEMPLATE_CASES =  'template-cases'
60  TEST_TEMPLATE_CASE_VALUES = 'values'
61  TEST_TEMPLATE_CASE_EXCLUDE_VAL = 'exclude'
62  TEST_TEMPLATE_CASE_BUGID = 'bugid'
63  TEST_TEMPLATE_CASE_IGNORE = 'ignore'
64  TEST_TEMPLATE_CASE_TAG = 'tags'
65
66  CASES =            'cases'
67  CASE_VALUES =      'values'
68  CASE_ID =          'id'
69  CASE_RUN_OPTIONS = 'runner-options'
70  CASE_CHECK_TYPE =  'case-check-type'
71  CASE_TEMPLATE =    'case-template'
72  CASE_HEADER_TEMPLATE = 'case-header-template'
73  CASE_IGNORE =      'ignore'
74  CASE_BUG_ID =      'bugid'
75  CASE_TAGS =        'tags'
76  CASE_DESCRIPTION = 'description'
77
78  TEMPLATE_CHECK_POSITIVE = 'check-positive'
79
80end
81