Patchwork [RFC,6/6] tests: Workaround gcov being unable to open .gcda file

login
register
mail settings
Submitter Andreas Färber
Date Jan. 26, 2013, 11:45 a.m.
Message ID <1359200715-27222-7-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/215906/
State New
Headers show

Comments

Andreas Färber - Jan. 26, 2013, 11:45 a.m.
Resolve the following error:

  hw/tmp105.gcda:cannot open data file, assuming not executed

by adding a sleep before running gcov after the qtest cases.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/Makefile |    2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
Eduardo Habkost - Jan. 28, 2013, 5:26 p.m.
On Sat, Jan 26, 2013 at 12:45:15PM +0100, Andreas Färber wrote:
> Resolve the following error:
> 
>   hw/tmp105.gcda:cannot open data file, assuming not executed
> 
> by adding a sleep before running gcov after the qtest cases.

Do you understand why exactly this happens?

> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  tests/Makefile |    2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index 442b286..3182dca 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -153,7 +153,7 @@ $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y)
>  	$(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
>  	$(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
>  		gtester $(GTESTER_OPTIONS) -m=$(SPEED) $(check-qtest-$*-y),"GTESTER $@")
> -	$(if $(CONFIG_GCOV),@for f in $(gcov-files-$*-y); do \
> +	$(if $(CONFIG_GCOV),@sleep 1; for f in $(gcov-files-$*-y); do \
>  	  echo Gcov report for $$f:;\
>  	  $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \
>  	done,)
> -- 
> 1.7.10.4
> 
>

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 442b286..3182dca 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -153,7 +153,7 @@  $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y)
 	$(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
 	$(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
 		gtester $(GTESTER_OPTIONS) -m=$(SPEED) $(check-qtest-$*-y),"GTESTER $@")
-	$(if $(CONFIG_GCOV),@for f in $(gcov-files-$*-y); do \
+	$(if $(CONFIG_GCOV),@sleep 1; for f in $(gcov-files-$*-y); do \
 	  echo Gcov report for $$f:;\
 	  $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \
 	done,)