192192 "source" : buildconfig .topobjdir ,
193193 "base" : "dist/bin" ,
194194 "patterns" : [
195- f"{ f } { buildconfig .substs ['BIN_SUFFIX' ]} " for f in TEST_HARNESS_BINS
195+ "%s%s" % (f , buildconfig .substs ["BIN_SUFFIX" ])
196+ for f in TEST_HARNESS_BINS
196197 ]
197198 + [
198- f"{ buildconfig .substs ['DLL_PREFIX' ]} { f } { buildconfig .substs ['DLL_SUFFIX' ]} "
199+ "%s%s%s"
200+ % (
201+ buildconfig .substs ["DLL_PREFIX" ],
202+ f ,
203+ buildconfig .substs ["DLL_SUFFIX" ],
204+ )
199205 for f in TEST_HARNESS_DLLS
200206 ],
201207 "dest" : "bin" ,
630636 {
631637 "source" : buildconfig .topobjdir ,
632638 "base" : "dist/bin" ,
633- "pattern" : f "http3server{ buildconfig .substs [' BIN_SUFFIX' ] } " ,
639+ "pattern" : "http3server%s" % buildconfig .substs [" BIN_SUFFIX" ] ,
634640 "dest" : "xpcshell/http3server" ,
635641 },
636642 {
702708 "source" : buildconfig .topobjdir ,
703709 "base" : "dist/bin" ,
704710 "patterns" : [
705- f"{ f } { buildconfig .substs ['BIN_SUFFIX' ]} " for f in TEST_HARNESS_BINS
711+ "%s%s" % (f , buildconfig .substs ["BIN_SUFFIX" ])
712+ for f in TEST_HARNESS_BINS
706713 ]
707714 + [
708- f"{ buildconfig .substs ['DLL_PREFIX' ]} { f } { buildconfig .substs ['DLL_SUFFIX' ]} "
715+ "%s%s%s"
716+ % (
717+ buildconfig .substs ["DLL_PREFIX" ],
718+ f ,
719+ buildconfig .substs ["DLL_SUFFIX" ],
720+ )
709721 for f in TRAIN_HOP_DLLS
710722 ],
711723 "dest" : "bin" ,
770782 itertools .chain (* (e .get ("ignore" , []) for e in ARCHIVE_FILES ["common" ]))
771783 )
772784
773- if not any (p .startswith (f" { k } /" ) for p in ignores ):
774- raise Exception (f '"common" ignore list probably should contain { k } ' )
785+ if not any (p .startswith ("%s/" % k ) for p in ignores ):
786+ raise Exception ('"common" ignore list probably should contain %s' % k )
775787
776788
777789def find_generated_harness_files ():
@@ -848,8 +860,9 @@ def find_files(archive):
848860 finder = FileFinder (os .path .join (source , base ), ** common_kwargs )
849861
850862 for pattern in patterns :
851- for raw_p , f in finder .find (pattern ):
852- p = mozpath .join (dest , raw_p ) if dest else raw_p
863+ for p , f in finder .find (pattern ):
864+ if dest :
865+ p = mozpath .join (dest , p )
853866 yield p , f
854867
855868
@@ -860,22 +873,22 @@ def find_manifest_dirs(topsrcdir, manifests):
860873 """
861874 dirs = set ()
862875
863- for manifest_path in manifests :
864- abs_manifest_path = os .path .join (topsrcdir , manifest_path )
876+ for p in manifests :
877+ p = os .path .join (topsrcdir , p )
865878
866- if abs_manifest_path .endswith (".ini" ) or abs_manifest_path .endswith (".toml" ):
879+ if p .endswith (".ini" ) or p .endswith (".toml" ):
867880 test_manifest = TestManifest ()
868- test_manifest .read (abs_manifest_path )
881+ test_manifest .read (p )
869882 dirs |= set ([os .path .dirname (m ) for m in test_manifest .manifests ()])
870883
871- elif abs_manifest_path .endswith (".list" ):
884+ elif p .endswith (".list" ):
872885 m = ReftestManifest ()
873- m .load (abs_manifest_path )
886+ m .load (p )
874887 dirs |= m .dirs
875888
876889 else :
877890 raise Exception (
878- f'"{ os .path .splitext (abs_manifest_path )[1 ]} " is not a supported manifest format.'
891+ f'"{ os .path .splitext (p )[1 ]} " is not a supported manifest format.'
879892 )
880893
881894 dirs = {mozpath .normpath (d [len (topsrcdir ) :]).lstrip ("/" ) for d in dirs }
@@ -933,13 +946,14 @@ def main(argv):
933946 )
934947 file_count += 1
935948 else :
936- raise Exception (f "unhandled file extension: { out_file } " )
949+ raise Exception ("unhandled file extension: %s" % out_file )
937950
938951 duration = time .monotonic () - t_start
939952 zip_size = os .path .getsize (args .outputfile )
940953 basename = os .path .basename (args .outputfile )
941954 print (
942- f"Wrote { file_count } files in { zip_size } bytes to { basename } in { duration :.2f} s"
955+ "Wrote %d files in %d bytes to %s in %.2fs"
956+ % (file_count , zip_size , basename , duration )
943957 )
944958
945959
0 commit comments