Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/e25ac76286c61e719f9d0599dfcaa929142ad1a3 >--------------------------------------------------------------- commit e25ac76286c61e719f9d0599dfcaa929142ad1a3 Author: Ian Lynagh <[email protected]> Date: Tue May 1 00:58:12 2012 +0100 Simplify the stdout-* filename generation in the driver >--------------------------------------------------------------- driver/testlib.py | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) diff --git a/driver/testlib.py b/driver/testlib.py index 77669e6..dfb50ec 100644 --- a/driver/testlib.py +++ b/driver/testlib.py @@ -1986,28 +1986,19 @@ def platform_wordsize_qualify( name, suff ): basepath = qualify(name, suff) - fns = [ lambda x: x + '-' + config.compiler_type, - lambda x: x + '-' + config.compiler_maj_version, - lambda x: x + '-ws-' + config.wordsize ] - - paths = [ basepath ] - for fn in fns: - paths = paths + map(fn, paths) - - paths.reverse() - - plat_paths = map (lambda x: x + '-' + config.platform, paths) + paths = [(platformSpecific, basepath + comp + vers + ws + plat) + for (platformSpecific, plat) in [(1, '-' + config.platform), + (0, '')] + for ws in ['-ws-' + config.wordsize, ''] + for comp in ['-' + config.compiler_type, ''] + for vers in ['-' + config.compiler_maj_version, '']] dir = glob.glob(basepath + '*') dir = map (lambda d: normalise_slashes_(d), dir) - for f in plat_paths: - if f in dir: - return (1,f) - - for f in paths: + for (platformSpecific, f) in paths: if f in dir: - return (0,f) + return (platformSpecific,f) return (0, basepath) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
