aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-25 08:13:22 -0600
committerTom Rini <trini@konsulko.com>2023-07-25 11:39:38 -0400
commitad1c9b26a86bdccf6a10e3369b1009cde2b04365 (patch)
tree83a372c3dbdf7df9cbb14587300dbcce50f6b70b
parent94e7cb181ad6bd25d36a11c58e0df64e9f815888 (diff)
downloadu-boot-WIP/25Jul2023.zip
u-boot-WIP/25Jul2023.tar.gz
u-boot-WIP/25Jul2023.tar.bz2
buildman: Specify the output directory in testsWIP/25Jul2023
The default output directory is generally '../' in tests so we end up trying to create '../.bm-work'. This does not work with azure, so update these tests to use the temporary directory instead. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/buildman/func_test.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 58a9bf3..3115700 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -588,7 +588,8 @@ Some images are invalid'''
def testBranchWithSlash(self):
"""Test building a branch with a '/' in the name"""
self._test_branch = '/__dev/__testbranch'
- self._RunControl('-b', self._test_branch, clean_dir=False)
+ self._RunControl('-b', self._test_branch, '-o', self._output_dir,
+ clean_dir=False)
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 0)
@@ -1028,37 +1029,39 @@ endif
def test_exclude_one(self):
"""Test excluding a single board from an arch"""
- self._RunControl('arm', '-x', 'board1')
+ self._RunControl('arm', '-x', 'board1', '-o', self._output_dir)
self.assertEqual(['board0'],
[b.target for b in self._boards.get_selected()])
def test_exclude_arch(self):
"""Test excluding an arch"""
- self._RunControl('-x', 'arm')
+ self._RunControl('-x', 'arm', '-o', self._output_dir)
self.assertEqual(['board2', 'board4'],
[b.target for b in self._boards.get_selected()])
def test_exclude_comma(self):
"""Test excluding a comma-separated list of things"""
- self._RunControl('-x', 'arm,powerpc')
+ self._RunControl('-x', 'arm,powerpc', '-o', self._output_dir)
self.assertEqual(['board4'],
[b.target for b in self._boards.get_selected()])
def test_exclude_list(self):
"""Test excluding a list of things"""
- self._RunControl('-x', 'board2', '-x' 'board4')
+ self._RunControl('-x', 'board2', '-x' 'board4', '-o', self._output_dir)
self.assertEqual(['board0', 'board1'],
[b.target for b in self._boards.get_selected()])
def test_single_boards(self):
"""Test building single boards"""
- self._RunControl('--boards', 'board1')
+ self._RunControl('--boards', 'board1', '-o', self._output_dir)
self.assertEqual(1, self._builder.count)
- self._RunControl('--boards', 'board1', '--boards', 'board2')
+ self._RunControl('--boards', 'board1', '--boards', 'board2',
+ '-o', self._output_dir)
self.assertEqual(2, self._builder.count)
- self._RunControl('--boards', 'board1,board2', '--boards', 'board4')
+ self._RunControl('--boards', 'board1,board2', '--boards', 'board4',
+ '-o', self._output_dir)
self.assertEqual(3, self._builder.count)
def test_print_arch(self):