mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
bitbake: toaster: enable no browser start
We enable a "nobrowser" parameter that inhibits the launch of a browser when toaster starts. This is useful for integration with automated startup scripts and enables headless testing. (Bitbake rev: ccf7f39d470fe6d743b58b1140c19cb8da31ecaf) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
b3189f3071
commit
356809ff40
@@ -154,6 +154,7 @@ NOTOASTERUI=0
|
|||||||
WEBSERVER=1
|
WEBSERVER=1
|
||||||
TOASTER_BRBE=""
|
TOASTER_BRBE=""
|
||||||
WEB_PORT="8000"
|
WEB_PORT="8000"
|
||||||
|
NOBROWSER=0
|
||||||
|
|
||||||
for param in $*; do
|
for param in $*; do
|
||||||
case $param in
|
case $param in
|
||||||
@@ -163,6 +164,9 @@ for param in $*; do
|
|||||||
noweb )
|
noweb )
|
||||||
WEBSERVER=0
|
WEBSERVER=0
|
||||||
;;
|
;;
|
||||||
|
nobrowser )
|
||||||
|
NOBROWSER=1
|
||||||
|
;;
|
||||||
brbe=* )
|
brbe=* )
|
||||||
TOASTER_BRBE=$'\n'"TOASTER_BRBE=\""${param#*=}"\""
|
TOASTER_BRBE=$'\n'"TOASTER_BRBE=\""${param#*=}"\""
|
||||||
;;
|
;;
|
||||||
@@ -227,7 +231,7 @@ if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then
|
|||||||
cleanup
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ $WEBSERVER -gt 0 ]; then
|
if [ $WEBSERVER -gt 0 ] && [ $NOBROWSER -eq 0 ] ; then
|
||||||
echo "Starting browser..."
|
echo "Starting browser..."
|
||||||
xdg-open http://127.0.0.1:$WEB_PORT/ >/dev/null 2>&1 &
|
xdg-open http://127.0.0.1:$WEB_PORT/ >/dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user