summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/setup.py')
-rw-r--r--bitbake/lib/bb/tests/setup.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/setup.py b/bitbake/lib/bb/tests/setup.py
index ab4dbf7621..fb2c15f545 100644
--- a/bitbake/lib/bb/tests/setup.py
+++ b/bitbake/lib/bb/tests/setup.py
@@ -49,6 +49,21 @@ with open(os.path.join(builddir, 'init-build-env'), 'w') as f:
49""" 49"""
50 self.add_file_to_testrepo('scripts/oe-setup-build', oesetupbuild, script=True) 50 self.add_file_to_testrepo('scripts/oe-setup-build', oesetupbuild, script=True)
51 51
52 installbuildtools = """#!/usr/bin/env python3
53import getopt
54import sys
55import os
56
57opts, args = getopt.getopt(sys.argv[1:], "d:", ["downloads-directory="])
58for option, value in opts:
59 if option == '-d':
60 installdir = value
61
62print("Buildtools installed into {}".format(installdir))
63os.makedirs(installdir)
64"""
65 self.add_file_to_testrepo('scripts/install-buildtools', installbuildtools, script=True)
66
52 bitbakeconfigbuild = """#!/usr/bin/env python3 67 bitbakeconfigbuild = """#!/usr/bin/env python3
53import os 68import os
54import sys 69import sys
@@ -224,6 +239,11 @@ print("BBPATH is {{}}".format(os.environ["BBPATH"]))
224 out = self.runbbsetup("update") 239 out = self.runbbsetup("update")
225 self.assertIn("Configuration in {} has not changed".format(buildpath), out[0]) 240 self.assertIn("Configuration in {} has not changed".format(buildpath), out[0])
226 241
242 # install buildtools
243 out = self.runbbsetup("install-buildtools")
244 self.assertIn("Buildtools installed into", out[0])
245 self.assertTrue(os.path.exists(os.path.join(buildpath, 'buildtools')))
246
227 # change a file in the test layer repo, make a new commit and 247 # change a file in the test layer repo, make a new commit and
228 # test that status/update correctly report the change and update the config 248 # test that status/update correctly report the change and update the config
229 prev_test_file_content = test_file_content 249 prev_test_file_content = test_file_content