diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:19:54 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:19:54 +0200 |
commit | c158582c0fc7f4bd73980fe9adad446855f4d61b (patch) | |
tree | 31b701a2367cb983e76e76cd7c2ba176ad33e5ac /recipes-append | |
download | meta-vt-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-append')
-rw-r--r-- | recipes-append/busybox/busybox_1.22.1.bbappend | 3 | ||||
-rw-r--r-- | recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch | 60 | ||||
-rw-r--r-- | recipes-append/libxml/libxml2_2.9.1.bbappend | 26 | ||||
-rw-r--r-- | recipes-append/netperf/netperf_2.6.0.bbappend | 4 | ||||
-rw-r--r-- | recipes-append/qemu/qemu_1.7.0.bbappend | 6 | ||||
-rwxr-xr-x | recipes-append/systest-runner/files/tests/virt-test | 247 | ||||
-rw-r--r-- | recipes-append/systest-runner/systest-runner.bbappend | 12 |
7 files changed, 358 insertions, 0 deletions
diff --git a/recipes-append/busybox/busybox_1.22.1.bbappend b/recipes-append/busybox/busybox_1.22.1.bbappend new file mode 100644 index 0000000..edabf7e --- /dev/null +++ b/recipes-append/busybox/busybox_1.22.1.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | do_prepare_config_append () { | ||
2 | sed -i -e 's/# CONFIG_CHPASSWD is not set/CONFIG_CHPASSWD=y/' .config | ||
3 | } | ||
diff --git a/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch b/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch new file mode 100644 index 0000000..174be5f --- /dev/null +++ b/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From df85edda5f6632f12f5802173a5012a35b19ccdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonas Eriksson <jonas.eriksson@enea.com> | ||
3 | Date: Thu, 6 Mar 2014 08:22:23 +0100 | ||
4 | Subject: [PATCH] configure: Add --with-python-install-dir | ||
5 | |||
6 | Cross-compiling the python bindings is a bit difficult today, as the | ||
7 | configure script will figure out the site packages dir | ||
8 | (PYTHON_SITE_PACKAGES) by either: | ||
9 | |||
10 | - Generating the path to the site-package target directories using | ||
11 | libdir, and see if it exists. As it is not possible to point to the | ||
12 | full path of the sysroot, since that will yield the wrong install | ||
13 | path, and that the directory does not neccessarily exist on the host, | ||
14 | this approach will not work. | ||
15 | |||
16 | - Fetch the site packages dir from the python interpreter as pointed to | ||
17 | by --with-python. Since this python interpreter will point to the | ||
18 | sysroot, the install dir generated will be inside the sysroot and thus | ||
19 | not work. | ||
20 | |||
21 | This patch approaches the problem by adding the possibility of | ||
22 | explicitly stating the install dir of the python packages, leaving it up | ||
23 | to the cross-compilation environment to specify it. The patch does not | ||
24 | affect the default case (non-cross compilation). | ||
25 | |||
26 | Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com> | ||
27 | |||
28 | Upstream-Status: Submitted [xml@gnome.org] | ||
29 | --- | ||
30 | configure.in | 7 +++++++ | ||
31 | 1 file changed, 7 insertions(+) | ||
32 | |||
33 | diff --git a/configure.in b/configure.in | ||
34 | index ecaa403..21ad1e7 100644 | ||
35 | --- a/configure.in | ||
36 | +++ b/configure.in | ||
37 | @@ -148,6 +148,9 @@ AC_ARG_WITH(push, | ||
38 | [ --with-push add the PUSH parser interfaces (on)]) | ||
39 | AC_ARG_WITH(python, | ||
40 | [ --with-python[[=DIR]] build Python bindings if found]) | ||
41 | +AC_ARG_WITH(python_install_dir, | ||
42 | +[ --with-python-install-dir=DIR | ||
43 | + install Python bindings in DIR]) | ||
44 | AC_ARG_WITH(reader, | ||
45 | [ --with-reader add the xmlReader parsing interface (on)]) | ||
46 | AC_ARG_WITH(readline, | ||
47 | @@ -866,6 +869,10 @@ if test "$with_python" != "no" ; then | ||
48 | fi | ||
49 | fi | ||
50 | fi | ||
51 | + if test "$with_python_install_dir" != "" | ||
52 | + then | ||
53 | + PYTHON_SITE_PACKAGES="$with_python_install_dir" | ||
54 | + fi | ||
55 | if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" | ||
56 | then | ||
57 | if test -d $libdir/python$PYTHON_VERSION/site-packages | ||
58 | -- | ||
59 | 1.9.0 | ||
60 | |||
diff --git a/recipes-append/libxml/libxml2_2.9.1.bbappend b/recipes-append/libxml/libxml2_2.9.1.bbappend new file mode 100644 index 0000000..98745d8 --- /dev/null +++ b/recipes-append/libxml/libxml2_2.9.1.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI += "file://configure-Add-with-python-install-dir.patch" | ||
4 | |||
5 | PACKAGES += "${PN}-python ${PN}-python-staticdev ${PN}-python-dbg" | ||
6 | |||
7 | DEPENDS += "python-dev" | ||
8 | |||
9 | FILES_${PN}-python = " \ | ||
10 | ${PYTHON_SITEPACKAGES_DIR}/libxml2mod.so \ | ||
11 | ${PYTHON_SITEPACKAGES_DIR}/drv_libxml2.py \ | ||
12 | ${PYTHON_SITEPACKAGES_DIR}/libxml2.py \ | ||
13 | " | ||
14 | FILES_${PN}-python-staticdev += " \ | ||
15 | ${PYTHON_SITEPACKAGES_DIR}/libxml2mod.a \ | ||
16 | ${PYTHON_SITEPACKAGES_DIR}/libxml2mod.la \ | ||
17 | " | ||
18 | FILES_${PN}-python-dbg += " \ | ||
19 | ${PYTHON_SITEPACKAGES_DIR}/.debug/libxml2mod.so \ | ||
20 | " | ||
21 | |||
22 | # +: --with-catalog, --with-python-install-dir | ||
23 | EXTRA_OECONF = "--with-python=${STAGING_BINDIR}/python --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" | ||
24 | |||
25 | # +: --with-python-install-dir | ||
26 | EXTRA_OECONF_linuxstdbase = "--with-python=${STAGING_BINDIR}/python --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} --with-debug --with-legacy --with-catalog --with-docbook --with-c14n --without-lzma" | ||
diff --git a/recipes-append/netperf/netperf_2.6.0.bbappend b/recipes-append/netperf/netperf_2.6.0.bbappend new file mode 100644 index 0000000..0115d4f --- /dev/null +++ b/recipes-append/netperf/netperf_2.6.0.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | PACKAGECONFIG ??= "sctp" | ||
2 | PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools," | ||
3 | |||
4 | RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}" | ||
diff --git a/recipes-append/qemu/qemu_1.7.0.bbappend b/recipes-append/qemu/qemu_1.7.0.bbappend new file mode 100644 index 0000000..d633a19 --- /dev/null +++ b/recipes-append/qemu/qemu_1.7.0.bbappend | |||
@@ -0,0 +1,6 @@ | |||
1 | # Fixes the DEPENDS variable to not require x11 | ||
2 | DEPENDS = "glib-2.0 zlib alsa-lib pixman dtc libsdl \ | ||
3 | ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}" | ||
4 | |||
5 | PACKAGECONFIG += "virtfs" | ||
6 | PACKAGECONFIG_class-nativesdk ??= "" | ||
diff --git a/recipes-append/systest-runner/files/tests/virt-test b/recipes-append/systest-runner/files/tests/virt-test new file mode 100755 index 0000000..500b6ef --- /dev/null +++ b/recipes-append/systest-runner/files/tests/virt-test | |||
@@ -0,0 +1,247 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | filter_output() { | ||
4 | test_name="$1" | ||
5 | debug_dir="" | ||
6 | while read row; do | ||
7 | echo "# $row" | ||
8 | # Output is colorized; remove escape characters | ||
9 | row_cleaned=`echo "$row" | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"` | ||
10 | # Transform "SETUP: PASS|FAIL" to "SETUP ($test_name): PASS|FAIL" | ||
11 | row_cleaned=`echo "$row_cleaned" | sed "s/^SETUP:/SETUP ($test_name):/"` | ||
12 | if echo "$row_cleaned" | grep -q '^[^:]*: \(PASS\|FAIL\|ERROR\)\( \[result=[^]]*\]\)\? ([0-9\.]\{1,\} s)$'; then | ||
13 | # The row is a test result | ||
14 | test_case=`echo "$row_cleaned" | grep -o '^\(SETUP\|([0-9]\{1,\}/[0-9]\{1,\})\)[^:]*' | sed 's|^([0-9]\{1,\}/[0-9]\{1,\}) ||'` | ||
15 | status=`echo "$row_cleaned" | grep -o ': \(PASS\|FAIL\|ERROR\)' | sed -e 's/^: //' -e 's/ERROR/FAIL/'` | ||
16 | echo -n "$status: $test_case" | ||
17 | # Are there any textual results to be appended? | ||
18 | keyval_file="$debug_dir/$test_case/keyval" | ||
19 | if [ -n "$debug_dir" -a -e "$keyval_file" ]; then | ||
20 | result=`grep '^result=' $keyval_file | sed 's/^result=//'` | ||
21 | if [ -n "$result" ]; then | ||
22 | echo -n " [result=$result]" | ||
23 | fi | ||
24 | fi | ||
25 | echo "" | ||
26 | elif echo "$row_cleaned" | grep -q '^DEBUG LOG: '; then | ||
27 | # The row specifies the path to the debug log: Extract the debug directory and save it | ||
28 | debug_dir=`echo "$row_cleaned" | sed -e 's,^DEBUG LOG: ,,' -e 's,/debug\.log$,,'` | ||
29 | fi | ||
30 | done | ||
31 | } | ||
32 | |||
33 | create_empty_image() { | ||
34 | IMAGE_NAME="$1" | ||
35 | COMPRESSION_TYPE="$2" | ||
36 | |||
37 | COMPRESSED_IMAGE_NAME="${IMAGE_NAME}.${COMPRESSION_TYPE}" | ||
38 | if [ -z "$COMPRESSION_TYPE" ]; then | ||
39 | COMPRESSED_IMAGE_NAME="${IMAGE_NAME}" | ||
40 | fi | ||
41 | SHA1_NAME="${COMPRESSED_IMAGE_NAME}.sha1" | ||
42 | |||
43 | pushd /opt/virt-test/shared/data/images/ &> /dev/null | ||
44 | |||
45 | rm -f "$IMAGE_NAME" "$SHA1_NAME" "$COMPRESSED_IMAGE_NAME" | ||
46 | rm -f "${IMAGE_NAME}.backup" | ||
47 | |||
48 | echo "# Creating empty image ${IMAGE_NAME}" | ||
49 | qemu-img create -f qcow2 ${IMAGE_NAME} 10M | ||
50 | case "$COMPRESSION_TYPE" in | ||
51 | bz2) | ||
52 | bzip2 -c "$IMAGE_NAME" > "$COMPRESSED_IMAGE_NAME" | ||
53 | ;; | ||
54 | gz) | ||
55 | gzip -c "$IMAGE_NAME" > "$COMPRESSED_IMAGE_NAME" | ||
56 | ;; | ||
57 | xz) | ||
58 | xz -c "$IMAGE_NAME" > "$COMPRESSED_IMAGE_NAME" | ||
59 | ;; | ||
60 | *) | ||
61 | echo "ERROR: Invalid compression type: $COMPRESSION_TYPE" | ||
62 | popd | ||
63 | exit 1 | ||
64 | ;; | ||
65 | esac | ||
66 | sha1sum "$COMPRESSED_IMAGE_NAME" > "$SHA1_NAME" | ||
67 | |||
68 | cp "$IMAGE_NAME" "${IMAGE_NAME}.backup" | ||
69 | |||
70 | echo "# Empty image $IMAGE_NAME created" | ||
71 | echo | ||
72 | |||
73 | popd &> /dev/null | ||
74 | } | ||
75 | |||
76 | get_image() { | ||
77 | URL_BASE="$1" | ||
78 | IMAGE_NAME="$2" | ||
79 | COMPRESSION_TYPE="$3" | ||
80 | |||
81 | COMPRESSED_IMAGE_NAME="${IMAGE_NAME}.${COMPRESSION_TYPE}" | ||
82 | if [ -z "$COMPRESSION_TYPE" ]; then | ||
83 | COMPRESSED_IMAGE_NAME="${IMAGE_NAME}" | ||
84 | fi | ||
85 | SHA1_NAME="${COMPRESSED_IMAGE_NAME}.sha1" | ||
86 | COMPRESSED_IMAGE_URL="${URL_BASE}/${COMPRESSED_IMAGE_NAME}" | ||
87 | SHA1_URL="${URL_BASE}/${SHA1_NAME}" | ||
88 | |||
89 | pushd /opt/virt-test/shared/data/images/ &> /dev/null | ||
90 | |||
91 | rm -f "$IMAGE_NAME" "$SHA1_NAME" "$COMPRESSED_IMAGE_NAME" | ||
92 | rm -f "${IMAGE_NAME}.backup" | ||
93 | |||
94 | echo "# Downloading $COMPRESSED_IMAGE_URL" | ||
95 | wget $COMPRESSED_IMAGE_URL | ||
96 | wget $SHA1_URL | ||
97 | |||
98 | if ! sha1sum -c "$SHA1_NAME" > /dev/null; then | ||
99 | echo "ERROR: Invalid sha1 sum!" | ||
100 | exit 1 | ||
101 | fi | ||
102 | |||
103 | echo "# Uncompressing $COMPRESSED_IMAGE_NAME -> $IMAGE_NAME" | ||
104 | case "$COMPRESSION_TYPE" in | ||
105 | bz2) | ||
106 | bunzip2 -c "$COMPRESSED_IMAGE_NAME" > "$IMAGE_NAME" | ||
107 | ;; | ||
108 | gz) | ||
109 | gunzip -c "$COMPRESSED_IMAGE_NAME" > "$IMAGE_NAME" | ||
110 | ;; | ||
111 | xz) | ||
112 | unxz -c "$COMPRESSED_IMAGE_NAME" > "$IMAGE_NAME" | ||
113 | ;; | ||
114 | "") | ||
115 | ;; | ||
116 | *) | ||
117 | echo "ERROR: Invalid compression type: $COMPRESSION_TYPE" | ||
118 | popd | ||
119 | exit 1 | ||
120 | ;; | ||
121 | esac | ||
122 | |||
123 | cp "$IMAGE_NAME" "${IMAGE_NAME}.backup" | ||
124 | |||
125 | echo "# Download of $IMAGE_NAME completed" | ||
126 | echo | ||
127 | |||
128 | popd &> /dev/null | ||
129 | } | ||
130 | |||
131 | # Verbose? | ||
132 | VERBOSE= | ||
133 | if [ "$1" = '-v' ]; then | ||
134 | VERBOSE=1 | ||
135 | set -x | ||
136 | fi | ||
137 | |||
138 | # Servers | ||
139 | NTP_SERVER=ntp.enea.se | ||
140 | |||
141 | # Architecture | ||
142 | ARCH=`uname -m` | ||
143 | |||
144 | # Needed by virt-test | ||
145 | export AUTOTEST_PATH="/opt/autotest/" | ||
146 | |||
147 | # Init LVM | ||
148 | DEST_DIR=/opt/virt-test/shared/data | ||
149 | if ! [ -e /dev/rootvg ]; then | ||
150 | vgchange -ay | ||
151 | udevadm settle # Wait for device nodes | ||
152 | fi | ||
153 | if [ -e /dev/rootvg ]; then | ||
154 | if ! [ -e /dev/rootvg/virttestdatalv ]; then | ||
155 | if ! lvcreate -L30G -n virttestdatalv /dev/rootvg; then | ||
156 | echo "ERROR: Unable to create virttestdatalv!" >&2 | ||
157 | exit 1 | ||
158 | fi | ||
159 | udevadm settle | ||
160 | if ! mkfs.ext4 /dev/rootvg/virttestdatalv; then | ||
161 | echo "ERROR: Unable to format virttestdatalv!" >&2 | ||
162 | exit 1 | ||
163 | fi | ||
164 | fi | ||
165 | |||
166 | # Mount the virttestdatalv | ||
167 | mkdir -p $DEST_DIR | ||
168 | if ! mountpoint -q $DEST_DIR; then | ||
169 | if ! mount /dev/rootvg/virttestdatalv $DEST_DIR; then | ||
170 | echo "ERROR: Unable to mount virttestdatalv!" >&2 | ||
171 | exit 1 | ||
172 | fi | ||
173 | fi | ||
174 | else | ||
175 | echo "WARNING: No rootvg volume group! Continuing anyway" >&2 | ||
176 | fi | ||
177 | ( | ||
178 | cd $DEST_DIR | ||
179 | mkdir -p gpg images isos steps_data | ||
180 | ) | ||
181 | |||
182 | # Sync the clock before starting tests, as some tests will do this, and thereby | ||
183 | # cause tests that run for a negative amount of time unless the time is synced | ||
184 | # from the very beginning | ||
185 | ntpdate $NTP_SERVER | ||
186 | |||
187 | # Download/create images, kernel, initrd | ||
188 | JEOS_VERSION="19-64" | ||
189 | ENEA_VERSION="4.0" | ||
190 | # virt-test will try to unpack the images for all architectures, even though | ||
191 | # they are not used, so always create the (empty) images. | ||
192 | create_empty_image "enea-${ENEA_VERSION}-x86_64.qcow2" "gz" | ||
193 | create_empty_image "enea-${ENEA_VERSION}-ppc.qcow2" "gz" | ||
194 | create_empty_image "enea-${ENEA_VERSION}-ppc64.qcow2" "gz" | ||
195 | if [ "$ARCH" = "x86_64" ]; then | ||
196 | #get_image "http://172.21.3.124/~jori/jeos/" "jeos-${JEOS_VERSION}.qcow2" "bz2" | ||
197 | get_image "http://172.21.3.124/~jori/enea/" "enea-${ENEA_VERSION}-${ARCH}.qcow2" "gz" | ||
198 | elif [ "$ARCH" = "ppc" -o "$ARCH" = "ppc64" ]; then | ||
199 | get_image "http://172.21.3.124/~jori/enea/" "enea-${ENEA_VERSION}-${ARCH}.uImage" "" | ||
200 | get_image "http://172.21.3.124/~jori/enea/" "enea-${ENEA_VERSION}-${ARCH}.cpio.gz" "" | ||
201 | else | ||
202 | echo "ERROR: Architecture '$ARCH' not supported" | ||
203 | exit 1 | ||
204 | fi | ||
205 | |||
206 | # Create virbr0 | ||
207 | if ! [ -e /sys/class/net/virbr0 ]; then | ||
208 | ip link add virbr0 type bridge | ||
209 | ip addr add dev virbr0 10.99.99.1/24 | ||
210 | ip link set virbr0 up | ||
211 | /etc/init.d/dnsmasq stop | ||
212 | sleep 5 | ||
213 | /etc/init.d/dnsmasq start | ||
214 | fi | ||
215 | |||
216 | # Run tests | ||
217 | cd /opt/virt-test/ | ||
218 | QEMU_BIN=`which qemu-system-$ARCH` | ||
219 | OPTS="--qemu-bin=$QEMU_BIN --qemu_sandbox=off --no-downloads" | ||
220 | if ! [ "$VERBOSE" = "" ]; then | ||
221 | OPTS="$OPTS -v" | ||
222 | fi | ||
223 | |||
224 | declare -a TEST_SUITE TEST_SUITE_EXTRAOPTS TEST_CASES | ||
225 | |||
226 | TEST_SUITE[0]="qemu" | ||
227 | TEST_SUITE_EXTRAOPTS[0]="" | ||
228 | TEST_CASES[0]="check_clock_offset.with_syscall,migrate.default.fd" | ||
229 | |||
230 | TEST_SUITE[1]="libvirt" | ||
231 | TEST_SUITE_EXTRAOPTS[1]="" | ||
232 | if [ "$ARCH" = "x86_64" ]; then | ||
233 | TEST_SUITE_EXTRAOPTS[1]="--machine-type=q35" | ||
234 | fi | ||
235 | TEST_CASES[1]="virsh.volume" | ||
236 | |||
237 | for (( i=0; i<${#TEST_SUITE[@]}; i++ )); do | ||
238 | # Update machine.cfg | ||
239 | cp /opt/virt-test/shared/cfg/machines.cfg \ | ||
240 | /opt/virt-test/backends/${TEST_SUITE[$i]}/cfg/ | ||
241 | |||
242 | # Run tests | ||
243 | echo "# Running ${TEST_SUITE[$i]} tests ${TEST_CASES[$i]}" | ||
244 | ./run $OPTS ${TEST_SUITE_EXTRAOPTS[$i]} -g Enea -t "${TEST_SUITE[$i]}" \ | ||
245 | --tests="${TEST_CASES[$i]}" --arch=$ARCH 2>&1 \ | ||
246 | | filter_output "${TEST_SUITE[$i]}" | ||
247 | done | ||
diff --git a/recipes-append/systest-runner/systest-runner.bbappend b/recipes-append/systest-runner/systest-runner.bbappend new file mode 100644 index 0000000..9c6dc67 --- /dev/null +++ b/recipes-append/systest-runner/systest-runner.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | FILESEXTRAPATHS_append := ":${THISDIR}/files" | ||
2 | |||
3 | VIRT_TEST_SRC_URI = "file://tests/virt-test" | ||
4 | SRC_URI_append_corei7-64-intel-common = "${VIRT_TEST_SRC_URI}" | ||
5 | SRC_URI_append_e500mc = "${VIRT_TEST_SRC_URI}" | ||
6 | SRC_URI_append_b4860qds-64b = "${VIRT_TEST_SRC_URI}" | ||
7 | |||
8 | VIRT_TEST_RDEPENDS = "lvm2 e2fsprogs virt-test virt-test-libvirt virt-test-qemu \ | ||
9 | ntpdate bzip2 coreutils" | ||
10 | RDEPENDS_${PN}_append_corei7-64-intel-common = "${VIRT_TEST_RDEPENDS}" | ||
11 | RDEPENDS_${PN}_append_e500mc = "${VIRT_TEST_RDEPENDS}" | ||
12 | RDEPENDS_${PN}_append_b4860qds-64b = "${VIRT_TEST_RDEPENDS}" | ||