From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] buildman: Perform tests in /tmp
Date: Fri, 4 Oct 2019 12:12:52 -0400 [thread overview]
Message-ID: <20191004161254.22362-1-trini@konsulko.com> (raw)
We may not always be able to write to the default output directory but
we will always have a usable /tmp. Make the buildman tests use /tmp
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
tools/buildman/func_test.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 119d02cbb2b6..99cf46772639 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -421,7 +421,7 @@ class TestFunctional(unittest.TestCase):
def testCurrentSource(self):
"""Very simple test to invoke buildman on the current source"""
self.setupToolchains();
- self._RunControl()
+ self._RunControl('-o', '/tmp')
lines = terminal.GetPrintTestLines()
self.assertIn('Building current source for %d boards' % len(boards),
lines[0].text)
@@ -434,7 +434,7 @@ class TestFunctional(unittest.TestCase):
def testBadToolchain(self):
"""Test that missing toolchains are detected"""
self.setupToolchains();
- ret_code = self._RunControl('-b', TEST_BRANCH)
+ ret_code = self._RunControl('-b', TEST_BRANCH, '-o', '/tmp')
lines = terminal.GetPrintTestLines()
# Buildman always builds the upstream commit as well
@@ -458,13 +458,13 @@ class TestFunctional(unittest.TestCase):
def testBranch(self):
"""Test building a branch with all toolchains present"""
- self._RunControl('-b', TEST_BRANCH)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp')
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 0)
def testCount(self):
"""Test building a specific number of commitst"""
- self._RunControl('-b', TEST_BRANCH, '-c2')
+ self._RunControl('-b', TEST_BRANCH, '-c2', '-o', '/tmp')
self.assertEqual(self._builder.count, 2 * len(boards))
self.assertEqual(self._builder.fail, 0)
# Each board has a mrproper, config, and then one make per commit
@@ -472,34 +472,34 @@ class TestFunctional(unittest.TestCase):
def testIncremental(self):
"""Test building a branch twice - the second time should do nothing"""
- self._RunControl('-b', TEST_BRANCH)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp')
# Each board has a mrproper, config, and then one make per commit
self.assertEqual(self._make_calls, len(boards) * (self._commits + 2))
self._make_calls = 0
- self._RunControl('-b', TEST_BRANCH, clean_dir=False)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp', clean_dir=False)
self.assertEqual(self._make_calls, 0)
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 0)
def testForceBuild(self):
"""The -f flag should force a rebuild"""
- self._RunControl('-b', TEST_BRANCH)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp')
self._make_calls = 0
- self._RunControl('-b', TEST_BRANCH, '-f', clean_dir=False)
+ self._RunControl('-b', TEST_BRANCH, '-f', '-o', '/tmp', clean_dir=False)
# Each board has a mrproper, config, and then one make per commit
self.assertEqual(self._make_calls, len(boards) * (self._commits + 2))
def testForceReconfigure(self):
"""The -f flag should force a rebuild"""
- self._RunControl('-b', TEST_BRANCH, '-C')
+ self._RunControl('-b', TEST_BRANCH, '-C', '-o', '/tmp')
# Each commit has a mrproper, config and make
self.assertEqual(self._make_calls, len(boards) * self._commits * 3)
def testErrors(self):
"""Test handling of build errors"""
self._error['board2', 1] = 'fred\n'
- self._RunControl('-b', TEST_BRANCH)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp')
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 1)
@@ -507,13 +507,13 @@ class TestFunctional(unittest.TestCase):
# not be rebuilt
del self._error['board2', 1]
self._make_calls = 0
- self._RunControl('-b', TEST_BRANCH, clean_dir=False)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp', clean_dir=False)
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._make_calls, 0)
self.assertEqual(self._builder.fail, 1)
# Now use the -F flag to force rebuild of the bad commit
- self._RunControl('-b', TEST_BRANCH, '-F', clean_dir=False)
+ self._RunControl('-b', TEST_BRANCH, '-o', '/tmp', '-F', clean_dir=False)
self.assertEqual(self._builder.count, self._total_builds)
self.assertEqual(self._builder.fail, 0)
self.assertEqual(self._make_calls, 3)
--
2.17.1
next reply other threads:[~2019-10-04 16:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 16:12 Tom Rini [this message]
2019-10-04 16:12 ` [U-Boot] [PATCH 2/3] gitlab-ci: Have buildman use /tmp for output Tom Rini
2019-10-04 16:34 ` Stephen Warren
2019-10-04 17:28 ` Tom Rini
2019-10-08 22:38 ` Tom Rini
2019-10-04 16:12 ` [U-Boot] [PATCH 3/3] gitlab-ci: Switch to Ubuntu 18.04 image Tom Rini
2019-10-08 22:38 ` Tom Rini
2019-10-04 16:32 ` [U-Boot] [PATCH 1/3] buildman: Perform tests in /tmp Stephen Warren
2019-10-04 17:26 ` Tom Rini
2019-10-04 18:40 ` Stephen Warren
2019-10-04 20:07 ` Tom Rini
2019-10-10 17:06 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191004161254.22362-1-trini@konsulko.com \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox