* [PATCH 0/1] Enhance network connectivity sanity check
@ 2011-08-25 15:29 Joshua Lock
2011-08-25 15:29 ` [PATCH 1/1] classes/sanity: enhance the network connectivity test Joshua Lock
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lock @ 2011-08-25 15:29 UTC (permalink / raw)
To: openembedded-core
The patch header says it all, I've switched to using the checkstatus API of
fetch2 to implement the network connectivity check.
This adds a requirement for BitBake master as of yesterday if you want to
sanity check a gainst git uri's.
The following changes since commit 445d6426197579a9c0317498cc6919bb63e7f726:
meta-toolchain/environment: Collected site config files in runtime. (2011-08-24 19:26:01 -0700)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib josh/connection-test
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/connection-test
Joshua Lock (1):
classes/sanity: enhance the network connectivity test
meta/classes/sanity.bbclass | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] classes/sanity: enhance the network connectivity test
2011-08-25 15:29 [PATCH 0/1] Enhance network connectivity sanity check Joshua Lock
@ 2011-08-25 15:29 ` Joshua Lock
2011-08-25 15:50 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lock @ 2011-08-25 15:29 UTC (permalink / raw)
To: openembedded-core
Switch to use the checkstatus fetcher API for the network connectivity test,
this has several advantages:
* we no longer print any messages to the console whilst the check is
being run
* we don't actually download anything, removing the need for tidy up and
making the code more concise
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
meta/classes/sanity.bbclass | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 16af029..cefe6a4 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -95,15 +95,9 @@ def check_connectivity(d):
network_enabled = not bb.data.getVar('BB_NO_NETWORK', d, True)
check_enabled = len(test_uris)
if check_enabled and network_enabled:
- data = bb.data.createCopy(d)
- bookmark = os.getcwd()
- dldir = bb.data.expand('${TMPDIR}/sanity', data)
- bb.data.setVar('DL_DIR', dldir, data)
-
try:
- fetcher = bb.fetch2.Fetch(test_uris, data)
- fetcher.download()
- fetcher.clean(test_uris)
+ fetcher = bb.fetch2.Fetch(test_uris, d)
+ fetcher.checkstatus()
except Exception:
# Allow the message to be configured so that users can be
# pointed to a support mechanism.
@@ -111,10 +105,6 @@ def check_connectivity(d):
if len(msg) == 0:
msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n"
retval = msg
- finally:
- # Make sure we tidy up the cruft
- oe.path.remove(dldir)
- os.chdir(bookmark)
return retval
--
1.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-25 15:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 15:29 [PATCH 0/1] Enhance network connectivity sanity check Joshua Lock
2011-08-25 15:29 ` [PATCH 1/1] classes/sanity: enhance the network connectivity test Joshua Lock
2011-08-25 15:50 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox