fate: Provide "unknown" configuration values as fallback

Message ID 20180215135228.29431-1-diego@biurrun.de
State Superseded
Headers show
Series
  • fate: Provide "unknown" configuration values as fallback
Related show

Commit Message

Diego Biurrun Feb. 15, 2018, 1:52 p.m.
If configure fails before config.fate is generated, these values will be
used and thus the generated report will be accepted by the FATE server.
---

This will address the issues I have had with Martin's fate instances.

 tests/fate.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Martin Storsjö Feb. 15, 2018, 2:04 p.m. | #1
On Thu, 15 Feb 2018, Diego Biurrun wrote:

> If configure fails before config.fate is generated, these values will be
> used and thus the generated report will be accepted by the FATE server.
> ---
>
> This will address the issues I have had with Martin's fate instances.
>
> tests/fate.sh | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/fate.sh b/tests/fate.sh
> index c93e20a464..03a3728006 100755
> --- a/tests/fate.sh
> +++ b/tests/fate.sh
> @@ -84,7 +84,10 @@ clean(){
> report(){
>     date=$(date -u +%Y%m%d%H%M%S)
>     echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
> -    cat ${build}/avbuild/config.fate ${build}/tests/data/fate/*.rep >> report 2> /dev/null
> +    test -e ${build}/avbuild/config.fate &&
> +        cat ${build}/avbuild/config.fate >> report 2> /dev/null ||
> +        echo config:unknown:unknown:unknown:unknown:unknown:unknown >> report 2> /dev/null
> +    cat ${build}/tests/data/fate/*.rep >> report 2> /dev/null
>     test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
> }
> 
> -- 
> 2.11.0

Ok with me.

// Martin

Patch

diff --git a/tests/fate.sh b/tests/fate.sh
index c93e20a464..03a3728006 100755
--- a/tests/fate.sh
+++ b/tests/fate.sh
@@ -84,7 +84,10 @@  clean(){
 report(){
     date=$(date -u +%Y%m%d%H%M%S)
     echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report
-    cat ${build}/avbuild/config.fate ${build}/tests/data/fate/*.rep >> report 2> /dev/null
+    test -e ${build}/avbuild/config.fate &&
+        cat ${build}/avbuild/config.fate >> report 2> /dev/null ||
+        echo config:unknown:unknown:unknown:unknown:unknown:unknown >> report 2> /dev/null
+    cat ${build}/tests/data/fate/*.rep >> report 2> /dev/null
     test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv
 }