Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi into next
[platform/kernel/u-boot.git] / tools / buildman / test.py
index d32b226..82d25cf 100644 (file)
@@ -11,18 +11,17 @@ import unittest
 
 # Bring in the patman libraries
 our_path = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(our_path, '../patman'))
-
-import board
-import bsettings
-import builder
-import control
-import command
-import commit
-import terminal
-import test_util
-import toolchain
-import tools
+
+from buildman import board
+from buildman import bsettings
+from buildman import builder
+from buildman import control
+from buildman import toolchain
+from patman import commit
+from patman import command
+from patman import terminal
+from patman import test_util
+from patman import tools
 
 use_network = True
 
@@ -542,7 +541,7 @@ class TestBuild(unittest.TestCase):
         build.commits = self.commits
         build.commit_count = len(self.commits)
         subject = self.commits[1].subject.translate(builder.trans_valid_chars)
-        dirname ='/%02d_of_%02d_g%s_%s' % (2, build.commit_count, commits[1][0],
+        dirname ='/%02d_g%s_%s' % (2, build.commit_count, commits[1][0],
                                            subject[:20])
         self.CheckDirs(build, dirname)
 
@@ -583,7 +582,7 @@ class TestBuild(unittest.TestCase):
                 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')
+                    'x86_64-gcc-.*-nolibc[-_]arm-.*linux-gnueabi.tar.xz')
 
     def testGetEnvArgs(self):
         """Test the GetEnvArgs() function"""
@@ -610,9 +609,9 @@ class TestBuild(unittest.TestCase):
         base_dir = tempfile.mkdtemp()
 
         # Add various files that we want removed and left alone
-        to_remove = ['01_of_22_g0982734987_title', '102_of_222_g92bf_title',
-                     '01_of_22_g2938abd8_title']
-        to_leave = ['something_else', '01-something.patch', '01_of_22_another']
+        to_remove = ['01_g0982734987_title', '102_g92bf_title',
+                     '01_g2938abd8_title']
+        to_leave = ['something_else', '01-something.patch', '01_another']
         for name in to_remove + to_leave:
             _Touch(name)