Changeset 28582b2 for tests/pybin
- Timestamp:
- Aug 6, 2018, 2:05:02 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- ff593a3
- Parents:
- 37fe352
- Location:
- tests/pybin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/settings.py
r37fe352 r28582b2 3 3 import os 4 4 import sys 5 import tools 5 6 6 7 try : … … 85 86 86 87 make = "make" if not force else ("make -j%i" % jobs) 88 89 def validate(): 90 make_ret, _ = tools.make( ".validate", error_file = ".validate.err", redirects = "2> /dev/null 1> /dev/null", ) 91 if make_ret != 0: 92 with open (".validate.err", "r") as myfile: 93 error=myfile.read() 94 print('ERROR: Invalid configuration', file=sys.stderr) 95 print(" verify returned : \n%s" % error, file=sys.stderr) 96 tools.rm("%s/.validate.err" % BUILDDIR) 97 sys.exit(1) 98 99 tools.rm("%s/.validate.err" % BUILDDIR) -
tests/pybin/tools.py
r37fe352 r28582b2 52 52 # Remove 1 or more files silently 53 53 def rm( files ): 54 try: 54 if isinstance( files, basestring ): 55 sh("rm -f %s > /dev/null 2>&1" % files ) 56 else: 55 57 for file in files: 56 58 sh("rm -f %s > /dev/null 2>&1" % file ) 57 except TypeError:58 sh("rm -f %s > /dev/null 2>&1" % files )59 59 60 60 # Create 1 or more directory 61 61 def mkdir( files ): 62 try: 62 if isinstance( files, basestring ): 63 sh("mkdir -p %s" % os.path.dirname(files) ) 64 else: 63 65 for file in files: 64 66 sh("mkdir -p %s" % os.path.dirname(file) ) 65 except TypeError: 66 sh("mkdir -p %s" % os.path.dirname(files) ) 67 67 68 68 69 def chdir( dest = __main__.__file__ ):
Note: See TracChangeset
for help on using the changeset viewer.