blob: b9712746035828254398955af4dfb51a6ae79f9d (
plain)
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
70
71
72
73
74
|
#!/bin/bash
# Important: This script is run under QEMU
set -e
# Build-depends needed to build the test suites, they'll be removed later
BUILD_DEPS="\
build-essential \
ca-certificates \
git \
autoconf \
autogen \
automake \
autopoint \
gettext \
libglib2.0-dev \
libtool \
"
apt-get install --no-install-recommends -y ${BUILD_DEPS}
BUILDFILE=/test_suites.json
echo '{ "tests_suites": [' >> $BUILDFILE
# Build v4l2
########################################################################
mkdir -p /tmp/tests/v4l2-compliance && cd /tmp/tests/v4l2-compliance
git clone --depth=1 git://linuxtv.org/v4l-utils.git .
echo ' {"name": "v4l2-compliance", "git_url": "git://linuxtv.org/v4l-utils.git", "git_commit": ' \"`git rev-parse HEAD`\" '}' >> $BUILDFILE
sh bootstrap.sh
./configure --prefix=/tmp/tests/v4l2/usr/ --with-udevdir=/tmp/tests/v4l2/usr/lib/udev
make V=1
make V=1 install
strip /tmp/tests/v4l2/usr/bin/* /tmp/tests/v4l2/usr/lib/*.so* /tmp/tests/v4l2/usr/lib/libv4l/*.so*
# Copy files in the image
rm -rf /tmp/tests/v4l2/usr/include /tmp/tests/v4l2/usr/share /tmp/tests/v4l2/usr/lib/udev /tmp/tests/v4l2/usr/lib/pkgconfig/
cp -a /tmp/tests/v4l2/usr/* /usr/
echo ' ]}' >> $BUILDFILE
# Build v4l2-get-device
########################################################################
echo "Building v4l2-get-device"
dir="/tmp/tests/v4l2-get-device"
url="https://gitlab.collabora.com/gtucker/v4l2-get-device.git"
mkdir -p "$dir" && cd "$dir"
git clone --depth=1 "$url" .
make
strip v4l2-get-device
make install
########################################################################
# Cleanup: remove files and packages we don't want in the images #
########################################################################
cd /tmp
rm -rf /tmp/tests
apt-get remove --purge -y ${BUILD_DEPS}
apt-get remove --purge -y perl-modules-5.28
apt-get autoremove --purge -y
apt-get clean
# re-add some stuff that is removed by accident
apt-get install -y initramfs-tools
|