mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
add script to do a test run of creating a new repo
This tests/ folder can then be used for all sorts of tests, including standard python tests.
This commit is contained in:
parent
434eab6606
commit
bfa21fb630
34
tests/run-tests.sh
Executable file
34
tests/run-tests.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
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
|
||||
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 $REPOROOT/repo/$apk
|
||||
done
|
||||
# delete any 'unaligned' duplicates
|
||||
rm -f $REPOROOT/repo/*unaligned*.apk
|
||||
|
||||
|
||||
$fdroid update -c
|
||||
$fdroid update
|
Loading…
Reference in New Issue
Block a user