From a31e49dbf0e6e40d19dd5d5331b892f9d72d6f9d Mon Sep 17 00:00:00 2001 From: Abhishek Pandey Date: Tue, 29 Sep 2015 12:14:41 +0530 Subject: [PATCH] Updated Tizen GBS build script to fix tinycbor clone error During Jenkins build, tinycbor library is copied as a soft link in extlibs folder. For Tizen build, we copy from this location to tmp folder, which in turn is copied to GBS-ROOT during build. While copying from extlibs/tinycbor which is present as a soft link, error appear during jenkins build. Fixed the error by giving -L option during in copy command. Also, added error return clause in gbs build script to enable jenkins catch the error in case of build break. Change-Id: I24c149dabd3ac3c382adf8aa11a60b0adae38a68 Signed-off-by: Abhishek Pandey Reviewed-on: https://gerrit.iotivity.org/gerrit/3247 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka (cherry picked from commit 8004fc298636d66b236dd527c981b7f34845b0e7) Reviewed-on: https://gerrit.iotivity.org/gerrit/3269 --- gbsbuild.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gbsbuild.sh b/gbsbuild.sh index bc62fad..d9ab246 100755 --- a/gbsbuild.sh +++ b/gbsbuild.sh @@ -15,12 +15,20 @@ sourcedir=`pwd` echo `pwd` +# Clean tmp directory. +rm -rf ./tmp + +# Create directory structure for GBS Build mkdir ./tmp mkdir ./tmp/extlibs/ mkdir ./tmp/packaging cp -R ./build_common $sourcedir/tmp cp -R ./examples $sourcedir/tmp -cp -R ./extlibs/tinycbor $sourcedir/tmp/extlibs + +# tinycbor is available as soft-link, so copying with 'dereference' option. +cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs +rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git + cp -R ./extlibs/cjson $sourcedir/tmp/extlibs cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs cp -R ./extlibs/sqlite3 $sourcedir/tmp/extlibs @@ -32,6 +40,8 @@ cp ./extra_options.scons $sourcedir/tmp cp ./tools/tizen/*.spec ./tmp/packaging cp ./tools/tizen/*.manifest ./tmp/packaging cp ./SConstruct ./tmp + +# copy dependency RPMs and conf files for tizen build cp ./tools/tizen/*.rpm ./tmp cp ./tools/tizen/.gbs.conf ./tmp @@ -58,7 +68,10 @@ if eval $gbscommand; then echo "Build is successful" else echo "Build failed!" + exit 1 fi cd $sourcedir rm -rf $sourcedir/tmp + +exit 0 -- 2.7.4