Changeset 4141


Ignore:
Timestamp:
Sep 8, 2014, 8:47:57 PM (4 years ago)
Author:
linmengl
Message:

bug fix in perf.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/performance/perf.py

    r4140 r4141  
    5353    if m:
    5454        if int(m.group(1)) != truth_number:
    55             print "Correctness check error: {0} : {1}".format(file_des, exp_des)
    56         return
     55            print "Expect {0}, but get {1}".format(truth_number, found_string)
     56            return False
     57        return True
    5758
    5859    #regex for grep
     
    6061    if m:
    6162        if int(m.group(1)) != truth_number:
    62             print "Correctness check error: {0} : {1}".format(file_des, exp_des)
    63         return
     63            print "Expect {0}, but get {1}".format(truth_number, found_string)
     64            return False
     65        return True
    6466
    6567    print "Warning: '{0}' and '{1}' may not match".format(found_string, truth_number)
     68    return True
    6669
    6770
     
    158161    res_file = open(outputpath + '/output.txt')
    159162    found = res_file.read().strip()
    160     check_count_result(found, ground_truth[file_des][exp_des])
     163    if not check_count_result(found, ground_truth[file_des][exp_des]):
     164        print "Correctness check error: {0} : {1}".format(file_des, exp_des)
    161165
    162166    return int(output[startpos:endpos])
Note: See TracChangeset for help on using the changeset viewer.