From f490d28e2861a14695205bfaf408629b188159b6 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Mon, 10 Jul 2023 08:40:55 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- hyphen-dumplog.patch | 17 +++++++++++++++++ tests/scripts/make_check.sh | 32 ++++++++++++++++++++++++++++++++ tests/tests.yml | 24 ++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 hyphen-dumplog.patch create mode 100755 tests/scripts/make_check.sh create mode 100644 tests/tests.yml diff --git a/hyphen-dumplog.patch b/hyphen-dumplog.patch new file mode 100644 index 0000000..4235b91 --- /dev/null +++ b/hyphen-dumplog.patch @@ -0,0 +1,17 @@ +--- tests/test.sh 2012-04-12 15:29:53.576994298 +0100 ++++ tests/test.sh 2012-04-12 15:30:06.447143498 +0100 +@@ -7,12 +7,14 @@ + if ! grep -q 'ERROR SUMMARY: 0 error' $log; then + echo "Fail in $NAME $1 checking detected by Valgrind" + echo "$log Valgrind log file moved to $TEMPDIR/badlogs" ++ cat $log + mv $log $TEMPDIR/badlogs + exit 1 + fi + if grep -q 'LEAK SUMMARY' $log; then + echo "Memory leak in $NAME $1 checking detected by Valgrind" + echo "$log Valgrind log file moved to $TEMPDIR/badlogs" ++ cat $log + mv $log $TEMPDIR/badlogs + exit 1 + fi diff --git a/tests/scripts/make_check.sh b/tests/scripts/make_check.sh new file mode 100755 index 0000000..e710587 --- /dev/null +++ b/tests/scripts/make_check.sh @@ -0,0 +1,32 @@ +#!/bin/bash +############################################################################ +#Developed for hyphen +#This script is used to check sanity for hyphen package +#Usage : ./make_check.sh +# +############################################################################ + +file_count=13 +pkg="hyphen" + +check_return_value () { + if [ $1 != 0 ] ; then + exit $1 + fi +} + +check_files_count(){ + no_of_files=`rpm -qlv $pkg | wc -l` + if [ $no_of_files == $file_count ] + then + echo "PASS" + else + echo "FAIL" + fi +} + +cd ../source +autoreconf -i +automake --foreign -Wall +./configure && make && make check +check_files_count diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..9b5c3af --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,24 @@ +--- +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-source + +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-basic + tests: + - make-check: + dir: scripts + run: bash ./make_check.sh + required_packages: + - autoconf + - automake + - libtool + - m4 + - gcc + - sed + - make