Add a CI test to see if tables created by acpidump can be read by acpixtract
Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
parent
1e3222cefe
commit
969efe7e84
3
tests/acpixtract/PURPOSE
Normal file
3
tests/acpixtract/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of tests/acpixtract
|
||||
Description: sanity check that ACPI tables created by acpidump can be read
|
||||
Author: Al Stone <ahs3@redhat.com>
|
39
tests/acpixtract/runtest.sh
Executable file
39
tests/acpixtract/runtest.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# simple script to run acpixtract and verify we got
|
||||
# some output.
|
||||
#
|
||||
|
||||
PWD=$(pwd)
|
||||
BINDIR="/usr/bin"
|
||||
|
||||
# see if acpidump runs
|
||||
rm -f /tmp/acpi.tables
|
||||
$BINDIR/acpidump -o /tmp/acpi.tables 2>&1
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ]
|
||||
then
|
||||
echo FAIL acpixtract-dump
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
RET=2
|
||||
sz=$(ls -s /tmp/acpi.tables | cut -d' ' -f1)
|
||||
[[ $sz -gt 0 ]] && RET=0
|
||||
if [ $RET -ne 0 ]
|
||||
then
|
||||
echo FAIL acpixtract-size
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
# see if acpixtract runs
|
||||
$BINDIR/acpixtract -a /tmp/acpi.tables 2>&1
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ]
|
||||
then
|
||||
echo FAIL acpixtract-read
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
echo PASS acpixtract
|
||||
exit $RET
|
26
tests/test_acpixtract.yml
Normal file
26
tests/test_acpixtract.yml
Normal file
@ -0,0 +1,26 @@
|
||||
- hosts: localhost
|
||||
vars:
|
||||
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tests:
|
||||
- acpixtract
|
||||
required_packages:
|
||||
- acpica-tools
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: acpixtract
|
||||
block:
|
||||
- name: run acpixtract
|
||||
shell: exec > /tmp/acpixtract.test.log 2>&1 && ./acpixtract/runtest.sh
|
||||
|
||||
always:
|
||||
- name: pull out results
|
||||
fetch:
|
||||
dest: "{{ artifacts }}/"
|
||||
src: "{{ item }}"
|
||||
flat: yes
|
||||
with_items:
|
||||
- /tmp/acpixtract.test.log
|
Loading…
Reference in New Issue
Block a user