summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 6ed1e6f4c6..765958e2e0 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -171,6 +171,11 @@ def check_create_long_filename(filepath, pathname):
171 return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror) 171 return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
172 return "" 172 return ""
173 173
174def check_path_length(filepath, pathname, limit):
175 if len(filepath) > limit:
176 return "The length of %s is longer than 410, this would cause unexpected errors, please use a shorter path.\n" % pathname
177 return ""
178
174def check_connectivity(d): 179def check_connectivity(d):
175 # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable 180 # URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
176 # using the same syntax as for SRC_URI. If the variable is not set 181 # using the same syntax as for SRC_URI. If the variable is not set
@@ -453,6 +458,9 @@ def check_sanity(sanity_data):
453 tmpdir = sanity_data.getVar('TMPDIR', True) 458 tmpdir = sanity_data.getVar('TMPDIR', True)
454 sstate_dir = sanity_data.getVar('SSTATE_DIR', True) 459 sstate_dir = sanity_data.getVar('SSTATE_DIR', True)
455 460
461 # The length of tmpdir can't be longer than 410
462 messages = messages + check_path_length(tmpdir, "TMPDIR", 410)
463
456 # Check saved sanity info 464 # Check saved sanity info
457 last_sanity_version = 0 465 last_sanity_version = 0
458 last_tmpdir = "" 466 last_tmpdir = ""