Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    rafe8882 r47c1928  
    66
    77try :
    8         testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0])))
    9         sys.path.append(testpath)
     8        sys.path.append(os.getcwd())
    109        import config
    1110
    1211        SRCDIR = os.path.abspath(config.SRCDIR)
    1312        BUILDDIR = os.path.abspath(config.BUILDDIR)
    14         os.chdir(testpath)
    15 
    1613except:
    1714        print('ERROR: missing config.py, re-run configure script.', file=sys.stderr)
     
    9188                self.flags  = """INSTALL_FLAGS="%s" """ % ("" if value else "-in-tree")
    9289
    93 class Timeouts:
    94         def __init__(self, ts, tg):
    95                 self.single = Timeouts.check(ts)
    96                 self.total  = Timeouts.check(tg)
    97 
    98         @classmethod
    99         def check(_, value):
    100                 if value < 1:
    101                         print("Timeouts must be at least 1 second", file=sys.stderr)
    102                         sys.exit(1)
    103 
    104                 return value
    105 
    10690def init( options ):
    10791        global arch
     
    11195        global debug
    11296        global install
    113         global timeout
    11497
    11598        dry_run    = options.dry_run
     
    119102        install    = Install(options.install)
    120103        arch       = Architecture(options.arch)
    121         timeout    = Timeouts(options.timeout, options.global_timeout)
    122104
    123105
     
    128110
    129111def validate():
    130         errf = os.path.join(BUILDDIR, ".validate.err")
    131         make_ret, _ = tools.make( ".validate", error_file = errf, redirects  = "2> /dev/null 1> /dev/null", )
     112        make_ret, _ = tools.make( ".validate", error_file = ".validate.err", redirects  = "2> /dev/null 1> /dev/null", )
    132113        if make_ret != 0:
    133                 with open (errf, "r") as myfile:
     114                with open (".validate.err", "r") as myfile:
    134115                        error=myfile.read()
    135116                print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr)
    136117                print("       verify returned : \n%s" % error, file=sys.stderr)
    137                 tools.rm(errf)
     118                tools.rm("%s/.validate.err" % BUILDDIR)
    138119                sys.exit(1)
    139120
    140         tools.rm(errf)
     121        tools.rm("%s/.validate.err" % BUILDDIR)
Note: See TracChangeset for help on using the changeset viewer.