diff options
author | Unai Martinez-Corral <38422348+umarcor@users.noreply.github.com> | 2021-06-26 19:40:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 20:40:25 +0200 |
commit | b4d4d9abb322ed0807d2ba0888e73820499aa338 (patch) | |
tree | b980d379e95034ee72aac29955833e1ef0dfd912 /testsuite/gna | |
parent | 111fe055b2f0f3a0225d2553cf739572d691a14d (diff) | |
download | ghdl-b4d4d9abb322ed0807d2ba0888e73820499aa338.tar.gz ghdl-b4d4d9abb322ed0807d2ba0888e73820499aa338.tar.bz2 ghdl-b4d4d9abb322ed0807d2ba0888e73820499aa338.zip |
Codacy issues, Travis cleanup and update ghdl.texi (#1807)
* ghw: fix memleaks reported by codacy
* ghw: printf issues and style (GNU indent)
* testsuite/gna: minor printf issues
* testsuite: fix issues reported by codacy
* scripts/ci-run: clean travis stuff (deprecated)
* scripts: fix issues reported by codacy
* doc/Makefile: add .PHONY
* doc: update ghdl.texi
* testsuite/synth: use synth_tb
Diffstat (limited to 'testsuite/gna')
-rwxr-xr-x | testsuite/gna/bug097/testsuite.sh | 2 | ||||
-rwxr-xr-x | testsuite/gna/issue1067/testsuite.sh | 18 | ||||
-rwxr-xr-x | testsuite/gna/issue1206/testsuite.sh | 2 | ||||
-rw-r--r-- | testsuite/gna/issue1256/vpi_plugin.c | 6 | ||||
-rw-r--r-- | testsuite/gna/issue237/vpi1.c | 2 |
5 files changed, 14 insertions, 16 deletions
diff --git a/testsuite/gna/bug097/testsuite.sh b/testsuite/gna/bug097/testsuite.sh index c66369565..34e1f8cd8 100755 --- a/testsuite/gna/bug097/testsuite.sh +++ b/testsuite/gna/bug097/testsuite.sh @@ -3,7 +3,7 @@ . ../../testenv.sh if c_compiler_is_available; then - if [ -z $CC ]; then + if [ -z "$CC" ]; then CC="gcc" fi diff --git a/testsuite/gna/issue1067/testsuite.sh b/testsuite/gna/issue1067/testsuite.sh index 28b04a32f..51ebb01b9 100755 --- a/testsuite/gna/issue1067/testsuite.sh +++ b/testsuite/gna/issue1067/testsuite.sh @@ -4,17 +4,15 @@ export GHDL_STD_FLAGS=--std=08 -for f in top; do - analyze $f.vhdl - elab $f +analyze top.vhdl +elab top - if ghdl_has_feature $f ghw; then - simulate $f --dump-rti - simulate $f --wave=$f.ghw - ghw_diff "$f" - rm -f "$f".txt "$f".ghw - fi -done +if ghdl_has_feature top ghw; then + simulate top --dump-rti + simulate top --wave=top.ghw + ghw_diff "top" + rm -f "top".txt "top".ghw +fi clean diff --git a/testsuite/gna/issue1206/testsuite.sh b/testsuite/gna/issue1206/testsuite.sh index 09532b329..c9cb305e5 100755 --- a/testsuite/gna/issue1206/testsuite.sh +++ b/testsuite/gna/issue1206/testsuite.sh @@ -5,7 +5,7 @@ cd $(dirname "$0") . ../../testenv.sh if $GHDL --help | grep -q -e --link; then - if [ -z $CC ]; then + if [ -z "$CC" ]; then CC="gcc" fi diff --git a/testsuite/gna/issue1256/vpi_plugin.c b/testsuite/gna/issue1256/vpi_plugin.c index 6771bc7d6..8eb2a830f 100644 --- a/testsuite/gna/issue1256/vpi_plugin.c +++ b/testsuite/gna/issue1256/vpi_plugin.c @@ -82,9 +82,9 @@ static PLI_INT32 rw_cb(p_cb_data data){ if(iteration > 0) { vpi_get_value(enum_decoded_handle, &val); val.format = vpiBinStrVal; - printf("enum decoded = %s iteration %d \n", val.value.str, iteration); + printf("enum decoded = %s iteration %u \n", val.value.str, iteration); vpi_get_value(enum_out_handle, &val); - printf("enum out = %s iteration %d \n", val.value.str, iteration); + printf("enum out = %s iteration %u \n", val.value.str, iteration); val.format = vpiBinStrVal; } @@ -92,7 +92,7 @@ static PLI_INT32 rw_cb(p_cb_data data){ if(iteration < STOP_ITERATION) { val.value.str = (char *) input_values[iteration]; - printf("enum in <= %s iteration %d \n", val.value.str, iteration); + printf("enum in <= %s iteration %u \n", val.value.str, iteration); vpi_put_value(enum_in_handle, &val, NULL, vpiNoDelay); register_cb(delay_ro_cb, cbAfterDelay, 1); } else { diff --git a/testsuite/gna/issue237/vpi1.c b/testsuite/gna/issue237/vpi1.c index 873dc25bc..ab65886b0 100644 --- a/testsuite/gna/issue237/vpi1.c +++ b/testsuite/gna/issue237/vpi1.c @@ -82,7 +82,7 @@ vpi_clk_proc (struct t_cb_data *cb) return 0; cycle++; - printf ("clock cycle %d\n", cycle); + printf ("clock cycle %u\n", cycle); if (cycle == 2) show_value ("test_array.mem_down"); |