[packages/acpica] preparations to run tests
glen
glen at pld-linux.org
Mon Mar 23 21:53:27 CET 2015
commit d7d54e98c8108b9ab91526c80dc44e7203f56797
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Mar 23 20:53:22 2015 +0000
preparations to run tests
acpica.spec | 48 +++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 43 insertions(+), 5 deletions(-)
---
diff --git a/acpica.spec b/acpica.spec
index f414d14..ca1a6d6 100644
--- a/acpica.spec
+++ b/acpica.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with tests # build without tests
+
Summary: ACPI Component Architecture - an assembler and disassembler for DSDT tables
Summary(pl.UTF-8): ACPI CA - asembler i disasembler dla tablic DSDT
Name: acpica
@@ -46,12 +50,46 @@ tar -x --strip-components=1 -f %{SOURCE1}
%patch7 -p1
%build
-%{__make} \
- HOST=_LINUX \
- CC="%{__cc}" \
- OPT_CFLAGS="%{rpmcflags}" \
+%define makeopts \\\
+ HOST=_LINUX \\\
+ CC="%{__cc}" \\\
+ OPT_CFLAGS="%{rpmcflags}" \\\
OPT_LDFLAGS="%{rpmcflags} %{rpmldflags}"
+%{__make} %{makeopts}
+
+%if %{with tests}
+%{__make} %{makeopts} -C tests/aapits
+%{__make} %{makeopts} -C tests/aapits/asl \
+ ASL=$(pwd)/generate/unix/bin/iasl
+%{__make} %{makeopts} -C tests/templates
+
+cd tests
+
+# ASL tests
+./aslts.sh # relies on non-zero exit
+[ $? -eq 0 ] || exit 1
+
+# API tests
+cd aapits/bin
+./aapitsrun
+[ $? -eq 0 ] || exit 1
+cd ../..
+
+# misc tests
+#./run-misc-tests.sh $RPM_BUILD_ROOT%{_bindir} %{version}
+
+# Template tests
+cd templates
+if [ -f diff.log ]; then
+ if [ -s diff.log ]; then
+ # implies errors occurred
+ exit 1
+ fi
+fi
+cd ..
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
@@ -62,7 +100,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc changes.txt
+%doc changes.txt source/compiler/new_table.txt
%attr(755,root,root) %{_bindir}/acpibin
%attr(755,root,root) %{_bindir}/acpidump
%attr(755,root,root) %{_bindir}/acpiexec
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/acpica.git/commitdiff/d7d54e98c8108b9ab91526c80dc44e7203f56797
More information about the pld-cvs-commit
mailing list