X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/189b51fab6457fde08f788897b75baa22a89b3b9..850c53f1cbab8c60c6be4964d10e8a2d3b3eb22b:/autotools/run-in-tempdir diff --git a/autotools/run-in-tempdir b/autotools/run-in-tempdir index 15fa64c..3c1a79b 100755 --- a/autotools/run-in-tempdir +++ b/autotools/run-in-tempdir @@ -8,25 +8,29 @@ set -e tmpdir=$(mktemp -d -t gntbuild.XXXXXXXX) trap "rm -rf $tmpdir" EXIT -mkdir $tmpdir/doc - -cp -r autotools daemons scripts lib tools test qa $tmpdir -cp -r doc/examples $tmpdir/doc +# fully copy items +cp -r autotools daemons scripts lib tools qa $tmpdir + +if [[ -z "$COPY_DOC" ]]; then + mkdir $tmpdir/doc + ln -s $PWD/doc/examples $tmpdir/doc +else + # Building documentation requires all files + cp -r doc $tmpdir +fi + +mkdir $tmpdir/test/ +cp -r test/py $tmpdir/test/py +ln -s $PWD/test/data $tmpdir/test +ln -s $PWD/test/hs $tmpdir/test mv $tmpdir/lib $tmpdir/ganeti ln -T -s $tmpdir/ganeti $tmpdir/lib -mkdir -p $tmpdir/htools $tmpdir/htest -for hfile in htools; do - if [ -e htools/$hfile ]; then - cp -p htools/$hfile $tmpdir/htools/ - fi -done - -for hfile in hpc-htools test offline-test.sh cli-tests-defs.sh \ - hbal hscan hspace hinfo hcheck hail; do - if [ -e htest/$hfile ]; then - cp -p htest/$hfile $tmpdir/htest/ +mkdir -p $tmpdir/src $tmpdir/test/hs +for hfile in htools ganeti-confd mon-collector; do + if [ -e src/$hfile ]; then + ln -s $PWD/src/$hfile $tmpdir/src/ fi done