summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/frequency_governors_test25
-rwxr-xr-xbin/network10
-rw-r--r--units/cpu/test-plan.pxu14
-rw-r--r--units/fingerprint/jobs.pxu148
-rw-r--r--units/fingerprint/manifest.pxu4
-rw-r--r--units/fingerprint/test-plan.pxu20
-rw-r--r--units/networking/jobs.pxu4
-rw-r--r--units/networking/test-plan.pxu1
8 files changed, 182 insertions, 44 deletions
diff --git a/bin/frequency_governors_test b/bin/frequency_governors_test
index 103f651..6072ded 100755
--- a/bin/frequency_governors_test
+++ b/bin/frequency_governors_test
@@ -23,6 +23,8 @@ class CPUScalingTest(object):
self.idaSpeedupFactor = 8.0 # percent
self.selectorExe = "cpufreq-selector"
self.ifSelectorExe = None
+ self.minFreq = None
+ self.maxFreq = None
def getCPUFreqDirectories(self):
logging.debug("Getting CPU Frequency Directories")
@@ -279,16 +281,17 @@ class CPUScalingTest(object):
logging.info("System has %u cpus" % len(self.cpufreqDirectories))
# Ensure all CPUs support the same frequencies
- freqFileName = "scaling_available_frequencies"
- self.frequencies = self.checkParameters(freqFileName)
- if not self.frequencies:
+ freqFileName = "scaling_min_freq"
+ self.minFreq = int(self.checkParameters(freqFileName)[0])
+ if not self.minFreq:
return False
-
- logging.info("Supported CPU Frequencies: ")
- for freq in self.frequencies:
- f = int(freq) / 1000
- logging.info(" %u MHz" % f)
-
+ freqFileName = "scaling_max_freq"
+ self.maxFreq = int(self.checkParameters(freqFileName)[0])
+ if not self.maxFreq:
+ return False
+ logging.info(
+ "Supported CPU Frequencies: %s - %s MHz",
+ self.minFreq / 1000, self.maxFreq / 1000)
# Check governors to verify all CPUs support the same control methods
governorFileName = "scaling_available_governors"
self.governors = self.checkParameters(governorFileName)
@@ -352,7 +355,7 @@ class CPUScalingTest(object):
success = False
# Set the the CPU speed to it's lowest value
- frequency = self.frequencies[-1]
+ frequency = self.minFreq
logging.info("Setting CPU frequency to %u MHz" % (int(frequency) / 1000))
if not self.setFrequency(frequency):
success = False
@@ -377,7 +380,7 @@ class CPUScalingTest(object):
% self.minimumFrequencyTestTime)
# Set the CPU speed to it's highest value as above.
- frequency = self.frequencies[0]
+ frequency = self.maxFreq
logging.info("Setting CPU frequency to %u MHz" % (int(frequency) / 1000))
if not self.setFrequency(frequency):
success = False
diff --git a/bin/network b/bin/network
index 5bdf1f0..fea7f72 100755
--- a/bin/network
+++ b/bin/network
@@ -252,16 +252,16 @@ class IPerfPerformanceTest(object):
cpu_load = 0
if percent < self.fail_threshold or \
cpu_load > self.cpu_load_fail_threshold:
- logging.warning("Poor network performance detected against {}".
+ logging.warning("The network test against {} failed because:".
format(self.target))
if percent < self.fail_threshold:
- logging.warning(" Transfer speed: {} Mb/s".
+ logging.error(" Transfer speed: {} Mb/s".
format(throughput))
- logging.warning(" {:03.2f}% of theoretical max {} Mb/s\n".
+ logging.error(" {:03.2f}% of theoretical max {} Mb/s\n".
format(percent, int(self.iface.max_speed)))
if cpu_load > self.cpu_load_fail_threshold:
- logging.warning(" CPU load: {}%".format(cpu_load))
- logging.warning(" CPU load is above {}% maximum\n".
+ logging.error(" CPU load: {}%".format(cpu_load))
+ logging.error(" CPU load is above {}% maximum\n".
format(self.cpu_load_fail_threshold))
return 30
diff --git a/units/cpu/test-plan.pxu b/units/cpu/test-plan.pxu
index 365531c..e5313f1 100644
--- a/units/cpu/test-plan.pxu
+++ b/units/cpu/test-plan.pxu
@@ -76,3 +76,17 @@ include:
cpu/arm_vfp_support_.*
cpu/cstates
cpu/cstates_results.log
+
+id: cpu-server
+unit: test plan
+_name: CPU Tests (Server)
+_description: CPU Tests (Server)
+include:
+ cpu/clocktest certification-status=blocker
+ cpu/frequency_governors certification-status=blocker
+ cpu/maxfreq_test certification-status=blocker
+ cpu/maxfreq_test-log-attach certification-status=non-blocker
+ cpu/topology certification-status=blocker
+ cpu/arm_vfp_support_.* certification-status=non-blocker
+ cpu/cstates certification-status=non-blocker
+ cpu/cstates_results.log certification-status=non-blocker
diff --git a/units/fingerprint/jobs.pxu b/units/fingerprint/jobs.pxu
index c7951b0..f603f72 100644
--- a/units/fingerprint/jobs.pxu
+++ b/units/fingerprint/jobs.pxu
@@ -1,32 +1,126 @@
-plugin: manual
+plugin: shell
category_id: com.canonical.plainbox::fingerprint
-id: fingerprint/login
-_description:
- PURPOSE:
- This test will verify that a fingerprint reader will work properly for logging into your system. This test case assumes that there's a testing account from which test cases are run and a personal account that the tester uses to verify the fingerprint reader
- STEPS:
- 1. Click on the User indicator on the left side of the panel (your user name).
- 2. Select "Switch User Account"
- 3. On the LightDM screen select your username.
- 4. Use the fingerprint reader to login.
- 5. Click on the user switcher applet.
- 6. Select the testing account to continue running tests.
- VERIFICATION:
- Did the authentication procedure work correctly?
+id: fingerprint/detect
+user: root
+command: fprintd-list ${SUDO_UID:-$NORMAL_USER}
+estimated_duration: 1.0
+_summary: Check if at least one fingerprint reader is detected
+imports: from com.canonical.plainbox import manifest
+requires: manifest.has_fingerprint_reader == 'True'
-plugin: manual
+plugin: user-interact
+category_id: com.canonical.plainbox::fingerprint
+id: fingerprint/enroll
+depends: fingerprint/detect
+user: root
+command:
+ set -e
+ echo 'Removing existing signatures...'
+ fprintd-delete ${SUDO_UID:-$NORMAL_USER} > /dev/null
+ sleep 3
+ fprintd-enroll ${SUDO_UID:-$NORMAL_USER}
+estimated_duration: 20.0
+_summary: Enroll a fingerprint
+_purpose:
+ Enroll the user's right index finger into the database
+_steps:
+ 1. Press Enter
+ 2. Swipe your right index finger five times (wait 3s for the Enrolling message)
+_verification:
+ The verification of this test is automated.
+imports: from com.canonical.plainbox import manifest
+requires:
+ manifest.has_fingerprint_reader == 'True'
+ package.name == 'fprintd'
+
+plugin: user-interact
+category_id: com.canonical.plainbox::fingerprint
+id: fingerprint/verify-no-match
+depends: fingerprint/enroll
+user: root
+command:
+ sleep 2
+ fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-no-match
+estimated_duration: 20.0
+_summary: Fingerprint negative match
+_purpose:
+ The verification must not match when using a wrong finger
+_steps:
+ 1. Press Enter
+ 2. Swipe an unenrolled finger on the reader
+_verification:
+ The verification of this test is automated.
+imports: from com.canonical.plainbox import manifest
+requires:
+ manifest.has_fingerprint_reader == 'True'
+ package.name == 'fprintd'
+
+plugin: user-interact
+category_id: com.canonical.plainbox::fingerprint
+id: fingerprint/verify-match
+depends: fingerprint/verify-no-match
+user: root
+command:
+ sleep 2
+ for i in {1..3}
+ do
+ fprintd-verify ${SUDO_UID:-$NORMAL_USER} | tee /dev/stderr | grep -o verify-match && break || sleep 3
+ [[ $i -eq 3 ]] && exit 1
+ echo "Attempts left: $((3-$i))"
+ done
+estimated_duration: 20.0
+_summary: Fingerprint positive match
+_purpose:
+ The verification must match when using the enrolled finger
+_steps:
+ 1. Press Enter
+ 2. Swipe your enrolled finger on the reader (3 attempts max)
+_verification:
+ The verification of this test is automated.
+imports: from com.canonical.plainbox import manifest
+requires:
+ manifest.has_fingerprint_reader == 'True'
+ package.name == 'fprintd'
+
+plugin: user-interact-verify
category_id: com.canonical.plainbox::fingerprint
id: fingerprint/unlock
-_description:
- PURPOSE:
- This test will verify that a fingerprint reader can be used to unlock a locked system.
- STEPS:
- 1. Click on the Session indicator (Cog icon on the Left side of the panel) .
- 2. Select 'Lock screen'.
- 3. Press any key or move the mouse.
- 4. A window should appear that provides the ability to unlock either typing your password or using fingerprint authentication.
- 5. Use the fingerprint reader to unlock.
- 6. Your screen should be unlocked.
- VERIFICATION:
- Did the authentication procedure work correctly?
+depends: fingerprint/verify-match
+user: root
+command:
+ python3 <<EOF
+ from evdev import UInput, ecodes as e
+ ui = UInput()
+ ui.write(e.EV_KEY, e.KEY_LEFTMETA, 1)
+ ui.write(e.EV_KEY, e.KEY_L, 1)
+ ui.write(e.EV_KEY, e.KEY_LEFTMETA, 0)
+ ui.write(e.EV_KEY, e.KEY_L, 0)
+ ui.syn()
+ ui.close()
+ EOF
+_summary: Fingerprint unlock screen
+_purpose:
+ This test will verify that a fingerprint reader can be used to unlock a locked system.
+_steps:
+ 1. Press Enter to lock the screen
+ 2. Press any key or move the mouse.
+ 3. A window should appear that provides the ability to unlock either typing your password or using fingerprint authentication.
+ 4. Use the fingerprint reader to unlock.
+ 5. Your screen should be unlocked.
+_verification:
+ Did the authentication procedure work correctly?
+imports: from com.canonical.plainbox import manifest
+requires:
+ manifest.has_fingerprint_reader == 'True'
+ package.name == 'fprintd'
+plugin: shell
+category_id: com.canonical.plainbox::fingerprint
+id: fingerprint/delete
+after: fingerprint/unlock
+user: root
+command: fprintd-delete ${SUDO_UID:-$NORMAL_USER}
+estimated_duration: 1.0
+_summary: Remove existing fingerprint signatures
+imports: from com.canonical.plainbox import manifest
+requires: manifest.has_fingerprint_reader == 'True'
diff --git a/units/fingerprint/manifest.pxu b/units/fingerprint/manifest.pxu
new file mode 100644
index 0000000..13866b8
--- /dev/null
+++ b/units/fingerprint/manifest.pxu
@@ -0,0 +1,4 @@
+unit: manifest entry
+id: has_fingerprint_reader
+_name: A fingerprint reader
+value-type: bool
diff --git a/units/fingerprint/test-plan.pxu b/units/fingerprint/test-plan.pxu
new file mode 100644
index 0000000..42ebd52
--- /dev/null
+++ b/units/fingerprint/test-plan.pxu
@@ -0,0 +1,20 @@
+id: fingerprint-full
+unit: test plan
+_name: QA tests for fingerprint reader
+_description: Fingerprint tests
+estimated_duration: 1m
+include:
+nested_part:
+ fingerprint-manual
+
+id: fingerprint-manual
+unit: test plan
+_name: Manual fingerprint tests
+_description: Manual tests for fingerprint reader
+include:
+ fingerprint/detect certification-status=non-blocker
+ fingerprint/enroll certification-status=non-blocker
+ fingerprint/verify-no-match certification-status=non-blocker
+ fingerprint/verify-match certification-status=non-blocker
+ fingerprint/unlock certification-status=non-blocker
+ fingerprint/delete certification-status=non-blocker
diff --git a/units/networking/jobs.pxu b/units/networking/jobs.pxu
index c5f5c9f..b697b84 100644
--- a/units/networking/jobs.pxu
+++ b/units/networking/jobs.pxu
@@ -80,8 +80,10 @@ _description: Try to enable a remote printer on the network and print a test pag
plugin: shell
category_id: com.canonical.plainbox::networking
+template-engine: jinja2
id: networking/predictable_names
command: network_predictable_names
_summary: Verify that all network interfaces have predictable names.
_description: Verify that all network interfaces have predictable names.
-
+requires:
+ {% if __on_ubuntucore__ %}lsb.release >= '20'{% else %}lsb.release >= '18'{% endif %}
diff --git a/units/networking/test-plan.pxu b/units/networking/test-plan.pxu
index 1abee61..f11d215 100644
--- a/units/networking/test-plan.pxu
+++ b/units/networking/test-plan.pxu
@@ -61,6 +61,7 @@ _description: Automated networking tests for devices
include:
ipv6_detect
ipv6_link_local_address_.*
+ networking/predictable_names
bootstrap_include:
device