new file mode 100644
@@ -0,0 +1,24 @@
+from oeqa.selftest.case import OESelftestTestCase
+from oeqa.utils.commands import bitbake, get_bb_var
+from oe.cve_check import get_ignored_cves
+
+class CveExportTest (OESelftestTestCase):
+
+ def test_ignored_cves(self):
+ """
+ This test compares the values of variables CVE_CHECK_IGNORE with
+ CVE_IGNORED that is exported from cve-export.bbclass
+ """
+ target = 'unzip'
+ feature = 'INHERIT += "cve-export"\n'
+ feature += 'require conf/distro/include/cve-extra-exclusions.inc'
+ self.write_config(feature)
+
+ res = bitbake("%s -c fetch" % target, ignore_status=True)
+ self.assertEqual(res.status, 0, "\nCouldn't build.\nbitbake output %s" % res.output)
+
+ paths = get_bb_var('PATH', target).split(':')
+ cves = get_bb_var('CVE_CHECK_IGNORE', target).split()
+ final_cve = get_ignored_cves(paths, cves)
+ ignore_cves_from_exported_variable = get_bb_var('CVE_IGNORED', target)
+ self.assertEqual(final_cve, ignore_cves_from_exported_variable.strip(), "Ignored CVEs are not matching")