summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-04-28 15:31:19 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-30 20:56:35 +0100
commit3e6746aa1df6e7eba8b191c27bc8933bd35e4201 (patch)
tree6e3b17207db2d252910ba8b0ab57515627e8138b /meta
parent49a9426ce3cb4c9c7647725d6c0dad7316788c3a (diff)
downloadpoky-3e6746aa1df6e7eba8b191c27bc8933bd35e4201.tar.gz
sanity.bbclass: pass the data object to the less frequent test harnesses
By passing the data object to the less frequently run test harnesses (check_sanity_tmpdir_change(), check_sanity_sstate_dir_change() and check_sanity_version_change()) we can run tests against BitBake data here too. (From OE-Core rev: 7df8376c28d991dd07c0915d3ccade4cf51c2fee) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d296c861b2..720777a399 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -21,7 +21,7 @@ def check_conf_exists(fn, data):
21 return True 21 return True
22 return False 22 return False
23 23
24def check_sanity_sstate_dir_change(sstate_dir): 24def check_sanity_sstate_dir_change(sstate_dir, data):
25 # Sanity checks to be done when the value of SSTATE_DIR changes 25 # Sanity checks to be done when the value of SSTATE_DIR changes
26 26
27 # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS) 27 # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
@@ -30,14 +30,14 @@ def check_sanity_sstate_dir_change(sstate_dir):
30 testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR") 30 testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
31 return testmsg 31 return testmsg
32 32
33def check_sanity_tmpdir_change(tmpdir): 33def check_sanity_tmpdir_change(tmpdir, data):
34 # Sanity checks to be done when the value of TMPDIR changes 34 # Sanity checks to be done when the value of TMPDIR changes
35 35
36 # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS) 36 # Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
37 testmsg = check_create_long_filename(tmpdir, "TMPDIR") 37 testmsg = check_create_long_filename(tmpdir, "TMPDIR")
38 return testmsg 38 return testmsg
39 39
40def check_sanity_version_change(): 40def check_sanity_version_change(data):
41 # Sanity checks to be done when SANITY_VERSION changes 41 # Sanity checks to be done when SANITY_VERSION changes
42 return "" 42 return ""
43 43
@@ -266,14 +266,14 @@ def check_sanity(e):
266 266
267 sanity_version = int(data.getVar('SANITY_VERSION', e.data, True) or 1) 267 sanity_version = int(data.getVar('SANITY_VERSION', e.data, True) or 1)
268 if last_sanity_version < sanity_version: 268 if last_sanity_version < sanity_version:
269 messages = messages + check_sanity_version_change() 269 messages = messages + check_sanity_version_change(e.data)
270 messages = messages + check_sanity_tmpdir_change(tmpdir) 270 messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
271 messages = messages + check_sanity_sstate_dir_change(sstate_dir) 271 messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
272 else: 272 else:
273 if last_tmpdir != tmpdir: 273 if last_tmpdir != tmpdir:
274 messages = messages + check_sanity_tmpdir_change(tmpdir) 274 messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
275 if last_sstate_dir != sstate_dir: 275 if last_sstate_dir != sstate_dir:
276 messages = messages + check_sanity_sstate_dir_change(sstate_dir) 276 messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
277 277
278 if os.path.exists("conf"): 278 if os.path.exists("conf"):
279 f = file(sanityverfile, 'w') 279 f = file(sanityverfile, 'w')