From dc0b8ced0b6cf0cfc73a2ec1957c209b962f2248 Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Mon, 9 Dec 2019 10:26:32 -0500 Subject: [PATCH] report_results.csh: add html anchors to hashes and machines The hashes and machine names inserted by the script in the different pages of the Test-Results wiki are formatted as bold (`** ${hash} **:`). Change this to level 4 HTML titles (

) so that an HTML anchor is automatically created, which makes it easier to link directly to specific hash from a pull request. --- configuration/scripts/tests/report_results.csh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/configuration/scripts/tests/report_results.csh b/configuration/scripts/tests/report_results.csh index 68ea6179d..b6540c2e3 100755 --- a/configuration/scripts/tests/report_results.csh +++ b/configuration/scripts/tests/report_results.csh @@ -255,10 +255,11 @@ end #===================== set chk = 0 -if (-e ${hashfile}) set chk = `grep "\*\*${hash}" ${hashfile} | wc -l` +if (-e ${hashfile}) set chk = `grep "#### ${hash}" ${hashfile} | wc -l` if ($chk == 0) then +# Note: the line '#### ${hash}' is not a comment since it's in the here doc cat >! ${hashfile} << EOF -**${hash}** : +#### ${hash} | machine | compiler | version | date | test fail | comp fail | total | | ------ | ------ | ------ | ------ | ------ | ------ | ------ | @@ -268,7 +269,7 @@ EOF if (-e ${hashfile}.prev) cat ${hashfile}.prev >> ${hashfile} else - set oline = `grep -n "\*\*${hash}" ${hashfile} | head -1 | cut -d : -f 1` + set oline = `grep -n "#### ${hash}" ${hashfile} | head -1 | cut -d : -f 1` @ nline = ${oline} + 3 sed -i "$nline a | ${mach} | ${compiler} | ${vers} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${hashfile} endif @@ -278,10 +279,11 @@ endif #===================== set chk = 0 -if (-e ${machfile}) set chk = `grep "\*\*${mach}" ${machfile} | wc -l` +if (-e ${machfile}) set chk = `grep "#### ${mach}" ${machfile} | wc -l` if ($chk == 0) then +# Note: the line '#### ${mach}' is not a comment since it's in the here doc cat >! ${machfile} << EOF -**${mach}** : +#### ${mach} | version | hash | compiler | date | test fail | comp fail | total | | ------ | ------ | ------ | ------ | ------ | ------ | ------ | @@ -291,7 +293,7 @@ EOF if (-e ${machfile}.prev) cat ${machfile}.prev >> ${machfile} else - set oline = `grep -n "\*\*${mach}" ${machfile} | head -1 | cut -d : -f 1` + set oline = `grep -n "#### ${mach}" ${machfile} | head -1 | cut -d : -f 1` @ nline = ${oline} + 3 sed -i "$nline a | ${vers} | ${shhash} | ${compiler} | ${cdat} | ${tcolor} ${tfail}, ${tunkn} | ${rcolor} ${rfail}, ${rothr} | [${ttotl}](${ofile}) | " ${machfile} endif