diff mbox series

[U-Boot,04/15] buildman: Make the toolchain test more forgiving

Message ID 20180923224727.204542-5-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show
Series test: Various test refinements and improvements | expand

Commit Message

Simon Glass Sept. 23, 2018, 10:47 p.m. UTC
The filenames of the toolchains on kernel.org changes every now and then.
Fix it for the current change, and make the test use a regex so that it
has a better chance of passing with future changes too.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/test.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index c36bcdf6fb7..7259f7b6507 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -422,8 +422,10 @@  class TestBuild(unittest.TestCase):
     def testToolchainDownload(self):
         """Test that we can download toolchains"""
         if use_network:
-            self.assertEqual('https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz',
-                self.toolchains.LocateArchUrl('arm'))
+            url = self.toolchains.LocateArchUrl('arm')
+            self.assertRegexpMatches(url, 'https://www.kernel.org/pub/tools/'
+                    'crosstool/files/bin/x86_64/.*/'
+                    'x86_64-gcc-.*-nolibc_arm-.*linux-gnueabi.tar.xz')
 
 
 if __name__ == "__main__":