summaryrefslogtreecommitdiffstats
path: root/apts
diff options
context:
space:
mode:
Diffstat (limited to 'apts')
-rw-r--r--[-rwxr-xr-x]apts69
1 files changed, 6 insertions, 63 deletions
diff --git a/apts b/apts
index e91ca10..da80b1a 100755..100644
--- a/apts
+++ b/apts
@@ -1,63 +1,6 @@
-#!/bin/sh
-
-# apts is a testing suite for packages on the Alpine Linux system
-# In theory, it will work on any distribution that uses the apk-tools
-# package manager
-# Author: Jeff Bilyk <jbilyk@gmail.com>
-# Version History:
-# Dec 4 2010 - Initial version
-# Dec 11 2010 - Added generic-apk test for cases where there isn't a package test file
-
-# Get file to output to
-program=$0
-
-usage() {
- echo "Usage: $program outputfile <package>"
- exit 1
-}
-
-# parse opts
-while getopts "h" opt; do
- case "$opt" in
- h) usage;;
- help) usage;;
- esac
-done
-
-OUTFILE=$1
-
-# are there any file arguments
-if [ $# -eq 0 ]; then
- echo "no outfile specified"
- usage
-fi
-
-#remove opts so that package is $@
-shift $(( $OPTIND - 1 ))
-
-# shift once more
-shift
-
-# if there aren't any args besides outfile test all packages
-if [ $# -eq 0 ];
- then totaltests=`ls ./tests/ | wc -w` && echo "All (${totaltests}) packages to be tested" && passedtests="0" && for package in `ls ./tests/`;
- do echo "Testing $package apk" && /bin/sh -e ./tests/$package $package >> "$OUTFILE" 2>&1 && echo "$package passed tests" >> "$OUTFILE" && echo "$package passed tests" && passedtests=$((passedtests + 1));
- done && echo "$passedtests of $totaltests passed" && exit 0;
-fi
-
-# If script still running, there's args, so test all specified packages
-i=1
-while [ $# -gt 0 ]; do
- echo "file number $i: $1"
- PACKAGE=$1
- # does testing file exist
- test -e ./tests/$PACKAGE
- # If no testing file exists then run generic-apk
- if [ "$?" == "1" ];
- then echo "Testing file for $PACKAGE does not exist" && /bin/sh -e ./tests/generic-apk $PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
- # if testing file exists, then keep running
- else echo "Testing $PACKAGE apk" && /bin/sh -e ./tests/$PACKAGE $PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
- fi
- i=$(( $i + 1 ))
- shift
-done
+ apk_add $@
+ soft=`cat /proc/sys/kernel/pax/softmode`
+ echo 1 > /proc/sys/kernel/pax/softmode
+ valgrind /bin/busybox &&
+ echo $soft >/proc/sys/kernel/pax/softmode
+ apk_del $@