File: build_test.sh

package info (click to toggle)
aria2 1.37.0%2Bdebian-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 15,124 kB
  • sloc: cpp: 115,006; ansic: 9,140; makefile: 1,466; ruby: 475; python: 373; sh: 260; xml: 176
file content (69 lines) | stat: -rwxr-xr-x 1,735 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh

#exec 2>&1

BUILDDIR=/tmp/aria2buildtest

if [ ! -d "$BUILDDIR" ]; then
    mkdir "$BUILDDIR" \
	|| { echo "Failed to create directory $BUILDDIR" && exit 1; }
fi

echo -n "Starting build test "
echo "$(date)"

# build CONFIGURE_OPTS BIN_SUFFIX DESC
build()
{
    echo -n "new build() started at "
    echo "$(date)"
    echo "*** configure opts=$1"
    BIN_NAME="aria2c_$2"
    if [ -f "$BUILDDIR/$BIN_NAME" ]; then
	echo "$BIN_NAME exists, skipping"
	return
    fi
    ./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log" \
	&& cp config.log "$BUILDDIR/config.log_$2" \
	&& LANG=C make clean \
	&& LANG=C make -j2 check 2>&1 | tee "$BUILDDIR/aria2c_$2.log" \
	&& cp src/aria2c "$BUILDDIR/aria2c_$2"

    if [ -f "test/aria2c.log" ]; then
	cat "test/aria2c.log" >> "$BUILDDIR/aria2c_$2.log"
    fi
}

clear()
{
    for file in $(ls "$BUILDDIR"); do
	rm -f "$BUILDDIR/$file"
    done
}

case "$1" in
    clear)
	clear
	;;
    *)
	# Library combinations
	build "--without-libnettle --without-libgcrypt --without-openssl" \
	    "nodigest"
	build "--without-libnettle --with-libgcrypt" "libgcrypt"
	build "--without-gnutls" "openssl"
	build "--without-gnutls --without-openssl" "nossl"
	build "--without-libcares" "nocares"
	build "--without-libxml2" "expat"
	build "--without-libxml2 --without-libexpat" "noxml"
	build "--without-libz" "nozlib"
	build "--without-sqlite3" "nosqlite3"
	build "--without-libssh2" "nolibssh2"
	# Feature combinations
	build "--disable-bittorrent" "nobt"
	build "--disable-metalink" "noml"
	build "--disable-bittorrent --disable-metalink" "nobt_noml"
	build "--disable-epoll" "noepoll"
	build "--disable-epoll --without-libcares" "noepoll_nocares"
	build "--enable-libaria2" "libaria2"
	;;
esac