Changeset 0300979
- Timestamp:
- Jul 27, 2018, 7:24:28 AM (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:
- dccad9f
- Parents:
- b9c04946 (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. - Location:
- src/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/pybin/test_run.py
rb9c04946 r0300979 28 28 29 29 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()) ) 33 32 34 33 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)) ) 36 35 37 36 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) ) 39 38 40 39 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) ) 42 41 43 42 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) ) 45 44 46 45 def target_output(self): … … 48 47 49 48 def target(self): 50 return os.path. join(self.path, self.name)49 return os.path.normpath( os.path.join(self.path, self.name) ) 51 50 52 51 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) ) 54 53 55 54 @classmethod … … 61 60 test = Test() 62 61 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) 64 63 test.arch = settings.arch.toString() if settings.arch.cross_compile else '' 65 64 return test -
src/tests/pybin/tools.py
rb9c04946 r0300979 57 57 except TypeError: 58 58 sh("rm -f %s > /dev/null 2>&1" % files ) 59 60 # Create 1 or more directory 61 def 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) ) 59 67 60 68 def chdir( dest = __main__.__file__ ): -
src/tests/test.py
rb9c04946 r0300979 64 64 testname = canonicalPath( testname ) 65 65 if Test.valid_name(testname): 66 found = [test for test in allTests if test.target() == testname]66 found = [test for test in allTests if canonicalPath( test.target() ) == testname] 67 67 tests.append( found[0] if len(found) == 1 else Test.from_target(testname) ) 68 68 else : … … 137 137 test.prepare() 138 138 139 # remove any outputs from the previous tests to prevent side effects140 rm( (out_file, err_file, exe_file) )141 142 139 # build, skipping to next test on error 143 140 before = time.time()
Note: See TracChangeset
for help on using the changeset viewer.