Changeset 202ad72


Ignore:
Timestamp:
Aug 15, 2018, 11:18:53 AM (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:
8e485801
Parents:
7caea53
Message:

Implemented dry-run for output fixing and fix outputs on regenerate as well

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/tools.py

    r7caea53 r202ad72  
    3636
    3737def is_ascii(fname):
     38        if settings.dry_run:
     39                print("is_ascii: %s" % fname)
     40                return True
     41
    3842        if not os.path.isfile(fname):
    3943                return False
     
    132136# helper function to replace patterns in a file
    133137def file_replace(fname, pat, s_after):
     138        if settings.dry_run:
     139                print("replacing '%s' with '%s' in %s" % (pat, s_after, fname))
     140                return
     141
    134142        file = fileinput.FileInput(fname, inplace=True, backup='.bak')
    135143        for line in file:
  • tests/test.py

    r7caea53 r202ad72  
    172172
    173173        if retcode == 0:
     174                fixoutput(out_file)
    174175                if settings.generating :
    175176                        # if we are ounly generating the output we still need to check that the test actually exists
     
    182183                else :
    183184                        # fetch return code and error from the diff command
    184                         fixoutput(out_file)
    185185                        retcode, error = diff(cmp_file, out_file)
    186186
Note: See TracChangeset for help on using the changeset viewer.