mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03: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
1 changed files with 34 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue