$(1)-GITPATH := $(strip $($(1)-GITPATH))
$(1).gitrepo := $(firstword $(subst @, ,$($(1)-GITPATH)))
$(1).gittag := $(word 2,$(subst @, ,$($(1)-GITPATH)))
+$(1).gittag := $(if $($(1).gittag),$($(1).gittag),master)
endif
endef
cd MODULES && \
$(if $($(1)-SVNPATH),\
svn export $($(1)-SVNPATH) $(1),\
- git clone $($(1).gitrepo) $(1); \
- $(if $($(1).gittag), cd $(1); git checkout "$($(1).gittag)"; cd -; ,) \
- rm -rf $(1)/.git )
+ mkdir $(1) ; (git archive --remote=$($(1).gitrepo) $($(1).gittag) | tar -C $(1) -xf - ) \
+ || { rm -rf $(1); false; } )
@(echo -n "XXXXXXXXXXXXXXX -- END MODULE $(module) : $@ " ; date)
$(1)-module: MODULES/$(1)
$(foreach module,$(ALL.modules),$(eval $(call target_extract_module,$(module))))
+### the tests area
+# use this makefile to extract tests rather than extracting manually in vbuild-nightly
+$(eval $(call stage1_module_vars,tests))
+$(eval $(call target_extract_module,tests))
+tests-clean:
+ rm -rf MODULES/tests
+.PHONY: tests-clean
###
# Base rpmbuild in the current directory
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx build info" >> $@
$(MAKE) --no-print-directory version-build >> $@
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx svn info" >> $@
- $(MAKE) --no-print-directory version-svns >> $@
+ $(MAKE) --no-print-directory version-tags >> $@
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx rpm info" >> $@
$(MAKE) --no-print-directory version-rpms >> $@
@echo $(BASE) > .base
.PHONY: info info-packages info-modules info-branches module-tools
-####################
-tests_gitpath:
- @$(if $(tests-GITPATH), echo $(tests-GITPATH) > $@, \
- echo "http://git.onelab.eu/tests.git" > $@)
-
-
####################
help:
@echo "********** Run make in two stages:"
PLCRT-SVNPATH := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-11
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-4.3-6
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-4.3-6
PLCRT-SVNPATH := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-11
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-4.3-6
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-4.3-6
DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-5.0-5
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-5.0-5
### temporary
# nozomi not needed anymore for 2.6.27
DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-5.0-5
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-5.0-5
PLCRT-SVNPATH := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-10
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-4.3-6
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-4.3-6
DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git
+tests-GITPATH := git://git.onelab.eu/tests.git@master
DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-5.0-5
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-5.0-5
DistributedRateLimiting-SVNPATH := http://svn.planet-lab.org/svn/DistributedRateLimiting/tags/DistributedRateLimiting-0.1-1
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git
+tests-GITPATH := git://git.onelab.eu/tests.git@master
PLCRT-SVNPATH := http://svn.planet-lab.org/svn/PLCRT/tags/PLCRT-1.0-10
# locating the right test directory - see make tests_gitpath
-tests-GITPATH := http://git.onelab.eu/tests.git@tests-4.3-6
+tests-GITPATH := git://git.onelab.eu/tests.git@tests-4.3-6
# stage1
make -C /build $DRY_RUN "${MAKEVARS[@]}" stage1=true
- # store tests_gitpath
- make -C /build $DRY_RUN "${MAKEVARS[@]}" stage1=true tests_gitpath
# versions
make -C /build $DRY_RUN "${MAKEVARS[@]}" versions
# actual stuff
echo "============================== BEG $COMMAND:run_log on $(date)"
- # where to find TESTS_GITPATH
- stamp=/vservers/$BASE/build/tests_gitpath
- if [ ! -f $stamp ] ; then
- echo "$COMMAND: Cannot figure TESTS_GITPATH from missing $stamp"
- failure
- exit 1
- fi
- TESTS_GITPATH=$(cat $stamp)
-
### the URL to the RPMS/<arch> location
# f12 now has everything in i686; try i386 first as older fedoras have both
url=""
# test directory name on test box
testdir=${BASE}
+
# clean it
ssh -n ${testmaster_ssh} rm -rf ${testdir} ${testdir}.git
- # check it out - just the 'system' subdir is enough
- gitrepo=$(echo $TESTS_GITPATH | cut -d@ -f1)
- gittag=$(echo $TESTS_GITPATH | cut -s -d@ -f2)
- ssh -n ${testmaster_ssh} git clone ${gitrepo} ${testdir}.git
- [ -n "$gittag" ] && ssh -n ${testmaster_ssh} "cd ${testdir}.git ; git checkout ${gittag}"
- ssh -n ${testmaster_ssh} "mv ${testdir}.git/system ${testdir} ; rm -rf ${testdir}.git"
+ # check it out in the build
+ vserver $BASE exec make -C /build tests-module
+
+ # push it onto the testmaster - just the 'system' subdir is enough
+ rsync --verbose --archive /vservers/$BASE/build/MODULES/tests/system/ ${testmaster_ssh}:${BASE}
# invoke test on testbox - pass url and build url - so the tests can use vtest-init-vserver.sh
configs=""
success=true
ssh 2>&1 -n ${testmaster_ssh} ${testdir}/run_log --build ${build_SVNPATH} --url ${url} $configs $test_env $VERBOSE --all || success=
- # gather logs in the vserver
+ # gather logs in the build vserver
mkdir -p /vservers/$BASE/build/testlogs
- ssh 2>&1 -n ${testmaster_ssh} tar -C ${testdir}/logs -cf - . | tar -C /vservers/$BASE/build/testlogs -xf - || :
+ rsync --verbose --archive ${testmaster_ssh}:$BASE/logs/ /vservers/$BASE/build/testlogs
# push them to the build web
chmod -R a+r /vservers/$BASE/build/testlogs/
webpublish_rsync_dir /vservers/$BASE/build/testlogs/ $WEBPATH/$BASE/testlogs/
[ -n "$SSH_KEY" ] && setupssh ${BASE} ${SSH_KEY}
vserver ${BASE} exec svn update /build
# make sure we refresh the tests place in case it has changed
- rm -f /build/tests_gitpath
+ rm -f /build/MODULES/tests
# get environment from the first run
FCDISTRO=$(vserver ${BASE} exec /build/getdistroname.sh)
# retrieve all in one run