code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/bash
rm -rf dist && mkdir dist
BASE=`basename build/*-*.*.*`
pushd build/$BASE > /dev/null
# package an xpi
echo "+ Creating dist/$BASE.xpi"
zip -9 ../../dist/$BASE.xpi install.* chrome.manifest chrome/ec2ui.jar README LICENSE
cp README LICENSE ../../dist
popd > /dev/null
pushd dist > /dev/null
#... | Shell |
#!/bin/bash
date
set -e
function get_dir_revision() {
local pkg_release
local last_rev
# Generate a release number for the entire branch
last_rev=$(hg log $1 -b default -l 1 | grep 'changeset')
changeset=${last_rev#*:}
pkg_release=${changeset%:*}
if [ -z "$pkg_release" ] ; then
pkg_r... | Shell |
#! /bin/bash
# Binary of the Texturepacker:
TEXTUREPACKER_BINARY=/usr/local/bin/TexturePacker
# Shared Spritesheet-Output-Definitions:
SPRITESHEET_OUTPUT_DIRECTORY="../assets/gfx/spritesheets/"
SPRITESHEET_OUTPUT_JAVAIDS_PACKAGE="org.anddev.andengine.examples.spritesheets"
SPRITESHEET_OUTPUT_JAVAIDS_DIRECTORY="../src... | Shell |
#!/bin/bash
base=`dirname $0`
ROBOT_SYSLOG_FILE=$base/tmp/syslog.txt python $base/src/robot/runner.py -P $base/atest/testresources/testlibs -P $base/tmp -L debug -d $base/tmp "$@"
| Shell |
#!/bin/bash
pybot --outputdir results --exclude parallel atest/ | Shell |
#!/bin/bash
cd $1
rm *.xml *html
unzip outputs.zip
command="rebot --name Robot_Framework_Acceptance_Tests --splitoutputs 1 output.xml"
echo "Executing command: " $command
$command
exit $?
| Shell |
#!/bin/bash
OUTPUTDIR=/opt/cruisecontrol/logs/robot-core
BACKUPDIR=$OUTPUTDIR/old/$(date +%Y%m%d-%H%M%S)
OUT=$OUTPUTDIR/output.txt
cd /opt/cruisecontrol/projects/robot-core
rm -rf atest/results
echo 'Running Robot Acceptance Tests' >$OUT
echo -n 'Date: ' >>$OUT
date -R >>$OUT
echo >>$OUT
echo '1) svn update' >>$OUT... | Shell |
#!/bin/bash
python src/robot/rebot.py $1 >/dev/null &
#/usr/lib/jvm/java-6-sun/jre/bin/java -Xmx1024m -Xss1024k -classpath /home/jth/opt/jython2.5.1/jython.jar: -Dpython.home=/home/jth/opt/jython2.5.1 -Dpython.executable=/home/jth/opt/jython2.5.1/jython org.python.util.jython src/robot/rebot.py $1 >/dev/null &
rebotpid... | Shell |
ROOTDIR=`dirname $0`/..
LIBPATH=$ROOTDIR/lib
SRCPATH=$ROOTDIR/src
TESTDATA=$ROOTDIR/atest/vacalc
CP=$LIBPATH/robotframework-2.5.4.1.jar:$LIBPATH/swinglibrary-1.1.1.jar:$ROOTDIR/bin/
CLASSPATH=$CP java org.robotframework.RobotFramework -P $SRCPATH -P $ROOTDIR/atest/libraries $* --outputdir $ROOTDIR/results --critical re... | Shell |
java -cp lib/robotframework-2.5.4.1.jar:bin/ -Dpython.path=src org.robotframework.vacalc.VacalcRunner
| Shell |
#!/bin/bash
#downloads the project dependencies to lib directory
wget -P lib http://robotframework.googlecode.com/files/robotframework-2.5.4.1.jar
wget -P lib http://robotframework-swinglibrary.googlecode.com/files/swinglibrary-1.1.1.jar
| Shell |
CLASSPATH=lib/robotframework-2.5.3.jar javac -d bin src/org/robotframework/vacalc/*java
| Shell |
#!/bin/sh
DIR="$( cd "$( dirname "$0" )" && pwd )"
javac -target 1.5 -source 1.5 $DIR/testlibs/*.java
if [ -n "$JYTHON_HOME" ]
then
javac -cp $JYTHON_HOME/jython.jar -target 1.5 -source 1.5 $DIR/listeners/*.java
else
echo set JYTHON_HOME to compile listeners
fi
| Shell |
#!/bin/bash
testdir=`dirname $0`
pybot --loglevel DEBUG --log none --report none --outputdir $testdir $testdir/example.txt
python $testdir/../statuschecker.py $testdir/output.xml
rebot $testdir/output.xml
echo "$? tests failed, 5 should have failed."
echo "Check that tests starting with 'FAILURE:' have failed and other... | Shell |
#!/bin/bash
dirname=robotframework-c-example
zipname=$dirname-$(date +%Y%m%d).zip
files="README.txt login.c LoginLibrary.py LoginTests.tsv Makefile"
rm -rf $dirname $zipname
mkdir $dirname
echo Copying...
for file in $files; do
cp -v $file $dirname
done
echo Zipping...
zip -r $zipname $dirname
rm -rf $dirname
ech... | Shell |
#!/bin/bash
[ -n "$1" ] && cd $1
git rev-list HEAD | sort > config.git-hash
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
if [ $LOCALVER \> 1 ] ; then
VER=`git rev-list origin/master | sort | join config.git-hash - | wc -l | awk '{print $1}'`
VER_DIFF=$(($LOCALVER-$VER))
echo "#define X265_REV $VER"
... | Shell |
#!/bin/bash
./build.sh && ./package.sh
| Shell |
#!/bin/bash
rm -rf dist && mkdir dist
BASE=`basename build/*-*.*.*`
pushd build/$BASE > /dev/null
# package an xpi
echo "+ Creating dist/$BASE.xpi"
zip -9 ../../dist/$BASE.xpi install.* chrome.manifest chrome/ec2ui.jar README LICENSE
cp README LICENSE ../../dist
popd > /dev/null
pushd dist > /dev/null
#... | Shell |
#!/bin/bash
date
set -e
function get_dir_revision() {
local pkg_release
local last_rev
# Generate a release number for the entire branch
last_rev=$(hg log $1 -b default -l 1 | grep 'changeset')
changeset=${last_rev#*:}
pkg_release=${changeset%:*}
if [ -z "$pkg_release" ] ; then
pkg_r... | Shell |
#!/bin/bash
echo "## Step 00: initialize"
(
if ! [ -d build ]; then
mkdir build
mkdir build/src
mkdir build/src/trunk
fi
)
fetch() {
(
cd src
if ! [ -f "${2}/.svn/entries" ]; then
mkdir "${2}"
cd "${2}"
svn co --non-interactive --trust-server-cert "${1}" "."
else
cd "${2}"
sv... | Shell |
#!/bin/bash
find org/jivesoftware -name '*.java' -exec sed -i 's:import org.xmlpull.mxp1.MXParser:import org.xmlpull.v1.XmlPullParserFactory:' '{}' ';'
find org/jivesoftware -name '*.java' -exec sed -i 's:new MXParser():XmlPullParserFactory.newInstance().newPullParser():g' '{}' ';'
| Shell |
#!/bin/bash
rm org/xbill/DNS/spi/DNSJavaNameServiceDescriptor.java
| Shell |
#!/bin/bash
rm -rf org/ietf/
rm -rf org/apache/harmony/auth
rm -rf org/apache/harmony/javax/security/auth/kerberos/
rm -rf org/apache/harmony/javax/security/auth/x500/
rm org/apache/harmony/javax/security/auth/Policy.java
| Shell |
#!/bin/bash
find -name '*.java' -exec sed -i 's:import org.apache.harmony.javax.security.sasl.Sasl;:import de.measite.smack.Sasl;:g' '{}' ';'
| Shell |
#!/bin/bash
find org/apache/harmony -name '*.java' -exec sed -i 's:import org.apache.harmony.auth.internal.nls.Messages;::' '{}' ';'
find org/apache/harmony -name '*.java' -exec sed -i 's:Messages.getString(\("[^"]*"\)):\1:g' '{}' ';'
| Shell |
#!/bin/bash
rm org/jivesoftware/smack/debugger/LiteDebugger.java
rm org/jivesoftware/smackx/debugger/EnhancedDebugger.java
rm org/jivesoftware/smackx/debugger/EnhancedDebuggerWindow.java
| Shell |
#!/bin/bash
mkdir -p org/apache/harmony/
mv javax org/apache/harmony/
find org/apache/harmony/ -name '*.java' -exec sed -i 's:package javax:package org.apache.harmony.javax:g' '{}' ';'
find -name '*.java' -exec sed -i 's:import javax.security.sasl:import org.apache.harmony.javax.security.sasl:g' '{}' ';'
find -name '*... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell "echo '$*' | sqlite3 -header -column /data/data/com.google.android.apps.iosched/databases/schedule.db" | Shell |
#!/bin/sh
# Sessions list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/sessions
# Vendors list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/vendors
# Session detail
#adb shell am start -a... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
MAC_UNAME="Darwin"
if [[ "`uname`" == ${MAC_UNAME} ]]; then
DATE_FORMAT="%Y-%m-%dT%H:%M:%S"
else
DATE_FORMAT="%Y-%m-%d %H:%M:%S"
fi
if [ -z "$1" ]; then
NOW_DATE=$(date "+${DATE_FORMAT}")
echo Please provide a mock time in the format \"${NOW_DATE}\" or \"d\" to del... | Shell |
#!/bin/sh
adb shell cat /data/data/com.google.android.apps.iosched/shared_prefs/com.google.android.apps.iosched_preferences.xml | xmllint --format - | Shell |
#!/bin/sh
#
# Copyright 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | Shell |
#!/bin/sh
# Remember VERBOSE only works on debug builds of the app
adb shell setprop log.tag.iosched_SyncHelper VERBOSE
adb shell setprop log.tag.iosched_SessionsHandler VERBOSE
adb shell setprop log.tag.iosched_BitmapCache VERBOSE
| Shell |
#!/bin/sh
adb shell pm clear com.google.android.apps.iosched | Shell |
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to ... | Shell |
#!/bin/bash
#!/bin/bash
if [ ! -x $ANDROID_SDK_HOME/tools/android ]; then
echo android too not found
echo did you set '$ANDROID_SDK_HOME'?
exit -1
fi
#target=android-4
#$ANDROID_SDK_HOME/tools/android update project --subprojects --target $target --path . || exit -1
# build main application
#ant clean
#ant de... | Shell |
#!/bin/sh
$THIS_SH -c '
hup() {
echo "child got HUP"
}
trap hup HUP
echo "child sleeps"
sleep 1
echo "child exits"
' &
child=$!
sleep 0.1 # let child install handler first
kill -HUP $child
wait
echo "parent exits"
| Shell |
#!/bin/sh
$THIS_SH -c '
cleanup() {
echo "child exits as expected"
exit
}
trap cleanup HUP
echo "child sleeps"
sleep 1
echo "BAD exit from child!"
' &
child=$!
sleep 0.1 # let child install handler first
kill -HUP $child
wait
echo "parent exits"
| Shell |
#!/bin/sh
trap "echo Trapped" BADNAME TERM; echo $?
kill $$
echo Ok
| Shell |
#!/bin/sh
# Must not find us alive
{ sleep 2; kill -9 $$; } 2>/dev/null &
sleep 1 &
PID=$!
# We must exit the loop in one second.
# We had bug 5304: builtins never waited for exited children
while kill -0 $PID >/dev/null 2>&1; do
true
done
echo Ok
| Shell |
#!/bin/sh
TOPDIR=$PWD
test -x ash || {
echo "No ./ash - creating a link to ../../busybox"
ln -s ../../busybox ash
}
test -x printenv || gcc -O2 -o printenv printenv.c || exit $?
test -x recho || gcc -O2 -o recho recho.c || exit $?
test -x zecho || gcc -O2 -o zecho zecho.c || exit $?
PATH="$... | Shell |
#!/bin/sh
# hush's stderr with leak debug enabled
output=output
freelist=`grep 'free 0x' "$output" | cut -d' ' -f2 | sort | uniq | xargs`
grep -v free "$output" >"$output.leaked"
i=8
list=
for freed in $freelist; do
list="$list -e $freed"
test $((--i)) != 0 && continue
echo Dropping $list
grep -F -v... | Shell |
#!/bin/sh
unset LANG LANGUAGE
unset LC_COLLATE
unset LC_CTYPE
unset LC_MONETARY
unset LC_MESSAGES
unset LC_NUMERIC
unset LC_TIME
unset LC_ALL
if test ! -x hush; then
if test ! -x ../../busybox; then
echo "Can't run tests. Put hush binary into this directory (`pwd`)"
exit 1
fi
echo "No ./hush - creating a link ... | Shell |
#!/bin/sh
test -x msh || {
echo "No ./msh - creating a link to ../../busybox"
ln -s ../../busybox msh
}
PATH="$PWD:$PATH" # for msh
export PATH
THIS_SH="$PWD/msh"
export THIS_SH
do_test()
{
test -d "$1" || return 0
# echo Running tests in directory "$1"
(
cd "$1" || { echo "cannot cd $1!"; exi... | Shell |
#!/bin/sh
# TODO: use getopt to avoid parsing options as filenames,
# and to support -- and --help
[ $# -ne 0 ] && DASH_I=-i
sed $DASH_I -e 's/$/\r/' "$@"
| Shell |
#!/bin/sh
cat /etc/nologin.txt 2>/dev/null || echo "This account is not available"
sleep 5
exit 1
| Shell |
#!/bin/sh
# TODO: use getopt to avoid parsing options as filenames,
# and to support -- and --help
for i in "$@"
do
sed -e '1!G;h;$!d' "$i"
done
| Shell |
#!/bin/sh
# TODO: use getopt to avoid parsing options as filenames,
# and to support -- and --help
[ $# -ne 0 ] && DASH_I=-i
sed $DASH_I -e 's/\r$//' "$@"
| Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "description" "command" "result" "infile" "stdin"
testing "comm test 1" "comm input -" "\t123\n""456\n""abc\n""\tdef\n" "456\nabc\n" "123\ndef\n... | Shell |
#!/bin/sh
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing... | Shell |
#!/bin/sh
# Tests for busybox applet itself.
# Copyright 2005 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
HELPDUMP=`true | busybox 2>&1 | cat`
# We need to test under calling the binary under other names.
optional FEATURE_VERBOSE_USAGE
testing "busy... | Shell |
#!/bin/sh
# Tests for the sourcecode base itself.
# Copyright 2006 by Mike Frysinger <vapier@gentoo.org>
# Licensed under GPLv2, see file LICENSE in this source tree.
[ -n "$srcdir" ] || srcdir=$(pwd)
. ./testing.sh
#
# if we don't have the sourcecode available, let's just bail
#
[ -s "$srcdir/../Makefile" ] || exi... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "commands" "expected result" "file input" "stdin"
# diff outputs date/time in the header, which should not be analysed
# NB: sed has tab character in s command!
TRIM_TAB="se... | Shell |
#!/bin/sh
# Copyright 2005 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
# AUDIT:
. ./testing.sh
# testing "test name" "commands" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing ... | Shell |
#!/bin/sh
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
test "`id -u`" = 0 || {
echo "SKIPPED: mount (must be root to test this)"
exit 0
}
if test x"$CONFIG_MKFS_MINIX" != x... | Shell |
#!/bin/sh
. ./md5sum.tests sha256sum 8e1d3ed57ebc130f0f72508446559eeae06451ae6d61b1e8ce46370cfb8963c3
| Shell |
#!/bin/sh
# Tests for unzip.
# Copyright 2006 Rob Landley <rob@landley.net>
# Copyright 2006 Glenn McGrath
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create... | Shell |
#!/bin/sh
# Copyright 2009 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "description" "arguments" "result" "infile" "stdin"
testing "tr does not treat [] in [a-z] as special" \
"tr '[q-z]' '_Q-Z+'" \
"_QWe+" "" "[qwe]"
testing... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "commands" "expected result" "file input" "stdin"
optional DESKTOP
testing "od -b" \
"od -b" \
"\
0000000 110 105 114 114 117
0000005
" \
"" "HELLO"
SKIP=
optional DESKTO... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
COLLAPSE=$(( 0x00010000))
TRIM=$(( 0x00020000))
GREEDY=$(( 0x00040000))
MIN_DIE=$(( 0x00100000))
KEEP_COPY=$((0x00200000))
ESCAPE=$(( 0x00400000))
NORMAL=$(( ... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test x"`id -u`" = x"0" || {
echo "SKIPPED: makedevs (must be root to test this)"
exit 0
}
unset LANG
unset LC_COLLATE
unset LC_ALL
# ls -ln is showing date. Need to remove that, it's variable
... | Shell |
#!/bin/sh
. ./md5sum.tests sha512sum fe413e0f177324d1353893ca0772ceba83fd41512ba63895a0eebb703ef9feac2fb4e92b2cb430b3bda41b46b0cb4ea8307190a5cc795157cfb680a9cd635d0f
| Shell |
#!/bin/sh
# SUSv3 compliant sed tests.
# Copyright 2005 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "description" "commands" "result" "infile" "stdin"
# Corner cases
testing "sed no files (stdin)" 'sed ""' "hello\n" "" "hello\n"
testing "se... | Shell |
#!/bin/sh
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "description" "command" "result" "infile" "stdin"
testing "awk -F case 0" "awk -F '[#]' '{ print NF }'" "" "" ""
testing "awk -F case 1" "awk -F '[#]' '{ ... | Shell |
#!/bin/sh
# Used by both gunzip and bunzip2 tests
FAILCOUNT=0
if test "${0##*/}" = "gunzip.tests"; then
unpack=gunzip
ext=gz
elif test "${0##*/}" = "bunzip2.tests"; then
unpack=bunzip2
ext=bz2
else
echo "WTF? argv0='$0'"
exit 1
fi
bb="busybox "
unset LC_ALL
unset LC_MESSAGES
unset LANG
unset... | Shell |
#!/bin/sh
# Copyright 2009 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
# testing "test name" "options" "expected result" "file input" "stdin"
testing "fold -s" "fold -w 7 -s" \
"123456\n\t\nasdf" \
"" ... | Shell |
#!/bin/sh
# Copyright 2010 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
rm -rf ls.testdir 2>/dev/null
mkdir ls.testdir || exit 1
# testing "test name" "command" "expected result" "file input" "stdin"
# With Unicode pr... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
testing "xargs -E _ stops on underscore" \
"xargs -E _" \
"a\n" \
"" "a\n_\nb\n"
testing "xargs -E ''" \
"xargs -E ''" ... | Shell |
#!/bin/sh
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
# testing "test name" "options" "expected result" "file input" "stdin"
testing "unexpand case 1" "unexpand" \
"\t12345678\n" "" " 12345678... | Shell |
#!/bin/sh
# Copyright 2006 Bernhard Reutner-Fischer
# Licensed under GPLv2 or later, see file LICENSE in this source tree.
. ./testing.sh
a="taskset"
# testing "test name" "opts" "expected result" "file inp" "stdin"
testing "taskset (get from pid 1)" "$a -p 1 >/dev/null;echo \$?" "0\n" "" ""
testing "tas... | Shell |
#!/bin/sh
# Copyright 2010 Nokia Corporation
# Written by Alexander Shishkin
# Licensed under GPLv2 or later, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command(s)" "expected result" "file input" "stdin"
optional FEATURE_AR_CREATE
rm test.a 2>/dev/null
testing "ar creates archives" ... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
umask 022
# ls -ln shows date. Need to remove that, it's variable.
# sed: coalesce spaces
# cut: remove date
# grep: remove "total NNN" lines
FILTER_LS="sed 's/ */ /g' | cut -d' ' -f 1-5,9- | gr... | Shell |
#!/bin/sh
# SUSv3 compliant seq tests.
# Copyright 2006 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
# AUDIT: Full SUSv3 coverage (except internationalization).
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# Need this in order to not execute shell builtin
bb="busybox "
# testing "test name" "command" "expected result" "file input" "stdin"
testing "printf produces no further output 1" \
"${bb}prin... | Shell |
#!/bin/sh
# Usage:
# runtest [applet1] [applet2...]
. ./testing.sh
total_failed=0
# Run one old-style test.
# Tests are stored in applet/testcase shell scripts.
# They are run using "sh -x -e applet/testcase".
# Option -e will make testcase stop on the first failed command.
run_applet_testcase()
{
local applet="$1"... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
# testing "test name" "options" "expected result" "file input" "stdin"
testing "expand" \
"expand" \
" 12345678 12345678\n" \
"" ... | Shell |
#!/bin/sh
# SUSv3 compliant sort tests.
# Copyright 2005 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# The basic tests. These should work even with the small busybox.
testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" ""
testing "sort #2" "sort inp... | Shell |
#!/bin/sh
# pidof tests.
# Copyright 2005 by Bernhard Reutner-Fischer
# Licensed under GPLv2, see file LICENSE in this source tree.
# AUDIT:
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
testing "pidof (exit with error)" \
"pidof veryunlikelyoccuringbinaryname ; echo \$?" "... | Shell |
#!/bin/sh
# unit test for uuencode to test functionality.
# Copyright 2006 by Erik Hovland <erik@hovland.org>
# Licensed under GPLv2, see file LICENSE in this source tree.
# AUDIT: Unit tests for uuencode
. ./testing.sh
# testing "test name" "command(s)" "expected result" "file input" "stdin"
# file input will be f... | Shell |
#!/bin/sh
# Copyright 2010 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
# testing "test name" "command" "expected result" "file input" "stdin"
testing "cal 2000" "cal 1 2000" "\
January 2000
Su Mo Tu We Th Fr Sa
... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "cmd" "expected result" "file input" "stdin"
testing "start-stop-daemon -x without -a" \
'start-stop-daemon -S -x true 2>&1; echo $?' \
"0\n" \
"" ""
testing "start-stop... | Shell |
#!/bin/sh
# Wrapper for User Mode Linux emulation environment
RUNFILE="$(pwd)/${1}.testroot"
if [ -z "$RUNFILE" ] || [ ! -x "$RUNFILE" ]
then
echo "Can't run '$RUNFILE'"
exit 1
fi
shift
if [ -z $(which linux) ]
then
echo "No User Mode Linux."
exit 1;
fi
linux rootfstype=hostfs rw init="$RUNFILE" TESTDIR=`p... | Shell |
#!/bin/sh
# Used by {ms5,shaN}sum
# We pipe texts 0...999 bytes long, {md5,shaN}sum them,
# then {md5,shaN}sum the resulting list.
# Then we compare the result with expected result.
#
# Here are the expected results:
# efe30c482e0b687e0cca0612f42ca29b
# d41337e834377140ae7f98460d71d908598ef04f
# 8e1d3ed57ebc130f0f7250... | Shell |
#!/bin/sh
# Copyright 2009 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# Simple one-block file transfer
# rx => 'C'
# rx <= SOH <blockno> <255-blockno> <128 byte padded with x1A> <crc> <crc>
# rx... | Shell |
#!/bin/sh
# SUSv3 compliant mount and umount tests.
# Copyright 2005 by Rob Landley <rob@landley.net>
# Licensed under GPLv2, see file LICENSE in this source tree.
if [ -z "$TESTDIR" ]
then
echo 'Need $TESTDIR'
exit 1
fi
cd "$TESTDIR"
. testing.sh
# If we aren't PID 1, barf.
#if [ $$ -ne 1 ]
#then
# echo "SK... | Shell |
#!/bin/sh
#
# These are not ash tests, we use ash as a way to test lineedit!
#
# Copyright 2010 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
test -f "$bindir/.config" && . "$bindir/.config"
test x"CONFIG_SCRIPT" = x"y" || exit 0
test x"CONFIG_HEXDUMP" = x"y" || exit 0... | Shell |
#!/bin/sh
# Copyright 2009 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing... | Shell |
#!/bin/sh
# unit test for sum.
# Copyright 2007 by Bernhard Reutner-Fischer
# Licensed under GPLv2 or later, see file LICENSE in this source tree.
# AUDIT: Unit tests for sum
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can... | Shell |
#!/bin/sh
FAILCOUNT=0
ext=bz2
bb="busybox "
unset LC_ALL
unset LC_MESSAGES
unset LANG
unset LANGUAGE
hello_gz() {
# Gzipped "HELLO\n"
#_________________________ vvv vvv vvv vvv - mtime
$ECHO -ne "\x1f\x8b\x08\x00\x85\x1d\xef\x45\x02\x03\xf3\x70\xf5\xf1\xf1\xe7"
$ECHO -ne "\x02\x00\x6e\xd7\xac\xfd\x... | Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "command(s)" "expected result" "file input" "stdin"
testing "patch with old_file == new_file" \
'patch 2>&1; echo $?; cat input' \
"\
patching file input
0
qwe
asd
zxc
" \
... | Shell |
#!/bin/sh
. ./md5sum.tests sha3sum c29d77bc548fa2b20a04c861400a5360879c52156e2a54a3415b99a9a3123e1d5f36714a24eca8c1f05a8e2d8ba859c930d41141f64a255c6794436fc99c486a
| Shell |
#!/bin/sh
# Copyright 2010 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# Opening quote in "omitting directory 'dir'" message:
sq='`' # GNU cp: `
sq="'" # bbox cp: '
rm -rf cp.testdir >/dev/null
mkdir cp.testdir
mkdir cp.testdir/dir
> cp.testdir/dir/file
ln -s fil... | Shell |
# Simple test harness infrastructure for BusyBox
#
# Copyright 2005 by Rob Landley
#
# License is GPLv2, see LICENSE in the busybox tarball for full license text.
# This file defines two functions, "testing" and "optional"
# and a couple more...
# The following environment variables may be set to enable optional beha... | Shell |
#!/bin/sh
# Copyright 2009 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
unset LANG
unset LANGUAGE
unset LC_COLLATE
unset LC_ALL
umask 022
rm -rf tar.tempdir 2>/dev/null
mkdir tar.tempdir && cd tar.tempdir || exit 1
# testing "test name" "script" "expected result" "f... | Shell |
#!/bin/sh
# mkfs.minix tests.
# Copyright 2007 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "test name" "options" "expected result" "file input" "stdin"
# '\n' produces 10 on little endian, but not on big endian
cr=`echo | od -i | sed 's/ *$//g;s/.* //g;2d... | Shell |
#!/bin/sh
. ./md5sum.tests sha1sum d41337e834377140ae7f98460d71d908598ef04f
| Shell |
#!/bin/sh
# Copyright 2008 by Denys Vlasenko
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# ls -ln is showing date. Need to remove that, it's variable
# sed: (1) "maj, min" -> "maj,min" (2) coalesce spaces
# cut: remove date
FILTER_LS="grep -v '^total ' | sed -e 's/, */,/g' -e 's/ */... | Shell |
#!/bin/sh
# Readlink tests.
# Copyright 2006 by Natanael Copa <n@tanael.org>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
TESTDIR=readlink_testdir
TESTFILE="$TESTDIR/testfile"
TESTLINK="testlink"
FAILLINK="$TESTDIR/$TESTDIR/testlink"
# create the dir and test files
mkdir -p "./$TESTD... | Shell |
#!/bin/sh
. ./bunzip2.tests
| Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.