Commit 9d314ff8 authored by Yong Cong Sin's avatar Yong Cong Sin Committed by Anas Nashif
Browse files

twister: implement `simulation_exclude` filter



This gives us the flexibility to exclude certain platforms'
simulator that's known to fail from running in Twister, but
allows real hardware to be tested.

Signed-off-by: default avatarYong Cong Sin <ycsin@meta.com>
parent 1b16d3d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ class TwisterConfigParser:
                       "platform_exclude": {"type": "set"},
                       "platform_allow": {"type": "set"},
                       "platform_key": {"type": "list", "default": []},
                       "simulation_exclude": {"type": "list", "default": []},
                       "toolchain_exclude": {"type": "set"},
                       "toolchain_allow": {"type": "set"},
                       "filter": {"type": "str"},
+2 −1
Original line number Diff line number Diff line
@@ -219,7 +219,8 @@ class TestInstance:

        target_ready = bool(self.testsuite.type == "unit" or \
                        self.platform.type == "native" or \
                        self.platform.simulation in SUPPORTED_SIMS or \
                        (self.platform.simulation in SUPPORTED_SIMS and \
                         self.platform.simulation not in self.testsuite.simulation_exclude) or \
                        filter == 'runnable')

        # check if test is runnable in pytest
+36 −0
Original line number Diff line number Diff line
@@ -157,6 +157,24 @@ mapping:
        required: false
        sequence:
          - type: str
      "simulation_exclude":
        type: seq
        required: false
        sequence:
          - type: str
            enum:
              [
                "qemu",
                "simics",
                "xt-sim",
                "renode",
                "nsim",
                "mdb-nsim",
                "tsim",
                "armfvp",
                "native",
                "custom",
              ]
      "tags":
        type: any
        required: false
@@ -356,6 +374,24 @@ mapping:
            matching: "all"
            sequence:
              - type: str
          "simulation_exclude":
            type: seq
            required: false
            sequence:
              - type: str
                enum:
                  [
                    "qemu",
                    "simics",
                    "xt-sim",
                    "renode",
                    "nsim",
                    "mdb-nsim",
                    "tsim",
                    "armfvp",
                    "native",
                    "custom",
                  ]
          "tags":
            type: any
            required: false
+3 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ pairs:
  platform_exclude: <list of platforms>
    Set of platforms that this test case should not run on.

  simulation_exclude: <list of simulators>
    Set of simulators that this test case should not run on.

  extra_sections: <list of extra binary sections>
    When computing sizes, twister will report errors if it finds
    extra, unexpected sections in the Zephyr binary unless they are named