import sources

This commit is contained in:
Adam Samalik 2023-06-21 14:44:16 +02:00
parent f6a7e818c4
commit 798c6881cf
4 changed files with 93 additions and 1 deletions

6
.gitignore vendored
View File

@ -1,2 +1,6 @@
SOURCES/bogofilter-1.2.5.tar.xz
bogofilter-1.2.0.tar.gz
bogofilter-1.2.2.tar.gz
/bogofilter-1.2.3.tar.gz
/bogofilter-1.2.3.repack.tar.gz
/bogofilter-1.2.4.repack.tar.gz
/bogofilter-1.2.5.tar.xz

49
tests/builtin-tests.patch Normal file
View File

@ -0,0 +1,49 @@
diff -up bogofilter-1.2.4/src/tests/t.bogoutil.orig bogofilter-1.2.4/src/tests/t.bogoutil
--- bogofilter-1.2.4/src/tests/t.bogoutil.orig 2013-06-29 16:52:45.000000000 +0200
+++ bogofilter-1.2.4/src/tests/t.bogoutil 2020-02-10 11:24:34.754000000 +0100
@@ -78,7 +78,7 @@ if [ $DB_TYPE = db ] ; then
fi
#test with wordlist in current directory
-BOGOUTIL="$VAL`pwd`/${relpath}/bogoutil$EXE_EXT"
+#BOGOUTIL="$VAL`pwd`/${relpath}/bogoutil$EXE_EXT"
WORDLIST="wordlist.${DB_EXT}"
OPC=$PRINTCORE
case $srcdir in
diff -up bogofilter-1.2.4/src/tests/t.config.orig bogofilter-1.2.4/src/tests/t.config
--- bogofilter-1.2.4/src/tests/t.config.orig 2020-02-10 11:20:55.340000000 +0100
+++ bogofilter-1.2.4/src/tests/t.config 2020-02-10 11:21:00.668000000 +0100
@@ -3,3 +3,4 @@ DB_EXT=".db"
DB_TYPE="db"
USE_TRANSACTIONS=""
USE_UNICODE=""
+USE_PREFIX=/usr/bin
diff -up bogofilter-1.2.4/src/tests/t.frame.orig bogofilter-1.2.4/src/tests/t.frame
--- bogofilter-1.2.4/src/tests/t.frame.orig 2020-02-10 11:20:47.446000000 +0100
+++ bogofilter-1.2.4/src/tests/t.frame 2020-02-10 11:21:00.671000000 +0100
@@ -15,7 +15,7 @@ set -e
fi
: ${srcdir=.}
-: ${relpath=..}
+: ${relpath=}
: ${BF_TESTDIR=.}
# suck in EXE_EXT and DB_TYPE, export the latter.
@@ -24,11 +24,11 @@ export DB_TYPE
DB_EXT=${DB_EXT#.}
export DB_EXT
-BOGOFILTER="$VAL${relpath}/bogofilter$EXE_EXT"
-BOGOLEXER="$VAL${relpath}/bogolexer$EXE_EXT"
-BOGOTUNE="$VAL${relpath}/bogotune$EXE_EXT"
-BOGOUTIL="$VAL${relpath}/bogoutil$EXE_EXT"
-BF_COMPACT="${relpath}/bf_compact"
+BOGOFILTER="${USE_PREFIX}/bogofilter$EXE_EXT"
+BOGOLEXER="${USE_PREFIX}/bogolexer$EXE_EXT"
+BOGOTUNE="${USE_PREFIX}/bogotune$EXE_EXT"
+BOGOUTIL="${USE_PREFIX}/bogoutil$EXE_EXT"
+BF_COMPACT="${USE_PREFIX}/bf_compact"
export BOGOFILTER
export BOGOLEXER

16
tests/builtin.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
# without this, when OpenShift has LC_CTYPE=C.UTF-8, some tests fail
export LC_CTYPE=''
cd source/ && \
./configure --disable-rpath --prefix=/tmp/bogofilter && \
make && \
cd src/tests/ && \
make check && \
cd ../../ && \
patch -p1 <../builtin-tests.patch && \
cd src/ && \
rm ./bogo*.o ./bf*.o bogofilter bogolexer bogotune bogoupgrade bogoutil && \
cd tests/ && \
make check-TESTS

23
tests/tests.yml Normal file
View File

@ -0,0 +1,23 @@
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- atomic
- classic
required_packages:
- bogofilter
- flex
- gcc
- gsl-devel
- libdb-devel
- make
- perl-generators
- xmlto
tests:
- builtin:
dir: .
run: ./builtin.sh