From e0bb604104f0a0dc7656900924c6ab59bd8d3b8f Mon Sep 17 00:00:00 2001 From: Luis Araujo <luis.araujo@collabora.co.uk> Date: Mon, 19 Nov 2018 23:37:12 +0800 Subject: [PATCH] Add more ported test cases Signed-off-by: Luis Araujo <luis.araujo@collabora.co.uk> --- tc/apparmor-bluez-setup.yaml | 84 +++++++++++++++++++ tc/apparmor-geoclue.yaml | 38 +++++++++ tc/apparmor-gstreamer1.0.yaml | 34 ++++++++ tc/apparmor-ofono.yaml | 34 ++++++++ tc/apparmor-pulseaudio.yaml | 34 ++++++++ tc/apparmor-session-lockdown-no-deny.yaml | 44 ++++++++++ tc/cgroups-resource-control.yaml | 45 ++++++++++ tc/eclipse-plugins-remote-debugging.yaml | 58 +++++++++++++ tc/folks-alias-persistence.yaml | 34 ++++++++ tc/folks-eds-compatibility.yaml | 36 ++++++++ tc/folks-extended-info.yaml | 39 +++++++++ tc/folks-metacontacts-linking.yaml | 34 ++++++++ tc/folks-metacontacts-unlinking.yaml | 34 ++++++++ tc/folks-sync-only.yaml | 37 ++++++++ tc/ofono-sms-receive.yaml | 30 +++++++ tc/ofono-sms-send.yaml | 32 +++++++ ...k-code-analysis-tools-gcov-smoke-test.yaml | 40 +++++++++ ...code-analysis-tools-splint-smoke-test.yaml | 39 +++++++++ tc/sdk-dbus-tools-bustle-smoke-test.yaml | 34 ++++++++ tc/sdk-dbus-tools-d-feet-smoke-test.yaml | 25 ++++++ 20 files changed, 785 insertions(+) create mode 100644 tc/apparmor-bluez-setup.yaml create mode 100644 tc/apparmor-geoclue.yaml create mode 100644 tc/apparmor-gstreamer1.0.yaml create mode 100644 tc/apparmor-ofono.yaml create mode 100644 tc/apparmor-pulseaudio.yaml create mode 100644 tc/apparmor-session-lockdown-no-deny.yaml create mode 100644 tc/cgroups-resource-control.yaml create mode 100644 tc/eclipse-plugins-remote-debugging.yaml create mode 100644 tc/folks-alias-persistence.yaml create mode 100644 tc/folks-eds-compatibility.yaml create mode 100644 tc/folks-extended-info.yaml create mode 100644 tc/folks-metacontacts-linking.yaml create mode 100644 tc/folks-metacontacts-unlinking.yaml create mode 100644 tc/folks-sync-only.yaml create mode 100644 tc/ofono-sms-receive.yaml create mode 100644 tc/ofono-sms-send.yaml create mode 100644 tc/sdk-code-analysis-tools-gcov-smoke-test.yaml create mode 100644 tc/sdk-code-analysis-tools-splint-smoke-test.yaml create mode 100644 tc/sdk-dbus-tools-bustle-smoke-test.yaml create mode 100644 tc/sdk-dbus-tools-d-feet-smoke-test.yaml diff --git a/tc/apparmor-bluez-setup.yaml b/tc/apparmor-bluez-setup.yaml new file mode 100644 index 0000000..f056910 --- /dev/null +++ b/tc/apparmor-bluez-setup.yaml @@ -0,0 +1,84 @@ +metadata: + name: apparmor-bluez-setup + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: manual + priority: high + maintainer: "Apertis Project" + description: "Test AppArmor profiles for setting up of Bluetooth stack by + running basic tests using hciconfig. Check if the interface can + be brought up/down, can be changed of mode and can discover + devices." + + resources: + - "A Bluetooth adapter." + - "A Bluetooth device." + + macro_ostree_preconditions: bluez-setup + pre-conditions: + - "Please note that connman disables bluetooth by default on a fresh image. + If it's already enabled, connmanctl will give an \"In progress\" error that + may be ignored. To enable the device:" + - $ connmanctl enable bluetooth + + expected: + - "The output of check-setup.sh should be similar to that:" + - | + >hci0: Type: BR/EDR Bus: USB + BD Address: 00:1B:DC:06:05:D4 ACL MTU: 310:10 SCO MTU: 64:8 + UP RUNNING PSCAN + RX bytes:16617 acl:0 sco:0 events:630 errors:0 + TX bytes:7102 acl:0 sco:0 commands:629 errors:8 + Features: 0xff 0xff 0x8f 0x7e 0xd8 0x1f 0x5b 0x87 + Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 + Link policy: RSWITCH HOLD SNIFF PARK + Link mode: SLAVE ACCEPT + Name: 'sac-target-0' + Class: 0x620100 + Service Classes: Networking, Audio, Telephony + Device Class: Computer, Uncategorized + HCI Version: 4.0 (0x6) Revision: 0x2031 + LMP Version: 4.0 (0x6) Subversion: 0x2031 + Manufacturer: Cambridge Silicon Radio (10) + + Put some devices around in discoverable mode and press ENTER + + Scanning ... + 78:47:1D:B3:6E:80 jasmin-0 + Check if the devices you enabled are in the list above + - "When the TC has been run, once the log collection script finishes check + its output." + - "On Success, aa_get_complaints.sh will find no complaints:" + - | + >[...snip useless output...] + >>> Checking for apparmor complaints ... + >>> No complaints found! + - "If something goes wrong, the output will be similar to:" + - | + >[...snip useless output...] + >>> Complaints found, creating report ... + aa-dump_20180710-100931/ + aa-dump_20180710-100931/complaint_tokens.log + aa-dump_20180710-100931/audit.log + aa-dump_20180710-100931/ps_aux.log + aa-dump_20180710-100931/uname.log + aa-dump_20180710-100931/journalctl.log + aa-dump_20180710-100931/image_version + aa-dump_20180710-100931/os-release + >>> Report created as /home/chaiwala/aa-dump_20180710-100931.tar.bz2 + - "In this case file a bug report against AppArmor attaching the tar.bz2 file + created." + +run: + steps: + - "First ensure that the bluez-setup test case is passing before executing the + apparmor-bluez-setup test one (otherwise false-negative might occur):" + - $ cd $HOME/bluez-setup-master ; ./check-setup.sh + - "After verifying that the bluez-setup test is passing, open a new terminal + and run the following. Do not yet answer to the question." + - $ cd $HOME/apparmor-bluez-setup-master; ./aa_get_complaints.sh + - "Now, run the bluez-setup test case again in the previous terminal." + - $ cd $HOME/bluez-setup-master ; ./check-setup.sh + - "After the bluez-setup test ended, answer y to check for complaints." diff --git a/tc/apparmor-geoclue.yaml b/tc/apparmor-geoclue.yaml new file mode 100644 index 0000000..c4477c6 --- /dev/null +++ b/tc/apparmor-geoclue.yaml @@ -0,0 +1,38 @@ +metadata: + name: apparmor-geoclue + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Test that geoclue apparmor profiles are working properly." + + expected: + - "Both tests should report pass and not fail:" + - | + >geoclue.normal.expected: pass + geoclue.malicious.expected: pass + + notes: + - "The results of the tests printed to the standard output are enough to + determine whether they passed or fail." + - "If you get a failure and need to report a bug please run sudo watch-aa on + a terminal and run the case that is failing (separately, if both), and add + the logs you get to the bug report." + +install: + deps: + - busybox + - apertis-tests-apparmor-geoclue + +run: + steps: + - "# Execute the following commands:" + - echo -n | sudo tee /var/log/audit/audit.log + - common/run-test-in-systemd --name run-test-geoclue --timeout 90 /usr/lib/apertis-tests/apparmor/geoclue/test-geoclue + - sudo cat /var/log/audit/audit.log | aa_log_extract_tokens.pl PERMITTING REJECTING + +parse: + pattern: ^(?P<test_case_id>[\w\-\.]+):\s(?P<result>PASS|pass|FAIL|fail|SKIP|skip|UNKNOWN|unknown)$ diff --git a/tc/apparmor-gstreamer1.0.yaml b/tc/apparmor-gstreamer1.0.yaml new file mode 100644 index 0000000..6e9ae3f --- /dev/null +++ b/tc/apparmor-gstreamer1.0.yaml @@ -0,0 +1,34 @@ +metadata: + name: apparmor-gstreamer1.0 + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Test that AppArmor profiles provided in GStreamer 1.0 works + without Auditd complaining." + + macro_ostree_preconditions: apparmor-gstreamer1.0 + + expected: + - "The return value indicates the number of tests which failed and + PASSED/FAILED/SKIP will be shown on console, something like this:" + - | + > /home/user/apparmor-gstreamer1.0-master/gstreamer1.0/R1.6-gstreamer-decode.sh: PASSED - + +run: + steps: + # Use a timeout of 300s because some of the media file handling on embedded + # devices can be slow. This test is purely for AppArmor, not multimedia + # performance. + - "# Execute the following command:" + - common/run-test-in-systemd --name run-test-sh --timeout 300 --user=user ./run-test.sh + +parse: + fixupdict: + FAILED: fail + PASSED: pass + SKIP: skip + pattern: ^(?P<test_case_id>.+)\.sh:\s*(?P<result>PASS|pass|FAIL|fail|SKIP|skip|UNKNOWN|unknown)\s*- diff --git a/tc/apparmor-ofono.yaml b/tc/apparmor-ofono.yaml new file mode 100644 index 0000000..7252ab8 --- /dev/null +++ b/tc/apparmor-ofono.yaml @@ -0,0 +1,34 @@ +metadata: + name: apparmor-ofono + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test that AppArmor profiles provided in ofono package work + without unexpected auditd log entries." + + resources: + - "A 3G modem connected." + + macro_install_packages_preconditions: apertis-tests-apparmor-ofono apertis-tests + + expected: + - "A list of executed test with related result (as pass/fail/skip) will be + shown on console, similar to the following:" + - | + >ofonod-normal.expected: pass + + notes: + - "ofonod-malicous test might (and will, so far) segfault. This is normal and + does not preclude the test, which shall pass anyway. If the 3G modem is not + connected, the TC might pass (any of the tests in it), but it would be a + meaningless test. Be sure that a 3G modem is connected for a meaningful + test." + +run: + steps: + - "Execute the following command:" + - $ sudo /usr/lib/apertis-tests/apparmor/ofono/test-ofonod diff --git a/tc/apparmor-pulseaudio.yaml b/tc/apparmor-pulseaudio.yaml new file mode 100644 index 0000000..efab7e1 --- /dev/null +++ b/tc/apparmor-pulseaudio.yaml @@ -0,0 +1,34 @@ +metadata: + name: apparmor-pulseaudio + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Test that AppArmor profiles provided in PulseAudio work without + apparmor complaining." + + macro_ostree_preconditions: apparmor-pulseaudio + + expected: + - "Both tests should report pass and not fail:" + - | + >pulseaudio.normal.expected: pass + pulseaudio.malicious.expected: pass + + notes: + - "The results of the tests printed to the standard output are enough to + determine whether they passed or fail." + - "If you get a failure and need to report a bug please check journalctl, run + the test case again, and add the logs you get to the bug report." + +run: + steps: + - "# Execute the following command:" + - common/run-test-in-systemd --name run-test-sh --timeout 90 ./run-test.sh + + +parse: + pattern: ^(?P<test_case_id>[\w\-\.]+):\s(?P<result>PASS|pass|FAIL|fail|SKIP|skip|UNKNOWN|unknown)$ diff --git a/tc/apparmor-session-lockdown-no-deny.yaml b/tc/apparmor-session-lockdown-no-deny.yaml new file mode 100644 index 0000000..80bfc9f --- /dev/null +++ b/tc/apparmor-session-lockdown-no-deny.yaml @@ -0,0 +1,44 @@ +metadata: + name: apparmor-session-lockdown-no-deny + format: "Apertis Test Definition 1.0" + image-type: target + image-arch: any + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test that the session lockdown profile is not blocking more than + it should." + + macro_install_packages_preconditions: apertis-tests-apparmor-report + apparmor-utils + + expected: + - "aa-status should show at least the following processes in complain mode:" + - | + >/usr/bin/Xorg + /usr/sbin/connmand + - "And at least the following processes in enforce mode:" + - | + >/usr/bin/pulseaudio + /usr/lib/tracker/tracker-miner-fs + /usr/lib/tracker/tracker-store + /usr/sbin/ofonod + - "Note that there may be processes in other modes, such as in enforce mode, + uncontained, or complain mode. Also note that the confinement status of + profiles is irrelevant." + - "The aa_log_extract_tokens.pl command above should have no output." + +run: + steps: + - "First of all clean the auditd logs to ensure only new messages are seen:" + - $ echo -n | sudo tee /var/log/audit/audit.log + - "Then reboot the image." + - $ sudo reboot + - "Ensure pulseaudio is running:" + - $ pactl stat + - "No need to check the output of the command." + - "Now ensure AppArmor is enabled and working, by running aa-status:" + - $ sudo aa-status + - "Then ensure the audit log file has no AppArmor complaints:" + - $ sudo cat /var/log/audit/audit.log | sudo aa_log_extract_tokens.pl REJECTING diff --git a/tc/cgroups-resource-control.yaml b/tc/cgroups-resource-control.yaml new file mode 100644 index 0000000..10b6769 --- /dev/null +++ b/tc/cgroups-resource-control.yaml @@ -0,0 +1,45 @@ +metadata: + name: cgroups-resource-control + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Run cgroup resource control tests" + + macro_ostree_preconditions: cgroups-resource-control + pre-conditions: + - "If running inside VirtualBox, disable the host I/O cache under \"storage\" + in the image settings. Not doing so can cause the test_blkio_* tests to + fail." + + expected: + - "The output should be similar to that:" + - | + >>>> Test setup successfully! + >>> Running test 'test_cpu_shares' ... PASS + >>> Running test 'test_memory_limits' ... PASS + >>> Running test 'test_memory_threshold_notification' ... PASS + >>> Running test 'test_blkio_weights_random_read' ... PASS + >>> Running test 'test_blkio_weights_sequential_read' ... PASS + >>> Running test 'test_network_cgroup_priority_classification' ... PASS + >>> All tests PASSED successfully! + - "If any test failed, they will be listed instead of the success message:" + - | + >>>> The following tests FAILED: + [list of tests] + +run: + steps: + - "# Execute the following commands:" + - common/run-test-in-systemd --name=cpu-shares --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_cpu_shares + - common/run-test-in-systemd --name=memory-limits --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_memory_limits + - common/run-test-in-systemd --name=memory-threshold-notification --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_memory_threshold_notification + - common/run-test-in-systemd --name=blkio-weights-random-read --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_blkio_weights_random_read + - common/run-test-in-systemd --name=blkio-weights-seq-read --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_blkio_weights_sequential_read + - common/run-test-in-systemd --name=network-cgroup-prio-class --timeout=900 env DEBUG=2 ./cgroups-resource-control.sh test_network_cgroup_priority_classification + +parse: + pattern: ^(?P<test_case_id>[a-zA-Z0-9_\-\./]+):\s*(?P<result>pass|fail|skip|unknown)$ diff --git a/tc/eclipse-plugins-remote-debugging.yaml b/tc/eclipse-plugins-remote-debugging.yaml new file mode 100644 index 0000000..8d98571 --- /dev/null +++ b/tc/eclipse-plugins-remote-debugging.yaml @@ -0,0 +1,58 @@ +metadata: + name: eclipse-plugins-remote-debugging + format: "Apertis Test Definition 1.0" + image-type: SDK + image-arch: amd64 + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test remote debugging within Eclipse. It will create a dummy + project and then create a configuration to copy the binary file + to a remote device and debug it remotely using Eclipse." + + pre-conditions: + - "A remote device with SSH access enabled" + - "Username and password for the device" + - "Check the IP address of the device, you'll need it during configuration" + - "gdbserver must be installed in the remote device. The debugging port + (2345 by default) must be open" + - "flush the ip tables if the connection to the host fails" + + expected: + - "Remote debugging started succesfully" + - "\"Hello, World!\" shown on the Console view of Eclipse" + +run: + steps: + - "Start Eclipse" + - "On the initial workspace selection dialog, Click OK to select the + default one" + - "First, create a dummy project to test. Go to File > New > C++ Project" + - "Project Name: testDebug" + - "Project Type: Hello World C++ project" + - "Toolchains: Linux GCC" + - "Click Finish" + - "Go to Project > Build All" + - "Now create the remote debug configuration. Go to Run > Debug + configurations..." + - "In the navigation list, select C/C++ Remote Application. Click on New, or + right-click it and select New." + - "On the Main tab, fill in the fields" + - "Name: remoteDebug" + - "C/C++ Application: click on Search Project... and select testDebug" + - "Connection: click on New..." + - "Select SSH Only. Click on Next" + - "Host name: the device IP address" + - "Connection name: remote" + - "Click on Next" + - "Click on Next" + - "Click on Next" + - "Click on Finish" + - "Remote absolute path for C/C++ application: /home/user/testDebug" + - "When you are done, click on Debug" + - "It will prompt for a change to Debug perspective. Click Yes" + - "The code should show with a highlighted line, which notes the breakpoint" + - "Hit F6 to debug the next line" + - "When it reaches the Hello, world! statement, the output should show in the + Console view at the bottom" diff --git a/tc/folks-alias-persistence.yaml b/tc/folks-alias-persistence.yaml new file mode 100644 index 0000000..35fcd32 --- /dev/null +++ b/tc/folks-alias-persistence.yaml @@ -0,0 +1,34 @@ +metadata: + name: folks-alias-persistence + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Ensures user-set contact aliases persist." + + expected: + - "The script will report PASSED or FAILED." + +install: + deps: + - telepathy-ring + - telepathy-mission-control-5 + - telepathy-gabble + - libfolks-eds25 + - libfolks-telepathy25 + - folks-tools + - syncevolution + +run: + steps: + - "# Execute the following command:" + - "common/run-test-in-systemd --user=user --timeout=900 folks/folks-alias-persistence.sh" + +parse: + fixupdict: + FAILED: fail + PASSED: pass + pattern: ^(?P<test_case_id>[\w-]+):\W+(?P<result>PASSED|FAILED)$ diff --git a/tc/folks-eds-compatibility.yaml b/tc/folks-eds-compatibility.yaml new file mode 100644 index 0000000..38cb2ec --- /dev/null +++ b/tc/folks-eds-compatibility.yaml @@ -0,0 +1,36 @@ +metadata: + name: folks-eds-compatibility + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: compatibility + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Checks that contacts created within Evolution Data Server (as + will happen when phone contacts get synchronized to an Apertis + machine) show up in other contact-based programs." + + expected: + - "The script will report PASSED or FAILED." + +install: + deps: + - telepathy-ring + - telepathy-mission-control-5 + - telepathy-gabble + - libfolks-eds25 + - libfolks-telepathy25 + - folks-tools + - syncevolution + +run: + steps: + - "# Execute the following command:" + - "common/run-test-in-systemd --user=user --timeout=900 folks/folks-eds-compatibility.sh" + +parse: + fixupdict: + FAILED: fail + PASSED: pass + pattern: ^(?P<test_case_id>[\w\-\s]+):\W+(?P<result>\w+)$ diff --git a/tc/folks-extended-info.yaml b/tc/folks-extended-info.yaml new file mode 100644 index 0000000..f6e4834 --- /dev/null +++ b/tc/folks-extended-info.yaml @@ -0,0 +1,39 @@ +metadata: + name: folks-extended-info + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Support for storing arbitrary data in contacts in Folks." + + expected: + - "The output should show PASSED or FAILED, similar to this:" + - | + >folks-extended-info: PASSED + +install: + deps: + - telepathy-ring + - telepathy-mission-control-5 + - telepathy-gabble + - libfolks-eds25 + - libfolks-telepathy25 + - chaiwala-tests + +run: + steps: + - "# Execute the following command:" + - "common/run-test-in-systemd --user=user --timeout=900 folks/folks-extended-info.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)$ diff --git a/tc/folks-metacontacts-linking.yaml b/tc/folks-metacontacts-linking.yaml new file mode 100644 index 0000000..0bb5e68 --- /dev/null +++ b/tc/folks-metacontacts-linking.yaml @@ -0,0 +1,34 @@ +metadata: + name: folks-metacontacts-linking + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Ensures linking meta-contacts works properly." + + expected: + - "The script will report PASSED or FAILED." + +install: + deps: + - telepathy-ring + - telepathy-mission-control-5 + - telepathy-gabble + - libfolks-eds25 + - libfolks-telepathy25 + - folks-tools + - syncevolution + +run: + steps: + - "# Execute the following command:" + - "common/run-test-in-systemd --user=user --timeout=900 folks/folks-metacontacts-linking.sh" + +parse: + fixupdict: + FAILED: fail + PASSED: pass + pattern: ^(?P<test_case_id>[\w-]+):\W+(?P<result>PASSED|FAILED)$ diff --git a/tc/folks-metacontacts-unlinking.yaml b/tc/folks-metacontacts-unlinking.yaml new file mode 100644 index 0000000..43f8e3a --- /dev/null +++ b/tc/folks-metacontacts-unlinking.yaml @@ -0,0 +1,34 @@ +metadata: + name: folks-metacontacts-unlinking + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Ensures unlinking meta-contacts works properly." + + expected: + - "The script will report PASSED or FAILED." + +install: + deps: + - telepathy-ring + - telepathy-mission-control-5 + - telepathy-gabble + - libfolks-eds25 + - libfolks-telepathy25 + - folks-tools + - syncevolution + +run: + steps: + - "# Execute the following command:" + - "common/run-test-in-systemd --user=user --timeout=900 folks/folks-metacontacts-unlinking.sh" + +parse: + fixupdict: + FAILED: fail + PASSED: pass + pattern: ^(?P<test_case_id>[\w-]+):\W+(?P<result>PASSED|FAILED)$ diff --git a/tc/folks-sync-only.yaml b/tc/folks-sync-only.yaml new file mode 100644 index 0000000..609389c --- /dev/null +++ b/tc/folks-sync-only.yaml @@ -0,0 +1,37 @@ +metadata: + name: folks-sync-only + format: "Apertis Test Definition 1.0" + image-type: SDK + image-arch: amd64 + type: unit + exec-type: automated + priority: medium + maintainer: "Apertis Project" + description: "Test SYNCHRONIZE_ONLY flag for persona stores in Folks." + + expected: + - "The output should show PASSED or FAILED, similar to this:" + - | + >folks-extended-info: PASSED + +install: + deps: + - chaiwala-tests + - ofono-tests + - ofono-phonesim + - libfolks-ofono25 + +run: + steps: + - "# Execute the following command:" + - common/run-test-in-systemd --user=user folks/folks-sync-only.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)$' diff --git a/tc/ofono-sms-receive.yaml b/tc/ofono-sms-receive.yaml new file mode 100644 index 0000000..57b5c52 --- /dev/null +++ b/tc/ofono-sms-receive.yaml @@ -0,0 +1,30 @@ +metadata: + name: ofono-sms-receive + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test receiving SMS messages with oFono." + + resources: + - "A phone with a SIM card." + - "A modem plugged into the Apertis system with a SIM card." + + macro_install_packages_preconditions: ofono-tests + + expected: + - "A similar output should be displayed when the SMS is received:" + - | + >{MessageManager} [/phonesim] IncomingMessage any message here + ({ LocalSentTime = 2012-08-26T01:24:48-0300, SentTime = 2012-08-26T14:24:48+1000, Sender = Joao }) + +run: + steps: + - "Ensure the modem is online:" + - $ /usr/share/ofono/tests/online-modem + - "Launch oFono monitor:" + - $ /usr/share/ofono/tests/monitor-ofono + - "Send a SMS from the mobile phone to the system." diff --git a/tc/ofono-sms-send.yaml b/tc/ofono-sms-send.yaml new file mode 100644 index 0000000..5a23df8 --- /dev/null +++ b/tc/ofono-sms-send.yaml @@ -0,0 +1,32 @@ +metadata: + name: ofono-sms-send + format: "Apertis Test Definition 1.0" + image-type: any + image-arch: any + type: functional + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test sending of SMS with oFono." + + resources: + - "A phone with a SIM card." + - "A modem plugged into the Apertis system with a SIM card (SIM card should + not have a PIN configured)." + + macro_install_packages_preconditions: ofono-tests + + expected: + - "If no error appears the SMS was successfully sent." + - "The phone is supposed to receive the SMS message." + +run: + steps: + - "Let the modem connect to the network" + - $ /usr/share/ofono/tests/online-modem + - "Send a SMS to some phone:" + - $ /usr/share/ofono/tests/send-sms [modem] <phone number> <message> 1 + - "The modem parameter is the modem which we want to use to send the SMS + through, much probably we will have only one modem in the system so in + this we don't need to specify it, it is a optional parameter. If we need + to specify /usr/share/ofono/tests/list-modems to see the available modems." diff --git a/tc/sdk-code-analysis-tools-gcov-smoke-test.yaml b/tc/sdk-code-analysis-tools-gcov-smoke-test.yaml new file mode 100644 index 0000000..e29b169 --- /dev/null +++ b/tc/sdk-code-analysis-tools-gcov-smoke-test.yaml @@ -0,0 +1,40 @@ +metadata: + name: sdk-code-analysis-tools-gcov-smoke-test + 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 gcov functionality by running a sample program a few + different ways and ensuring that a sufficient portion of its code + paths are executed." + + expected: + - "The test script will output a line with the test ID and the status of the + test (PASSED or FAILED), with some additional information. An example + output is:" + - | + >sdk-code-analysis-tools-gcov-smoke-test: PASSED + Program ran in 100% of samples (>= 100% required) + +install: + deps: + - bash + - apertis-tests + +run: + steps: + - "# Execute the following command:" + - common/run-test-in-systemd --user=user --basename -- sdk/automated/test-gcov.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)$' diff --git a/tc/sdk-code-analysis-tools-splint-smoke-test.yaml b/tc/sdk-code-analysis-tools-splint-smoke-test.yaml new file mode 100644 index 0000000..fb15640 --- /dev/null +++ b/tc/sdk-code-analysis-tools-splint-smoke-test.yaml @@ -0,0 +1,39 @@ +metadata: + name: sdk-code-analysis-tools-splint-smoke-test + 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 splint functionality by checking its output when run + on a simple source file." + + expected: + - "The test script will output a line with the test ID and the status of the + test (PASSED or FAILED), with some additional information. An example + output is:" + - | + >sdk-code-analysis-tools-splint-smoke-test: PASSED + Program ran in 100% of samples (>= 100% required) + +install: + deps: + - bash + - apertis-tests + +run: + steps: + - "# Execute the following command:" + - common/run-test-in-systemd --user=user --basename -- /usr/share/chaiwala-tests/sdk/automated/test-splint.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)$' diff --git a/tc/sdk-dbus-tools-bustle-smoke-test.yaml b/tc/sdk-dbus-tools-bustle-smoke-test.yaml new file mode 100644 index 0000000..6866c2a --- /dev/null +++ b/tc/sdk-dbus-tools-bustle-smoke-test.yaml @@ -0,0 +1,34 @@ +metadata: + name: sdk-dbus-tools-bustle-smoke-test + format: "Apertis Test Definition 1.0" + image-type: SDK + image-arch: amd64 + type: performance + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test that bustle-dbus-monitor shows services on the session bus." + + macro_install_packages_preconditions: telepathy-mission-control-5 + + expected: + - "The bustle window should include a number of signals, including one + indicating that folks-inspect initiated activity in + \"org.gnome.evolution.dataserver.AddressBook<number>\"." + +run: + steps: + - "Open a terminal window and run the bustle command" + - "Click \"Record a new log\"" + - "Open a terminal window and run the folks-inspect command" + - "In Bustle's \"Logged _ messages...\" window, click Stop" + - "Run \"View > Filter visible services...\"" + - "Un-check every service but the ones named like \":1.<number>\" and + org.gnome.evolution.dataserver.AddressBook<number>" + - "There should be a line indicating \":1.<number>\" (eg, \":1.75\") + triggering /org/gnome/evolution/dataserver/AddressBookFactory's call to + org.freedesktop.DBus.Properties.GetAll" + - "Open D-Feet" + - "Run \"File > Connect to session bus\"" + - "Enter the numbered name above in the Filter box (eg, \":1.75\")" + - "Confirm that the \"Command Line\" for this bus name is \"folks-inspect\"" diff --git a/tc/sdk-dbus-tools-d-feet-smoke-test.yaml b/tc/sdk-dbus-tools-d-feet-smoke-test.yaml new file mode 100644 index 0000000..b327fc2 --- /dev/null +++ b/tc/sdk-dbus-tools-d-feet-smoke-test.yaml @@ -0,0 +1,25 @@ +metadata: + name: sdk-dbus-tools-d-feet-smoke-test + format: "Apertis Test Definition 1.0" + image-type: SDK + image-arch: amd64 + type: performance + exec-type: manual + priority: medium + maintainer: "Apertis Project" + description: "Test that D-Feet both shows services on the session bus and that + new services appear automatically." + + macro_install_packages_preconditions: telepathy-mission-control-5 + + expected: + - "The D-Feet window should now show a few services in its filtered view, + including \"org.gnome.evolution.dataserver.AddressBook4\" for the process + \"evolution-addressbook-factory\"." + +run: + steps: + - "Run D-Feet via Applications Menu > Development > D-Feet" + - "View the session bus with File > Connect to Session Bus" + - "Set the Filter field to \"evolution\" (without quotes)" + - "Open a terminal window and run the folks-inspect command" -- GitLab