Changeset 4e1572f for src/tests/pybin


Ignore:
Timestamp:
Jul 26, 2018, 5:21:03 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
dccad9f
Parents:
56de5932 (diff), a95c117 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/tests/pybin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/pybin/test_run.py

    r56de5932 r4e1572f  
    2828
    2929        def prepare(self):
    30                 sh("mkdir -p %s" % os.path.join(self.path, '.err'))
    31                 sh("mkdir -p %s" % os.path.join(self.path, '.out'))
    32                 sh("mkdir -p %s" % os.path.join(self.path, '.in' ))
     30                mkdir( (self.output_log(), self.error_log(), self.input()            ) )
     31                rm   ( (self.output_log(), self.error_log(), self.target_executable()) )
    3332
    3433        def expect(self):
    35                 return ("%s.expect/%s%s.txt" % (os.path.join(settings.SRCDIR, self.path), self.name, '' if not self.arch else ".%s" % self.arch))
     34                return os.path.normpath( os.path.join(settings.SRCDIR  , self.path, ".expect", "%s%s.txt" % (self.name,'' if not self.arch else ".%s" % self.arch)) )
    3635
    3736        def error_log(self):
    38                 return ("%s.err/%s.log"    % (os.path.join(settings.BUILDDIR, self.path), self.name))
     37                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, ".err"   , "%s.log" % self.name) )
    3938
    4039        def output_log(self):
    41                 return ("%s.out/%s.log"    % (os.path.join(settings.BUILDDIR, self.path), self.name))
     40                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, ".out"   , "%s.log" % self.name) )
    4241
    4342        def input(self):
    44                 return ("%s.in/%s.txt"     % (os.path.join(settings.SRCDIR, self.path), self.name))
     43                return os.path.normpath( os.path.join(settings.SRCDIR  , self.path, ".in"    , "%s.txt" % self.name) )
    4544
    4645        def target_output(self):
     
    4847
    4948        def target(self):
    50                 return os.path.join(self.path, self.name)
     49                return os.path.normpath( os.path.join(self.path, self.name) )
    5150
    5251        def target_executable(self):
    53                 return os.path.join(settings.BUILDDIR, self.path, self.name)
     52                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, self.name) )
    5453
    5554        @classmethod
     
    6160                test = Test()
    6261                test.name = os.path.basename(target)
    63                 test.path = os.path.dirname (target)
     62                test.path = os.path.relpath (os.path.dirname(target), settings.SRCDIR)
    6463                test.arch = settings.arch.toString() if settings.arch.cross_compile else ''
    6564                return test
  • src/tests/pybin/tools.py

    r56de5932 r4e1572f  
    5757        except TypeError:
    5858                sh("rm -f %s > /dev/null 2>&1" % files )
     59
     60# Create 1 or more directory
     61def mkdir( files ):
     62        try:
     63                for file in files:
     64                        sh("mkdir -p %s" % os.path.dirname(file) )
     65        except TypeError:
     66                sh("mkdir -p %s" % os.path.dirname(files) )
    5967
    6068def chdir( dest = __main__.__file__ ):
Note: See TracChangeset for help on using the changeset viewer.