metadata:
  name: apparmor-chaiwala-system
  format: "Apertis Test Definition 1.0"
  image-type: target
  image-arch: any
  type: functional
  exec-type: automated
  priority: high
  maintainer: "Apertis Project"
  description: "Test that AppArmor's system wide rules works according to Apertis
                security goals (Chaiwala was an older codename for Apertis)."

  expected:
    - "The run-test.sh script should return 0. The return value indicates the
       number of tests which failed. A similar output will be shown:"
    - |
        >Files retained in: /tmp/apparmor-chaiwala-system-gKUGXfrDVm-hFuzCE
        /home/user/apparmor-chaiwala-system-master/goals/exec.sh: PASSED - /tmp/apparmor-chaiwala-system-gKUGXfrDVm-hFuzCE
        Files retained in: /tmp/apparmor-chaiwala-system-ThPLvpkUnz-UZABGW
        /home/user/apparmor-chaiwala-system-master/goals/home.sh: PASSED - /tmp/apparmor-chaiwala-system-ThPLvpkUnz-UZABGW

  notes:
    - "This tests only check that system wide rules (not components ones) are
       correctly implemented."

install:
  git-repos:
    - url: https://gitlab.apertis.org/tests/apparmor-chaiwala-system.git
      branch: master

run:
  steps:
    - "# Enter test directory:"
    - cd apparmor-chaiwala-system
    - "# Execute the following command:"
    - common/run-test-in-systemd --timeout=90 --basename ./run-test.sh

parse:
  fixupdict:
    FAILED: fail
    PASSED: pass
    SKIP: skip
  pattern: ^(?P<test_case_id>.+)\:\s(?P<result>PASS|pass|FAIL|fail|SKIP|skip|UNKNOWN|unknown)\s-
