Ignore:
Timestamp:
Mar 27, 2019, 2:44:34 PM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1241851, ce3d305
Parents:
86fb8f2
Message:

Tests no longer use subprocess.run(shell=True), which solves leak process problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    r86fb8f2 ra45fc7b  
    11import os
     2import subprocess
    23import sys
    34from . import tools
     
    8283        def __init__(self, value):
    8384                self.string = "debug" if value else "no debug"
    84                 self.flags  = """DEBUG_FLAGS="%s" """ % ("-debug -O0" if value else "-nodebug -O2")
     85                self.flags  = """DEBUG_FLAGS=%s""" % ("-debug -O0" if value else "-nodebug -O2")
    8586
    8687class Install:
    8788        def __init__(self, value):
    8889                self.string = "installed" if value else "in-tree"
    89                 self.flags  = """INSTALL_FLAGS="%s" """ % ("" if value else "-in-tree")
     90                self.flags  = """INSTALL_FLAGS=%s""" % ("" if value else "-in-tree")
    9091
    9192class Timeouts:
     
    114115        dry_run      = options.dry_run
    115116        generating   = options.regenerate_expected
    116         make         = 'make'
     117        make         = ['make']
    117118        debug        = Debug(options.debug)
    118119        install      = Install(options.install)
     
    125126        global make
    126127
    127         make = "make" if not force else ("make -j%i" % jobs)
     128        make = ['make'] if not force else ['make', "-j%i" % jobs]
    128129
    129130def validate():
    130131        errf = os.path.join(BUILDDIR, ".validate.err")
    131         make_ret, _ = tools.make( ".validate", error_file = errf, redirects  = "2> /dev/null 1> /dev/null", )
     132        make_ret, out = tools.make( ".validate", error_file = errf, output=subprocess.DEVNULL, error=subprocess.DEVNULL )
    132133        if make_ret != 0:
    133134                with open (errf, "r") as myfile:
Note: See TracChangeset for help on using the changeset viewer.