summaryrefslogtreecommitdiff
path: root/tests/vloghtb
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-27 21:13:23 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-27 21:31:18 +0200
commit8b0f50792c404d70ae91e623f80c4e7f06d39429 (patch)
tree04064e624e03971675ea8c9fdb8d7ad906408f86 /tests/vloghtb
parentc4bdba78cb88df6628d975aad7a92c8cebc5d95f (diff)
Added techmap -extern
Diffstat (limited to 'tests/vloghtb')
-rw-r--r--tests/vloghtb/common.sh26
-rw-r--r--tests/vloghtb/test_mapopt.sh3
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/vloghtb/common.sh b/tests/vloghtb/common.sh
index 1c60d794..3f7fc258 100644
--- a/tests/vloghtb/common.sh
+++ b/tests/vloghtb/common.sh
@@ -8,6 +8,32 @@ log_fail()
printf "%-15s %s %s %s\n" "$1" "$2" "`printf "%20s" "$2" | tr -d a-zA-Z0-9_ | tr ' ' .`" "FAIL."
}
+test_autotest()
+{
+ # Usage:
+ # test_autotest <test_name> <mod_name> <vlog_file> <autotest_cmd_line_options>
+
+ test_name="$1"
+ mod_name="$2"
+ vlog_file="$3"
+ shift 3
+
+ mkdir -p log_test_$test_name
+ rm -rf log_test_$test_name/$mod_name.*
+
+ cp $vlog_file log_test_$test_name/$mod_name.v
+
+ cd log_test_$test_name
+ if bash ../../tools/autotest.sh "$@" $mod_name.v > /dev/null 2>&1; then
+ mv $mod_name.out $mod_name.txt
+ log_pass test_$test_name $mod_name
+ else
+ log_fail test_$test_name $mod_name
+ fi
+
+ cd ..
+}
+
test_equiv()
{
# Usage:
diff --git a/tests/vloghtb/test_mapopt.sh b/tests/vloghtb/test_mapopt.sh
index ad8b3ef6..ba39adb3 100644
--- a/tests/vloghtb/test_mapopt.sh
+++ b/tests/vloghtb/test_mapopt.sh
@@ -6,6 +6,7 @@ source common.sh
f=$1
n=$(basename ${f%.v})
-test_equiv mapopt "opt -fine; techmap; opt" "-set-def-inputs" $n $f
+test_equiv mapopt_1 "opt -fine; techmap; opt" "-set-def-inputs" $n $f
+test_autotest mapopt_2 $n $f -p "opt; techmap -extern; opt"
exit 0