diff options
author | Brian Drummond | 2013-12-29 23:26:52 +0000 |
---|---|---|
committer | Brian Drummond | 2013-12-29 23:26:52 +0000 |
commit | 88b807bbf26b2335db8929b1b5202f9cce83704a (patch) | |
tree | 33dffcb6786e73e352824403aaf449315bf6c99a | |
parent | 5f8c9462de0347b816cb015ff31772d3e06e9cf2 (diff) | |
download | ghdl-88b807bbf26b2335db8929b1b5202f9cce83704a.tar.gz ghdl-88b807bbf26b2335db8929b1b5202f9cce83704a.tar.bz2 ghdl-88b807bbf26b2335db8929b1b5202f9cce83704a.zip |
Fix bug in get_entities, add STOP <time> to testsuite script
-rw-r--r-- | testsuite/get_entities.adb | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | testsuite/vests/testsuite.sh | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/testsuite/get_entities.adb b/testsuite/get_entities.adb index a874f22..b34be08 100644 --- a/testsuite/get_entities.adb +++ b/testsuite/get_entities.adb @@ -55,7 +55,7 @@ procedure get_entities is end if; end Get_End; - type State_Type is (Idle, Have_Entity, Have_Name, In_Entity, Have_End); + type State_Type is (Idle, Have_Entity, Have_Name, In_Entity); State : State_Type; Top_Level_Entity : Boolean; @@ -194,14 +194,12 @@ procedure get_entities is if Port > 0 then Top_Level_Entity := False; end if; - if End_Pos > 0 then - State := Have_End; - end if; - when Have_End => - if Top_Level_Entity then -- write name to stdout - Last_Entity := Name; + if End_Pos > 0 then + if Top_Level_Entity then -- write name to stdout + Last_Entity := Name; + end if; + State := Idle; end if; - State := Idle; end Case; exit when End_Of_File (File); end; diff --git a/testsuite/vests/testsuite.sh b/testsuite/vests/testsuite.sh index c5abd52..4cd6e97 100755..100644 --- a/testsuite/vests/testsuite.sh +++ b/testsuite/vests/testsuite.sh @@ -42,6 +42,7 @@ handle_test () file=$1 shift args="$common_args" + stop="" entity="" # handle options. for arg; do @@ -56,6 +57,9 @@ handle_test () OUTPUT=*) output=$arg; ;; + STOP=*) + stop=`echo $arg | sed -e s/STOP=/--stop-time=/`; + ;; ENTITY=*) entity=`echo $arg | sed -e s/ENTITY=//` ;; @@ -82,7 +86,7 @@ handle_test () if [ "x$entity" = "x" ]; then echo "Cannot elaborate or run : no top level entity"; else - cmd="$GHDL --elab-run $entity --assert-level=error"; + cmd="$GHDL --elab-run $entity $stop --assert-level=error"; echo "$cmd"; eval $cmd; fi @@ -107,7 +111,7 @@ handle_test () cmd="$GHDL -e $entity"; echo "$cmd"; eval $cmd; - cmd="$GHDL -r $entity --expect-failure --assert-level=error"; + cmd="$GHDL -r $entity $stop --expect-failure --assert-level=error"; echo "$cmd"; eval $cmd; fi |