Skip to content

Commit

Permalink
next try
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed May 28, 2018
1 parent ad0b8fe commit 716d38b
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions .travis/all
@@ -1,44 +1,46 @@
#!/bin/bash

# stop on first error
set -e

echo "start testing ... "
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
echo "USER: $USER"
echo "DB: $DB"

echo "--------- starting services ----------- "
service bareos-dir start
service bareos-sd start
service bareos-fd start
sleep 10

echo "--------- checking services ----------- "
service bareos-dir status
service bareos-sd status
service bareos-fd status


# enable bash debug
set -v

BACKUP_TEST_FILE=/usr/sbin/bareos.test

echo -e "status dir" | bconsole
echo
echo "---- label a volume ----"
echo -e "label volume=testvol pool=Full" | bconsole
echo
echo "----- create some file to test backup / restore ----"
echo "bareos restore test" > ${BACKUP_TEST_FILE}
echo
echo "------ trigger backup job -----"
echo -e "run job=backup-bareos-fd yes\rwait" | bconsole | grep "Job queued. JobId="
echo "status dir" | bconsole
echo
echo "------ trigger restore job -----"
echo -e "restore select current\r2\rls\rmark usr\rdone\ryes\rwait" | bconsole
echo "status dir" | bconsole
grep "bareos restore test" /tmp/bareos-restores/${BACKUP_TEST_FILE}

print_header()
{
TEXT="$1"
printf "#\n"
printf "# %s\n" "$TEXT"
printf "#\n"
}

if [ "${COVERITY_SCAN}" ]; then
cd core
# run configure with default options
debian/rules override_dh_auto_configure
eval "$COVERITY_SCAN_BUILD"
else
cd regress
echo '
MAKEOPT=-j4
BAREOS_SOURCE="`pwd`/../core"
EMAIL=my-name@domain.com
SMTP_HOST="localhost"
DBTYPE="postgresql"
WHICHDB=-D${DBTYPE}=yes
TAPE_DRIVE="/dev/null"
AUTOCHANGER="/dev/null"
DRIVE1=0
DRIVE2="none"
SLOT1=1
SLOT2=2
TAPE_DRIVE1="/dev/null"
AUTOCHANGER_SCRIPT=mtx-changer
db_name="regress"
db_user="regress"
db_password=""
TCPWRAPPERS=-Dtcp-wrappers=yes
OPENSSL=-Dopenssl=yes
HOST="127.0.0.1"
SCSICRYPTO="-Dscsi-crypto=yes"
BASEPORT=8101
SITE_NAME=travis-bareos-${HOST}
DEVELOPER=-Ddeveloper=yes
COVERAGE=-Dcoverage=yes
' > config

fi

0 comments on commit 716d38b

Please sign in to comment.