Commit 8d699879 by Miodrag Milanovic

Take care of execution time

parent 4178321f
......@@ -8,6 +8,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
......
......@@ -8,6 +8,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
......
......@@ -14,6 +14,7 @@ done
case "$2" in
sim)
touch ../../.start
iverilog_cmd="$iverilog_cmd $rtl_files"
;;
falsify)
......
......@@ -8,6 +8,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
......
......@@ -8,6 +8,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
......
......@@ -8,6 +8,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
......
......@@ -8,6 +8,7 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
# cases where 'syntax error' or other errors are expected
if [ "$1" = "issue_00089" ] ||\
......
#!/usr/bin/env python3
import os
import os, time
from pathlib import Path
def getListOfFiles(dirName):
......@@ -26,6 +26,8 @@ def main():
failures = dict()
total_errors = 0
total_failures = 0
min_start_time = time.time()
max_end_time = 0
for elem in listOfFiles :
st = elem.split('/')
testsuit = st[1]
......@@ -37,6 +39,8 @@ def main():
failures[testsuit] = 0
casenumber[testsuit] += 1
status = open(elem, 'r').read().strip()
min_start_time = min(min_start_time, os.path.getmtime(os.path.join(os.path.dirname(elem),'.start')))
max_end_time = max(max_end_time, os.path.getmtime(os.path.join(os.path.dirname(elem),'.stamp')))
if (status=='ERROR'):
errors[testsuit] += 1
total_errors += 1
......@@ -46,7 +50,7 @@ def main():
# Creating report
with open("report.xml", "w") as f:
print('<?xml version="1.0" encoding="UTF-8"?>', file=f)
print('<testsuites disabled="0" errors="%d" failures="%d" tests="%d" time="%d">' % (total_errors, total_failures, len(listOfFiles), 0), file=f)
print('<testsuites disabled="0" errors="%d" failures="%d" tests="%d" time="%d">' % (total_errors, total_failures, len(listOfFiles), max_end_time - min_start_time), file=f)
for suite in testsuits:
print(' <testsuite disabled="0" errors="%d" failures="%d" name="%s" skipped="0" tests="%d" time="%d">' % (errors[suite], failures[suite], suite, casenumber[suite], 0), file=f)
for elem in listOfFiles :
......@@ -57,7 +61,8 @@ def main():
testcase = st[-1].replace('.status','')
casenumber[testsuit] += 1
status = open(elem, 'r').read().strip()
print(' <testcase classname="%s.%s" name="%s" status="%s" time="%d">' % (testsuit, st[2].replace('.status',''), testcase, status, 0), file=f)
print(' <testcase classname="%s.%s" name="%s" status="%s" time="%d">' % (testsuit, st[2].replace('.status',''), testcase, status,
os.path.getmtime(os.path.join(os.path.dirname(elem),'.stamp')) - os.path.getmtime(os.path.join(os.path.dirname(elem),'.start'))), file=f)
if (status=='ERROR'):
print(' <error message="%s" type="%s"/>' % (status, status), file=f)
if (status=='FAIL'):
......
......@@ -11,6 +11,8 @@ rm -rf $1/work_$2
mkdir $1/work_$2
cd $1/work_$2
touch .start
if [ "$2" = "verify" ]; then
iverilog -o testbench ../testbench.v ../../common.v ../top.v
if [ $? != 0 ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment