* [PATCH] testscript.sh: be able to use branches other that testing-next
@ 2011-02-11 11:41 Steffen Sledz
2011-02-11 12:44 ` Paul Menzel
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Sledz @ 2011-02-11 11:41 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
contrib/testing/testscript.sh | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/contrib/testing/testscript.sh b/contrib/testing/testscript.sh
index 7ae2bd5..23c244b 100755
--- a/contrib/testing/testscript.sh
+++ b/contrib/testing/testscript.sh
@@ -1,21 +1,27 @@
# this script can be used for testing purposes.
# see also http://wiki.openembedded.net/index.php/TestingScript
-# you can define your machine/distro/recipe below (remove the #)
-# or you can pick them up from the environment
-#MACHINE="beagleboard"
-#DISTRO="minimal"
-#TARGET_RECIPE="console-image"
+# you can set your machine/distro/recipe/branch in the environment
+# or use these defaults
+[ -n "${MACHINE}" ] || MACHINE="beagleboard"
+[ -n "${DISTRO}" ] || DISTRO="minimal"
+[ -n "${TARGET_RECIPE}" ] || TARGET_RECIPE="console-image"
+[ -n "${TESTING_BRANCH}" ] || TESTING_BRANCH="testing-next"
# test if we have an openembedded dir, clone it if it does not exist
if [ ! -d openembedded ]
then
(git clone git://git.openembedded.org/openembedded)
- (cd openembedded; git checkout -b testing-next origin/testing-next)
+else
+ # fetch latest objects and refs
+ (cd openembedded; git fetch)
fi
+# create local testing branch if it does not exist yet
+(cd openembedded; git branch --set-upstream ${TESTING_BRANCH} origin/${TESTING_BRANCH})
+
# switch to the testing branch
-(cd openembedded; git checkout testing-next)
+(cd openembedded; git checkout ${TESTING_BRANCH})
# test if bitbake exist; if not; fetch it and untar it
if [ ! -d bitbake-1.10.2 ]
@@ -80,7 +86,7 @@ export BBPATH=${TOPDIR}/openembedded
rm -rf ${TOPDIR}/tmp
# add an echo about the vars so we can see what has been done in a log file
-echo $MACHINE $DISTRO $TARGET_RECIPE
+echo ${MACHINE} ${DISTRO} ${TARGET_RECIPE} ${TESTING_BRANCH} `(cd openembedded;git --no-pager log --max-count=1 --pretty=format:%H)`
# and do the actual work.
bitbake ${TARGET_RECIPE}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] testscript.sh: be able to use branches other that testing-next
2011-02-11 11:41 [PATCH] testscript.sh: be able to use branches other that testing-next Steffen Sledz
@ 2011-02-11 12:44 ` Paul Menzel
2011-02-11 13:08 ` Frans Meulenbroeks
0 siblings, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2011-02-11 12:44 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2803 bytes --]
Am Freitag, den 11.02.2011, 12:41 +0100 schrieb Steffen Sledz:
There is a typo in the commit summary: `s/that/than/`.
> Signed-off-by: Steffen Sledz <sledz@dresearch.de>
> ---
> contrib/testing/testscript.sh | 22 ++++++++++++++--------
> 1 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/contrib/testing/testscript.sh b/contrib/testing/testscript.sh
> index 7ae2bd5..23c244b 100755
> --- a/contrib/testing/testscript.sh
> +++ b/contrib/testing/testscript.sh
> @@ -1,21 +1,27 @@
> # this script can be used for testing purposes.
> # see also http://wiki.openembedded.net/index.php/TestingScript
>
> -# you can define your machine/distro/recipe below (remove the #)
> -# or you can pick them up from the environment
> -#MACHINE="beagleboard"
> -#DISTRO="minimal"
> -#TARGET_RECIPE="console-image"
> +# you can set your machine/distro/recipe/branch in the environment
> +# or use these defaults
> +[ -n "${MACHINE}" ] || MACHINE="beagleboard"
> +[ -n "${DISTRO}" ] || DISTRO="minimal"
> +[ -n "${TARGET_RECIPE}" ] || TARGET_RECIPE="console-image"
> +[ -n "${TESTING_BRANCH}" ] || TESTING_BRANCH="testing-next"
>
> # test if we have an openembedded dir, clone it if it does not exist
> if [ ! -d openembedded ]
> then
> (git clone git://git.openembedded.org/openembedded)
> - (cd openembedded; git checkout -b testing-next origin/testing-next)
> +else
> + # fetch latest objects and refs
> + (cd openembedded; git fetch)
I always use `git remote update` but it looks like there is no
difference [1][2]. Although I could not find in `git help fetch` what
remote is used by default by `git fetch` if none is provided.
> fi
>
> +# create local testing branch if it does not exist yet
> +(cd openembedded; git branch --set-upstream ${TESTING_BRANCH} origin/${TESTING_BRANCH})
> +
> # switch to the testing branch
> -(cd openembedded; git checkout testing-next)
> +(cd openembedded; git checkout ${TESTING_BRANCH})
>
> # test if bitbake exist; if not; fetch it and untar it
> if [ ! -d bitbake-1.10.2 ]
> @@ -80,7 +86,7 @@ export BBPATH=${TOPDIR}/openembedded
> rm -rf ${TOPDIR}/tmp
>
> # add an echo about the vars so we can see what has been done in a log file
> -echo $MACHINE $DISTRO $TARGET_RECIPE
> +echo ${MACHINE} ${DISTRO} ${TARGET_RECIPE} ${TESTING_BRANCH} `(cd openembedded;git --no-pager log --max-count=1 --pretty=format:%H)`
>
> # and do the actual work.
> bitbake ${TARGET_RECIPE}
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Thanks,
Paul
[1] http://www.kernel.org/pub/software/scm/git-core/docs/gitworkflows.html
[2] http://stackoverflow.com/questions/2688251/what-is-the-difference-between-git-fetch-origin-and-git-remote-update-origin
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] testscript.sh: be able to use branches other that testing-next
2011-02-11 12:44 ` Paul Menzel
@ 2011-02-11 13:08 ` Frans Meulenbroeks
2011-02-11 13:28 ` Steffen Sledz
0 siblings, 1 reply; 4+ messages in thread
From: Frans Meulenbroeks @ 2011-02-11 13:08 UTC (permalink / raw)
To: openembedded-devel
2011/2/11 Paul Menzel <paulepanter@users.sourceforge.net>:
> Am Freitag, den 11.02.2011, 12:41 +0100 schrieb Steffen Sledz:
>
> There is a typo in the commit summary: `s/that/than/`.
>
>> Signed-off-by: Steffen Sledz <sledz@dresearch.de>
Steffen, thanks for updating the script. Saved me some time having to
make those changed.
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
>> ---
>> contrib/testing/testscript.sh | 22 ++++++++++++++--------
>> 1 files changed, 14 insertions(+), 8 deletions(-)
>>
>> diff --git a/contrib/testing/testscript.sh b/contrib/testing/testscript.sh
>> index 7ae2bd5..23c244b 100755
>> --- a/contrib/testing/testscript.sh
>> +++ b/contrib/testing/testscript.sh
>> @@ -1,21 +1,27 @@
>> # this script can be used for testing purposes.
>> # see also http://wiki.openembedded.net/index.php/TestingScript
>>
>> -# you can define your machine/distro/recipe below (remove the #)
>> -# or you can pick them up from the environment
>> -#MACHINE="beagleboard"
>> -#DISTRO="minimal"
>> -#TARGET_RECIPE="console-image"
>> +# you can set your machine/distro/recipe/branch in the environment
>> +# or use these defaults
>> +[ -n "${MACHINE}" ] || MACHINE="beagleboard"
>> +[ -n "${DISTRO}" ] || DISTRO="minimal"
>> +[ -n "${TARGET_RECIPE}" ] || TARGET_RECIPE="console-image"
>> +[ -n "${TESTING_BRANCH}" ] || TESTING_BRANCH="testing-next"
>>
>> # test if we have an openembedded dir, clone it if it does not exist
>> if [ ! -d openembedded ]
>> then
>> (git clone git://git.openembedded.org/openembedded)
>> - (cd openembedded; git checkout -b testing-next origin/testing-next)
>> +else
>> + # fetch latest objects and refs
>> + (cd openembedded; git fetch)
>
> I always use `git remote update` but it looks like there is no
> difference [1][2]. Although I could not find in `git help fetch` what
> remote is used by default by `git fetch` if none is provided.
>
>> fi
>>
>> +# create local testing branch if it does not exist yet
>> +(cd openembedded; git branch --set-upstream ${TESTING_BRANCH} origin/${TESTING_BRANCH})
>> +
>> # switch to the testing branch
>> -(cd openembedded; git checkout testing-next)
>> +(cd openembedded; git checkout ${TESTING_BRANCH})
>>
>> # test if bitbake exist; if not; fetch it and untar it
>> if [ ! -d bitbake-1.10.2 ]
>> @@ -80,7 +86,7 @@ export BBPATH=${TOPDIR}/openembedded
>> rm -rf ${TOPDIR}/tmp
>>
>> # add an echo about the vars so we can see what has been done in a log file
>> -echo $MACHINE $DISTRO $TARGET_RECIPE
>> +echo ${MACHINE} ${DISTRO} ${TARGET_RECIPE} ${TESTING_BRANCH} `(cd openembedded;git --no-pager log --max-count=1 --pretty=format:%H)`
>>
>> # and do the actual work.
>> bitbake ${TARGET_RECIPE}
>
> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
>
>
> Thanks,
>
> Paul
>
>
> [1] http://www.kernel.org/pub/software/scm/git-core/docs/gitworkflows.html
> [2] http://stackoverflow.com/questions/2688251/what-is-the-difference-between-git-fetch-origin-and-git-remote-update-origin
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] testscript.sh: be able to use branches other that testing-next
2011-02-11 13:08 ` Frans Meulenbroeks
@ 2011-02-11 13:28 ` Steffen Sledz
0 siblings, 0 replies; 4+ messages in thread
From: Steffen Sledz @ 2011-02-11 13:28 UTC (permalink / raw)
To: openembedded-devel
>> There is a typo in the commit summary: `s/that/than/`.
Fixed and pushed.
Steffen
--
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz@DResearch.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-11 13:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 11:41 [PATCH] testscript.sh: be able to use branches other that testing-next Steffen Sledz
2011-02-11 12:44 ` Paul Menzel
2011-02-11 13:08 ` Frans Meulenbroeks
2011-02-11 13:28 ` Steffen Sledz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.