source: src/tests/pybin/test_run.py @ 0ad0c55

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 0ad0c55 was 0ad0c55, checked in by Thierry Delisle <tdelisle@…>, 4 years ago

Updated tests script to handle folders

  • Property mode set to 100644
File size: 891 bytes
Line 
1import os
2
3from pybin.tools import *
4
5
6# Test class that defines what a test is
7class Test:
8        def __init__(self):
9                self.name = ''
10                self.path = ''
11                self.arch = ''
12
13        def toString(self):
14                return "{:25s} ({:5s} {:s})".format( self.name, self.arch if self.arch else "Any", self.target() )
15
16        def prepare(self, dry_run):
17                sh("mkdir -p %s" % os.path.join(self.path, '.err'), dry_run)
18                sh("mkdir -p %s" % os.path.join(self.path, '.out'), dry_run)
19                sh("mkdir -p %s" % os.path.join(self.path, '.in' ), dry_run)
20
21        def expect_file(self):
22                return ("%s/.expect/%s.txt" % (self.path, self.name))
23
24        def error_file(self):
25                return ("%s/.err/%s.log"    % (self.path, self.name))
26
27        def output_file(self):
28                return ("%s/.out/%s.log"    % (self.path, self.name))
29
30        def input_file(self):
31                return ("%s/.in/%s.txt"     % (self.path, self.name))
32
33        def target(self):
34                return os.path.join(self.path, self.name)
Note: See TracBrowser for help on using the repository browser.