mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-15 19:50:29 +03:00
move run-tests to /bin/bash so we can use bashisms
This commit is contained in:
parent
f4ee767013
commit
234736f306
3 changed files with 4 additions and 4 deletions
61
tests/run-tests
Executable file
61
tests/run-tests
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
copy_apks_into_repo() {
|
||||
for f in `ls -1 ../../*/bin/*.apk`; do
|
||||
name=$(basename $(dirname `dirname $f`))
|
||||
echo "name $name"
|
||||
apk=${name}_`basename $f`
|
||||
echo "apk $apk"
|
||||
cp $f $1/repo/$apk
|
||||
done
|
||||
# delete any 'unaligned' duplicates
|
||||
rm -f $1/repo/*unaligned*.apk
|
||||
}
|
||||
|
||||
if [ -z $WORKSPACE ]; then
|
||||
WORKSPACE=`dirname $(pwd)`
|
||||
echo "Setting Workspace to $WORKSPACE"
|
||||
fi
|
||||
|
||||
# allow the location of the script to be overridden
|
||||
if [ -z $fdroid ]; then
|
||||
fdroid="$WORKSPACE/fdroid"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# setup a new repo from scratch
|
||||
|
||||
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
|
||||
cd $REPOROOT
|
||||
$fdroid init
|
||||
copy_apks_into_repo $REPOROOT
|
||||
$fdroid update -c
|
||||
$fdroid update
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# setup a new repo from scratch and generate a keystore
|
||||
|
||||
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
|
||||
KEYSTORE=$REPOROOT/keystore.jks
|
||||
cd $REPOROOT
|
||||
$fdroid init --keystore $KEYSTORE
|
||||
test -e $KEYSTORE
|
||||
copy_apks_into_repo $REPOROOT
|
||||
$fdroid update -c
|
||||
$fdroid update
|
||||
test -e repo/index.xml
|
||||
test -e repo/index.jar
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# setup a new repo from scratch with a HSM/smartcard
|
||||
|
||||
REPOROOT=`mktemp --directory --tmpdir=$WORKSPACE`
|
||||
cd $REPOROOT
|
||||
$fdroid init --keystore NONE
|
||||
test -e opensc-fdroid.cfg
|
||||
test ! -e NONE
|
||||
Loading…
Add table
Add a link
Reference in a new issue