aboutsummaryrefslogtreecommitdiffstats
path: root/meta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest')
-rwxr-xr-xmeta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest72
1 files changed, 0 insertions, 72 deletions
diff --git a/meta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest b/meta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest
deleted file mode 100755
index 8251175..0000000
--- a/meta-patchtest/recipes-core/initscripts-patchtest/initscripts-patchtest/patchtest
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh -x
-### BEGIN INIT INFO
-# Provides: patchtest
-# Required-Start: $local_fs mountvirtfs
-# Required-Stop: $local_fs
-# Default-Start: 3 5
-# Default-Stop:
-# Short-Description: Execute patchtest and quits inmediately
-# Description: Execute patchtest (the framework to test mboxes)
-# taking as input those file mboxes located at
-# $base/mboxes folder and results are stored into
-# $base/results
-### END INIT INFO
-
-test "$VERBOSE" != no && echo "Executing patchtest..."
-
-# Set patchtest home path
-USER="patchtest"
-HOME_USER="/home/patchtest"
-
-# MP is the share directory between host and guest
-MP="$HOME_USER/share"
-test ! -d "$MP" && mkdir "$MP"
-
-mount -t 9p -o trans=virtio test_mount "$MP" -oversion=9p2000.L,posixacl,cache=loose
-
-# Define directory pathnames base on MP
-MBOXES="$MP/mboxes"
-REPO="$MP/poky"
-SUITESTART="$MP/poky/meta/lib/patchtest/tests"
-
-# make sure $MBOXES exists
-mkdir -p $MBOXES
-
-# LOCAL_REPO is where patchtest will do its job which is outside MP
-LOCAL_REPO="${HOME_USER}/poky"
-
-# Temporal workaround to avoid the "too many open files" error
-sysctl -w fs.file-max=100000
-
-if [ -d $REPO ]; then
- # Make a local copy of REPO inside patchtest home
- cp -a $REPO $HOME_USER
- chown -R $USER $LOCAL_REPO
-
- # Clean local repo
- ( cd $LOCAL_REPO; git reset --hard; git clean -fd; )
-
- ( # test each mbox individually and pipe the output to
- # $MBOX.testresult in the same directory
- MBOXLIST=$(ls $MBOXES/*.patch)
- if [ -z "$MBOXLIST" ]; then
- echo "No patches to test. Exiting..." > /dev/console
- else
- for MBOX in $MBOXLIST; do
- CMD="pt $LOCAL_REPO $MBOX $SUITESTART"
- su -l -c "$CMD" $USER 2>&1 \
- | grep --no-filename '^Testing patch\|^PASS:\|^SKIP:\|^FAIL:' \
- | awk 'NR == 1; NR > 1 {print $0 | "sort -n"}' \
- | awk '/FAIL/ && !foundfail {print ""; foundfail=1} 1' \
- | awk '/PASS/ && !foundpass {print ""; foundpass=1} 1' \
- | awk '/SKIP/ && !foundskip {print ""; foundskip=1} 1' \
- | tee $MBOX.testresult
- done
- fi
- )
-fi
-
-# Poweroff machine
-init 0
-
-: exit 0