summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/sanity.bbclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e5bf970db2..bae010d864 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -201,6 +201,21 @@ def check_path_length(filepath, pathname, limit):
201 return "The length of %s is longer than 410, this would cause unexpected errors, please use a shorter path.\n" % pathname 201 return "The length of %s is longer than 410, this would cause unexpected errors, please use a shorter path.\n" % pathname
202 return "" 202 return ""
203 203
204def get_filesystem_id(path):
205 status, result = oe.utils.getstatusoutput("stat -f -c '%s' %s" % ("%t", path))
206 if status == 0:
207 return result
208 else:
209 bb.warn("Can't get the filesystem id of: %s" % path)
210 return None
211
212# Check that the path isn't located on nfs.
213def check_not_nfs(path, name):
214 # The nfs' filesystem id is 6969
215 if get_filesystem_id(path) == "6969":
216 return "The %s: %s can't be located on nfs.\n" % (name, path)
217 return ""
218
204def check_connectivity(d): 219def check_connectivity(d):
205 # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable 220 # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
206 # using the same syntax as for SRC_URI. If the variable is not set 221 # using the same syntax as for SRC_URI. If the variable is not set
@@ -584,9 +599,12 @@ def check_sanity_version_change(status, d):
584 if not oes_bb_conf: 599 if not oes_bb_conf:
585 status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n') 600 status.addresult('You are not using the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n')
586 601
587 # The length of tmpdir can't be longer than 410 602 # The length of TMPDIR can't be longer than 410
588 status.addresult(check_path_length(tmpdir, "TMPDIR", 410)) 603 status.addresult(check_path_length(tmpdir, "TMPDIR", 410))
589 604
605 # Check that TMPDIR isn't located on nfs
606 status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
607
590def check_sanity_everybuild(status, d): 608def check_sanity_everybuild(status, d):
591 # Sanity tests which test the users environment so need to run at each build (or are so cheap 609 # Sanity tests which test the users environment so need to run at each build (or are so cheap
592 # it makes sense to always run them. 610 # it makes sense to always run them.