diff options
Diffstat (limited to 'poky/bitbake/lib/bb/tests/parse.py')
-rw-r--r-- | poky/bitbake/lib/bb/tests/parse.py | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/poky/bitbake/lib/bb/tests/parse.py b/poky/bitbake/lib/bb/tests/parse.py index 1bc47405d..9afd1b208 100644 --- a/poky/bitbake/lib/bb/tests/parse.py +++ b/poky/bitbake/lib/bb/tests/parse.py @@ -1,22 +1,9 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Test for lib/bb/parse/ # # Copyright (C) 2015 Richard Purdie # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0-only # import unittest @@ -187,3 +174,21 @@ python () { self.assertEqual(d1.getVar("VAR_var"), "B") self.assertEqual(d2.getVar("VAR_var"), None) + addtask_deltask = """ +addtask do_patch after do_foo after do_unpack before do_configure before do_compile +addtask do_fetch do_patch + +deltask do_fetch do_patch +""" + def test_parse_addtask_deltask(self): + import sys + f = self.parsehelper(self.addtask_deltask) + d = bb.parse.handle(f.name, self.d)[''] + + stdout = sys.stdout.getvalue() + self.assertTrue("addtask contained multiple 'before' keywords" in stdout) + self.assertTrue("addtask contained multiple 'after' keywords" in stdout) + self.assertTrue('addtask ignored: " do_patch"' in stdout) + self.assertTrue('deltask ignored: " do_patch"' in stdout) + #self.assertTrue('dependent task do_foo for do_patch does not exist' in stdout) + |