Ignore:
Timestamp:
Dec 16, 2016, 1:13:10 PM (3 years ago)
Author:
lindanl
Message:

Fix directory issue for editd test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/QA/editd/run_all.py

    r5222 r5225  
    11from subprocess import *
    22from string import *
     3import sys, os, optparse
    34
    45if __name__ == "__main__":
     6        option_parser = optparse.OptionParser(usage='python %prog [options] <grep_executable>', version='1.0')
     7        option_parser.add_option('-e', '--exec_dir', dest = 'exec_dir', type='string', default='.', help = 'executable directory')
     8        options, args = option_parser.parse_args(sys.argv[1:])
     9        print options.exec_dir
    510        out_f = open('OutputFiles/reads2', 'w')
    611        expected_f = open('ExpectedOutput/reads2', 'r')
    7         call(['../../editd-build/editd', '-f', 'TestFiles/reads2', 'chr.fa', '-display'], stdout=out_f)
     12        call([options.exec_dir+'/editd', '-f', 'TestFiles/reads2', 'chr.fa', '-display'], stdout=out_f)
    813        if open('OutputFiles/reads2', 'r').read()==expected_f.read():
    9                 print 'Succeeded'
     14                print 'Edit Distance test succeeded.'
    1015        else:
    11                 print 'Failed' 
     16                print 'Edit Distance test failed.'     
     17                exit(1)
Note: See TracChangeset for help on using the changeset viewer.