Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
cmake first try
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Sep 29, 2017
1 parent 0512b0a commit c18823d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DartConfiguration.tcl.in
@@ -1,7 +1,7 @@
SourceDirectory: @srcdir@
BuildDirectory: @regressdir@
Site: @sitename@
BuildName: @bversion@-@bdate@-@dbengine@-@os@
BuildName: @bversion@-@bareos_gitrev@-@bdate@-@dbengine@-@os@-@regress_gitrev@
DropMethod: http
DropSite: regress.bareos.org
DropLocation: /submit.php?project=bareos
Expand Down
15 changes: 15 additions & 0 deletions scripts/create_sed
Expand Up @@ -34,8 +34,23 @@ bdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/include/version.h`
builddir="${src}"
hostname="${hostname:-$HOST}"

# get git info
regress_gitrev=""
bareos_gitrev=""

pushd $cwd
regress_gitrev=`git show -s --format=%h HEAD`
popd

pushd ${BAREOS_SOURCE}
bareos_gitrev=`git show -s --format=%h HEAD`
popd


# Create sed command script
>${out}
echo "s%@bareos_gitrev@%${bareos_gitrev}%g" >>${out}
echo "s%@regress_gitrev@%${regress_gitrev}%g" >>${out}
echo "s%@archivedir@%${tmp}%g" >>${out}
echo "s%@bindir@%${bin}%g" >>${out}
echo "s%@sbindir@%${bin}%g" >>${out}
Expand Down
6 changes: 3 additions & 3 deletions scripts/functions
Expand Up @@ -235,9 +235,9 @@ run_bareos()
zstat=0
estat=0
if test "$debug" -eq 1 ; then
${scripts}/bareos-ctl-dir start -m
${scripts}/bareos-ctl-sd start -m
${scripts}/bareos-ctl-fd start -m $1
${scripts}/bareos-ctl-dir start -m -d 100
${scripts}/bareos-ctl-sd start -m -d 100
${scripts}/bareos-ctl-fd start -m $1 -d 100
else
${scripts}/bareos start >/dev/null 2>&1
fi
Expand Down
15 changes: 9 additions & 6 deletions scripts/regress-config.in
Expand Up @@ -4,6 +4,7 @@
#

. ${1}/config

if test "x@db_password@" = "x"; then
PASSWD=
else
Expand Down Expand Up @@ -31,6 +32,7 @@ cmake .. \
-Dsbindir=${1}/bin \
-Dlibdir=${1}/bin \
-Dsysconfdir=${1}/bin \
-Dscriptdir=${1}/bin \
-Dconfdir=${1}/bin \
-Dmandir=${1}/bin \
-Ddocdir=${1}/bin/html \
Expand All @@ -42,13 +44,13 @@ cmake .. \
-Dsmartalloc=yes\
-Dlockmgr=yes \
-Dconio=no \
-Dworking-dir=${1}/working \
-Dworking_dir=${1}/working \
-Darchivedir=${1}/tmp \
-Ddump-email=${EMAIL} \
-Djob-email=${EMAIL} \
-Dsmtp-host=${SMTP_HOST} \
-Ddb-name=@db_name@ \
-Ddb-user=@db_user@ \
-Ddump_email=${EMAIL} \
-Djob_email=${EMAIL} \
-Dsmtp_host=${SMTP_HOST} \
-Ddb_name=@db_name@ \
-Ddb_user=@db_user@ \
${PASSWD} \
${OPENSSL} \
${TCPWRAPPERS} \
Expand All @@ -60,4 +62,5 @@ LD_LIBRARY_PATH=${1}/bin:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

cd ..

exit 0
32 changes: 18 additions & 14 deletions scripts/setup
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -x

#
# Script to setup running Bareos regression tests
Expand Down Expand Up @@ -80,12 +80,15 @@ rm -f Makefile config.*
#
# Run Bareos configuration, make, install
#
./regress-config ${cwd}
sh -x ./regress-config ${cwd}
check_exit_code

#
# Cleanup any build in source
#

cd cmake-build

make clean
make ${MAKEOPT}
check_exit_code
Expand All @@ -101,23 +104,24 @@ fi
#
# Get all tests -- especially testls
#
cd src/tests
make installall
check_exit_code
cd ../..
#cd src/tests
#make installall
#check_exit_code
#cd ../..

#
# Get all tools -- especially timelimit
#
cd src/tools
make installall
check_exit_code
cd ../..
#cd src/tools
#make installall
#check_exit_code
#cd ../..

# make -C not available on Solaris, therefore cd in subshell.
(
cd src/plugins/filed
make install-test-plugin
)
#(
# cd src/plugins/filed
# make install-test-plugin
#)
#disable test-plugin
mv ${cwd}/bin/plugins/test-plugin-fd.so ${cwd}/bin/plugins/test-plugin-fd.sox

Expand Down
3 changes: 3 additions & 0 deletions tests/bscan-test
Expand Up @@ -66,12 +66,15 @@ else
PASSWD="-P ${db_password}"
fi

debug=1
if test "$debug" -eq 1 ; then
$bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr ${cwd}/tmp
else
$bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr ${cwd}/tmp >tmp/log3.out 2>&1
fi

echo "$bin/bscan -w working $BSCANLIBDBI -u ${db_user} -n ${db_name} $PASSWD -m -s -v -b tmp/bscan.bsr ${cwd}/tmp "

cat <<END_OF_DATA >tmp/bconcmds
@$out /dev/null
messages
Expand Down

0 comments on commit c18823d

Please sign in to comment.