summaryrefslogtreecommitdiff
path: root/ubuntu
diff options
context:
space:
mode:
authorFu Wei <fu.wei@linaro.org>2014-09-29 18:47:13 +0800
committerFu Wei <fu.wei@linaro.org>2015-01-09 19:08:15 +0800
commitfa1becee63a5b5047c89cac29d292d6a56f81497 (patch)
treee633d3d063410a70d2cd524915115264b700e90f /ubuntu
parentb2dc6fda4e11da26e779ab184668d3fb91687840 (diff)
Move ACPI FWTS and dmidecode tests definitions to common dir
1)ubuntu/dmidecode.yaml -> common/dmidecode.yaml 2)ubuntu/fwts.yaml -> common/fwts.yaml 3)ubuntu/scripts/fwts-parser.py -> common/scripts/fwts-parser.py Reason: they are the common tests, and can be used by other OSs. Change-Id: I48755fec9a129eca573ba6fbf406c0bbf6247576
Diffstat (limited to 'ubuntu')
-rw-r--r--ubuntu/dmidecode.yaml28
-rw-r--r--ubuntu/fwts.yaml31
-rwxr-xr-xubuntu/scripts/fwts-parser.py63
3 files changed, 0 insertions, 122 deletions
diff --git a/ubuntu/dmidecode.yaml b/ubuntu/dmidecode.yaml
deleted file mode 100644
index e459a33..0000000
--- a/ubuntu/dmidecode.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-metadata:
- name: dmidecode
- format: "Lava-Test-Shell Test Definition 1.0"
- description: "DMI Decode Test"
- version: 1.0
- os:
- - ubuntu
- devices:
- - arndale
- - panda
- - beaglebone-black
- - beagle-xm
- - mx53loco
- scope:
- - functional
-
-install:
- deps:
- - dmidecode
- - grep
-run:
- steps:
- - lava-test-case kernel-space-sysfs-dmi-exist --shell ls /sys/class/dmi/
- - lava-test-case kernel-space-sysfs-dmi-id-exist --shell ls /sys/class/dmi/id
- - lava-test-case kernel-space-sysfs-bios-date --shell cat /sys/class/dmi/id/bios_date
- - lava-test-case kernel-space-sysfs-bios-vendor --shell cat /sys/class/dmi/id/bios_vendor
- - lava-test-case kernel-space-sysfs-bios-version --shell cat /sys/class/dmi/id/bios_version
- - ./common/scripts/dmidecode.sh
diff --git a/ubuntu/fwts.yaml b/ubuntu/fwts.yaml
deleted file mode 100644
index 98b4613..0000000
--- a/ubuntu/fwts.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-metadata:
- name: fwts
- format: "Lava-Test-Shell Test Definition 1.0"
- description: "Ubuntu Firmware Test Suite (fwts). The FWTS tool comprises of over fifty tests
- that are designed to exercise and test different aspects of a machine's firmware.
- More details - https://wiki.linaro.org/LEG/Engineering/test-acpi#Ubuntu_Firmware_test_suite"
- maintainer:
- - naresh.bhat@linaro.org
- os:
- - ubuntu
- scope:
- - functional
- devices:
- - panda
- - panda-es
- - arndale
- - vexpress-a9
- - vexpress-tc2
- - rtsm_fvp_base-aemv8a
-
-install:
- deps:
- - fwts
-run:
- steps:
- - lava-test-case fwts --shell fwts -a --log-filter=ALL --log-format='%owner-%field:' -w 250
- - lava-test-case-attach fwts results.log text/plain
- - ./ubuntu/scripts/fwts-parser.py results.log
-
-parse:
- pattern: "(?P<test_case_id>.*):\\s(?P<result>(pass|fail|skip)$)"
diff --git a/ubuntu/scripts/fwts-parser.py b/ubuntu/scripts/fwts-parser.py
deleted file mode 100755
index bc20133..0000000
--- a/ubuntu/scripts/fwts-parser.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-
-import re
-import sys
-
-RESULT_MAP = { 'PAS': 'pass',
- 'FAL': 'fail',
- 'SKP': 'skip',
- 'ABT': 'fail',
- 'WRN': 'fail',
- 'ERR': 'fail' }
-line = re.compile("(?P<owner>[a-z_]+)\\s*-(?P<field>[A-Z]+):(?P<content>.*)")
-header = re.compile("(?P<gowner>[a-z]+):\\s(?P<group_name>[ ()a-zA-Z-_]+)")
-result = re.compile("(?P<r>.*):\\s(?P<test_name>Test [0-9]),\\s(?P<comment>.*)")
-summary = re.compile("(?P<passed_no>[0-9]+) passed, (?P<failed_no>[0-9]+) failed, (?P<warning_no>[0-9]+) warning, (?P<aborted_no>[0-9]+) aborted, (?P<skil_no>[0-9]+) skipped, (?P<info_no>[0-9]+) info only")
-
-grouplist = {}
-
-with open(sys.argv[1], 'r') as f:
- for l in f.readlines():
- linere = line.search(l)
- if linere:
- owner = linere.group('owner')
- field = linere.group('field')
- content = linere.group('content')
- if field == 'HED':
- headerre = header.search(content)
- if headerre:
- group_name = headerre.group('group_name')
- gt = {'name': group_name, 'subtests': [], 'result': ''}
- grouplist[owner] = gt
- elif field in RESULT_MAP:
- resultre = result.search(content)
- if resultre:
- test = {'test_name': resultre.group('test_name'),
- 'result': RESULT_MAP[field],
- 'comment': resultre.group('comment')}
- grouplist[owner]['subtests'].append(test)
- else:
- if 'comment' not in grouplist[owner]:
- grouplist[owner]['comment'] = content
- grouplist[owner]['result'] = RESULT_MAP[field]
- elif field == 'SUM':
- sumre = summary.search(content)
- if sumre:
- if re.match("^0000", ''.join(sumre.groups())): # 0 passed, 0 failed, 0 warning, 0 aborted
- grouplist[owner]['result'] = 'skip'
-
-for gname, t in grouplist.iteritems():
- if len(t['subtests']) == 0:
- t_result = 'skip'
- t_comment = t['name']
- if t['result']:
- t_result = t['result']
- if 'comment' in t:
- t_comment = t['comment']
- print("%s (%s): %s" % (gname, t_comment, t_result))
- else:
- for tt in t['subtests']:
- if tt['comment']:
- print("%s %s(%s): %s" % (gname, tt['test_name'], tt['comment'], tt['result']))
- else:
- print("%s %s(%s): %s" % (gname, tt['test_name'], t['name'], tt['result']))