diff options
-rw-r--r-- | system/stressapptest/README | 8 | ||||
-rw-r--r-- | system/stressapptest/slack-desc | 19 | ||||
-rw-r--r-- | system/stressapptest/stressapptest.SlackBuild | 94 | ||||
-rw-r--r-- | system/stressapptest/stressapptest.info | 10 | ||||
-rw-r--r-- | system/stressapptest/support_i586.diff | 23 |
5 files changed, 154 insertions, 0 deletions
diff --git a/system/stressapptest/README b/system/stressapptest/README new file mode 100644 index 000000000000..1f5bfafc4f22 --- /dev/null +++ b/system/stressapptest/README @@ -0,0 +1,8 @@ +stressapptest (hardware stress test) + +Stressful Application Test (or stressapptest, its unix name) is a +memory interface test. It tries to maximize randomized traffic to +memory from processor and I/O, with the intent of creating a realistic +high load situation in order to test the existing hardware devices +in a computer. It has been used at Google for some time and now it is +available under the Apache 2.0 license. diff --git a/system/stressapptest/slack-desc b/system/stressapptest/slack-desc new file mode 100644 index 000000000000..cf9e75f4bd31 --- /dev/null +++ b/system/stressapptest/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +stressapptest: stressapptest (hardware stress test) +stressapptest: +stressapptest: Stressful Application Test (or stressapptest, its unix name) is a +stressapptest: memory interface test. It tries to maximize randomized traffic to +stressapptest: memory from processor and I/O, with the intent of creating a realistic +stressapptest: high load situation in order to test the existing hardware devices +stressapptest: in a computer. It has been used at Google for some time and now it is +stressapptest: available under the Apache 2.0 license. +stressapptest: +stressapptest: +stressapptest: diff --git a/system/stressapptest/stressapptest.SlackBuild b/system/stressapptest/stressapptest.SlackBuild new file mode 100644 index 000000000000..75805507e7f5 --- /dev/null +++ b/system/stressapptest/stressapptest.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/bash + +# Slackware build script for stressapptest + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=stressapptest +VERSION=${VERSION:-1.0.9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# The -O2 that's normally here is removed, because upstream puts -O3 +# after our supplied flags. I assume they know what they're doing. +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-march=i586 -mtune=i686" + PATCH=yes +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-fPIC" +else + SLKCFLAGS="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# This patch is based on Debian's support_i586_builds for +# stressapptest-1.0.6. Extra logic here to avoid running autoreconf if +# we don't need to (since it's slow). Allow PATCH=yes in the env for my +# own testing purposes. +if [ "${PATCH:-no}" = "yes" ]; then + patch -p1 < $CWD/support_i586.diff + autoreconf -if +fi + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 + +# There are 2 slightly different copies of the Apache license (COPYING +# and NOTICE). Not being a lawyer, I'm just going to punt and include +# them both in the doc dir. Also, MODULE_LICENSE_APACHE2 looks like it +# belongs in the doc dir, but it's 0 bytes long. *Shrug*. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING NOTICE *.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/stressapptest/stressapptest.info b/system/stressapptest/stressapptest.info new file mode 100644 index 000000000000..e0356c065280 --- /dev/null +++ b/system/stressapptest/stressapptest.info @@ -0,0 +1,10 @@ +PRGNAM="stressapptest" +VERSION="1.0.9" +HOMEPAGE="https://github.com/stressapptest/stressapptest" +DOWNLOAD="https://github.com/stressapptest/stressapptest/archive/v1.0.9/stressapptest-1.0.9.tar.gz" +MD5SUM="d3a526c174c049dd7a1068dc74a62be2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/system/stressapptest/support_i586.diff b/system/stressapptest/support_i586.diff new file mode 100644 index 000000000000..ca9d1302cd13 --- /dev/null +++ b/system/stressapptest/support_i586.diff @@ -0,0 +1,23 @@ +diff -Naur stressapptest-1.0.9/configure.ac stressapptest-1.0.9.patched/configure.ac +--- stressapptest-1.0.9/configure.ac 2018-08-09 20:01:24.000000000 -0400 ++++ stressapptest-1.0.9.patched/configure.ac 2020-06-06 13:34:23.000966542 -0400 +@@ -19,6 +19,10 @@ + AC_DEFINE([STRESSAPPTEST_CPU_X86_64],[], + [Defined if the target CPU is x86_64]) + ], ++ [*i586*], [ ++ AC_DEFINE([STRESSAPPTEST_CPU_I686],[], ++ [Defined if the target CPU is i586]) ++ ], + [*i686*], [ + AC_DEFINE([STRESSAPPTEST_CPU_I686],[], + [Defined if the target CPU is i686]) +@@ -35,7 +39,7 @@ + AC_DEFINE([STRESSAPPTEST_CPU_AARCH64],[], + [Defined if the target CPU is aarch64]) + ], +-[AC_MSG_WARN([Unsupported CPU: $host_cpu! Try x86_64, i686, powerpc, armv7a, or aarch64])] ++[AC_MSG_WARN([Unsupported CPU: $host_cpu! Try x86_64, i586, i686, powerpc, armv7a, or aarch64])] + ) + + ## The following allows like systems to share settings. This is not meant to |