On 06/26/2011 10:37 AM, Joshua Lock wrote:
On Sat, 2011-06-25 at 19:33 -0700, Khem Raj wrote:
On 6/25/2011 5:53 PM, Saul Wold wrote:
On 06/20/2011 11:09 AM, Joshua Lock wrote:
Sanity test to verify files can be fetched from the network using git,
http
and https fetchers point users at a page to help get set up in the
case of a
failure.

Addresses [YOCTO #933]

Signed-off-by: Joshua Lock<j...@linux.intel.com>
---
meta/classes/sanity.bbclass | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index bffa4f5..650df5f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -35,6 +35,8 @@ def check_sanity_tmpdir_change(tmpdir, data):

# Check that TMPDIR isn't on a filesystem with limited filename length
(eg. eCryptFS)
testmsg = check_create_long_filename(tmpdir, "TMPDIR")
+ # Check that we can fetch from various network transports
+ testmsg = testmsg + check_connectivity(data)
return testmsg

def check_sanity_version_change(data):
@@ -75,6 +77,38 @@ def check_create_long_filename(filepath, pathname):
return "Failed to create a file in %s: %s" % (pathname, strerror)
return ""

+def check_connectivity(d):
+ # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
using
+ # the same syntax as SRC_URI.
+ test_uris = (bb.data.getVar('CONNECTIVITY_CHECK_URIS', d, True) or
"").split()
+ # If no URI's set, fallback to some default ones we know of
+ if len(test_uris) == 0:
+ test_uris = ["http://yoctoproject.org/about";,
+
"https://eula-downloads.yoctoproject.org/crownbay/crownbay-bernard-5.0.0";,

+ "git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD"]
+ retval = ""

imo this change is yocto specific doesnt belong to core

Are you objecting to the feature (testing whether the fetchers can work
on a newly configured tmpdir) or the implementation (using
yoctoproject.org URI's)?

the latter

I can change this patch to only run the check when the
CONNECTIVITY_CHECK_URI's and remove the default uri's. Would that make
the change less objectionable?

yes that would be better.

Joshua


_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to