metadata:
  name: sdk-debug-tools-valgrind
  format: "Apertis Test Definition 1.0"
  image-type: SDK
  image-arch: amd64
  type: functional
  exec-type: automated
  priority: medium
  maintainer: "Apertis Project"
  description: "Checks basic valgrind functionality by running a program with and
                without memory leaks, ensuring expected results from valgrind."

  expected:
    - "The test script will output a line with the test ID and the status of the
       test (PASSED or FAILED). An example output is:"
    - |
        >sdk-debug-tools-valgrind: PASSED

install:
  deps:
    - bash
    - apertis-tests
  git-repos:
    - url: https://gitlab.apertis.org/infrastructure/apertis-tests.git
      branch: master

run:
  steps:
    - "# Enter test directory:"
    - cd apertis-tests
    - "# Execute the following command:"
    - common/run-test-in-systemd --basename --user=user -- /usr/share/chaiwala-tests/sdk/automated/test-valgrind.sh

parse:
  fixupdict:
    FAILED: fail
    PASSED: pass
    FAIL: fail
    PASS: pass
    SKIP: skip
    UNKNOWN: unknown
  pattern: '^(?P<test_case_id>[a-zA-Z0-9_\-\./]+):\s*(?P<result>PASSED|PASS|pass|FAILED|FAIL|fail|SKIP|skip|UNKNOWN|unknown)$'