Example #1
0
 def test_non_gplv3(self):
     data = 'INCOMPATIBLE_LICENSE = "GPLv3"'
     conf = os.path.join(self.builddir, 'conf/local.conf')
     ftools.append_file(conf ,data)
     result = bitbake('readline', ignore_status=True)
     self.assertEqual(result.status, 0)
     self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
     self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
     ftools.remove_from_file(conf ,data)
Example #2
0
    def remove_include(cls):
        if "#include added by oe-selftest.py" \
            in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
            cls.logger.info("Removing the include from local.conf")
            ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"), \
                    "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")

        if "#include added by oe-selftest.py" \
            in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
            cls.logger.info("Removing the include from bblayers.conf")
            ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
                    "\n#include added by oe-selftest.py\ninclude bblayers.inc")
Example #3
0
    def remove_include(cls):
        if "#include added by oe-selftest.py" \
            in ftools.read_file(os.path.join(cls.builddir, "conf/local.conf")):
                cls.logger.info("Removing the include from local.conf")
                ftools.remove_from_file(os.path.join(cls.builddir, "conf/local.conf"), \
                        "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")

        if "#include added by oe-selftest.py" \
            in ftools.read_file(os.path.join(cls.builddir, "conf/bblayers.conf")):
                cls.logger.info("Removing the include from bblayers.conf")
                ftools.remove_from_file(os.path.join(cls.builddir, "conf/bblayers.conf"), \
                        "\n#include added by oe-selftest.py\ninclude bblayers.inc")
Example #4
0
 def test_non_gplv3(self):
     data = 'INCOMPATIBLE_LICENSE = "GPLv3"'
     conf = os.path.join(self.builddir, 'conf/local.conf')
     ftools.append_file(conf, data)
     result = bitbake('readline', ignore_status=True)
     self.assertEqual(result.status, 0)
     self.assertFalse(
         os.path.isfile(
             os.path.join(self.builddir,
                          'tmp/deploy/licenses/readline/generic_GPLv3')))
     self.assertTrue(
         os.path.isfile(
             os.path.join(self.builddir,
                          'tmp/deploy/licenses/readline/generic_GPLv2')))
     ftools.remove_from_file(conf, data)
Example #5
0
 def tearDownLocal(self):
     if self.layerappend:
         ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
     super(LayerAppendTests, self).tearDownLocal()
Example #6
0
 def remove_bblayers_config(self, data):
     """Remove data from <builddir>/conf/bblayers.inc"""
     self.logger.debug("Removing from: %s\n%s\n" %
                       (self.testinc_bblayers_path, data))
     ftools.remove_from_file(self.testinc_bblayers_path, data)
Example #7
0
 def remove_recipeinc(self, recipe, data):
     """Remove data from meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
     inc_file = self.recipeinc(recipe)
     self.logger.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)
Example #8
0
 def remove_recipeinc(self, recipe, data):
     inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
     self.log.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)
Example #9
0
 def remove_config(self, data):
     self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_path, data))
     ftools.remove_from_file(self.testinc_path, data)
Example #10
0
 def tearDownLocal(self):
     ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
Example #11
0
 def remove_recipeinc(self, recipe, data):
     inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
     self.log.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)
Example #12
0
 def remove_recipeinc(self, recipe, data):
     """Remove data from meta-sefltest/recipes-test/<recipe>/test_recipe.inc"""
     inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe,
                             'test_recipe.inc')
     self.logger.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)
Example #13
0
 def remove_bblayers_config(self, data):
     """Remove data from <builddir>/conf/bblayers.inc"""
     self.logger.debug("Removing from: %s\n%s\n" % (self.testinc_bblayers_path, data))
     ftools.remove_from_file(self.testinc_bblayers_path, data)
Example #14
0
 def remove_recipeinc(self, recipe, data):
     """Remove data from meta-selftest/recipes-test/<recipe>/test_recipe.inc"""
     inc_file = self.recipeinc(recipe)
     self.logger.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)
 def tearDownLocal(self):
     ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend.replace("COREBASE", self.builddir + "/.."))
Example #16
0
 def remove_bblayers_config(self, data):
     self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_bblayers_path, data))
     ftools.remove_from_file(self.testinc_bblayers_path, data)
 def tearDownLocal(self):
     if self.layerappend:
         ftools.remove_from_file(self.builddir + "/conf/bblayers.conf", self.layerappend)
     super(LayerAppendTests, self).tearDownLocal()
Example #18
0
 def remove_recipeinc(self, recipe, data):
     """Remove data from meta-sefltest/recipes-test/<recipe>/test_recipe.inc"""
     inc_file = os.path.join(self.testlayer_path, 'recipes-test', recipe, 'test_recipe.inc')
     self.logger.debug("Removing from: %s\n%s\n" % (inc_file, data))
     ftools.remove_from_file(inc_file, data)