summaryrefslogtreecommitdiff
path: root/src/plugins/mcusupport/test/errors_json.h
blob: c3360dae2ce54b92b7469960bb54bb6418556c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

constexpr auto errors_json = R"(
{
    "compatVersion": "1",
    "qulVersion": "2.0.0",
    "boardSdk": {
        "cmakeEntries": [
            {
                "id": "NXP_SDK_DIR",
                "cmakeVar": "QUL_BOARD_SDK_DIR",
                "label": "This package has no label",
                "optional": false,
                "type": "path",
                "versions": ["2.10.0"]
            }
            {
                "id": "NXP_SDK_DIR",
                "cmakeVar": "QUL_BOARD_SDK_DIR",
                "label": "",
                "label": "This package has empty label",
                "optional": false,
                "type": "path",
                "versions": ["2.10.0"]
            }
         ],
         "envVar": "EVK_MIMXRT1064_SDK_PATH",
         "versions": ["2.10.0"]
    }
}
)";

constexpr auto unpaired_square_bracket_json = R"(
{
    "compatVersion": "1",
    "qulVersion": "2.0.0",
    "toolchain": {
      "id": "greenhills",
      "versions": [
        "2018.1.5"
      ],
      "compiler": {
          "label": "Green Hills Compiler",
          "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
          "setting": "GHSToolchain",
          "label": "IAR ARM Compiler",
          "type": "path",
          "optional": false
      },
      "file": {
          "cmakeVar": "CMAKE_TOOLCHAIN_FILE",
          "type": "file",
          "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/ghs.cmake",
          "visible": false,
          "optional": false
        }
      ]
    },
}
)";

constexpr auto mulitple_toolchain_versions = R"(
{
  "compatVersion": "1",
  "qulVersion": "2.0.0",
  "platform": {
    "id": "id",
    "vendor": "ST",
    "colorDepths": [
      32
    ],
    "cmakeEntries": [
      {
        "label": "Qt for MCUs SDK",
        "type": "path",
        "setting": "QtForMCUsSdk",
        "cmakeVar": "Qul_ROOT",
        "envVar": "Qul_DIR",
        "optional": false,
        "versionDetection": {
          "filePattern": "bin/qmltocpp"
        }
      },
      {
        "id": "STM32CubeProgrammer_PATH",
        "label": "STM32CubeProgrammer",
        "type": "path",
        "setting": "Stm32CubeProgrammer",
        "defaultValue": {
          "windows": "%{Env:PROGRAMFILES}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/",
          "linux": "%{Env:HOME}/STMicroelectronics/STM32Cube/STM32CubeProgrammer/"
        },
        "optional": false
      }
    ]
  },
  "toolchain": {
    "id": "greenhills",
    "versions": [
      "2018.1.5",
      "123"
    ],
    "compiler": {
      "label": "IAR ARM Compiler",
      "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR",
      "setting": "GHSToolchain",
      "type": "path",
      "optional": false
    },
    "file": {
      "cmakeVar": "CMAKE_TOOLCHAIN_FILE",
      "type": "file",
      "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/ghs.cmake",
      "visible": false,
      "optional": false
    }
  }
}
)";