Skip to content

Commit

Permalink
report_results.csh: add html anchors to hashes and machines
Browse files Browse the repository at this point in the history
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 (<h4>) so that an HTML anchor is
automatically created, which makes it easier to link directly to specific
hash from a pull request.
  • Loading branch information
phil-blain committed Dec 18, 2019
1 parent 73fb4d0 commit 36083d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions configuration/scripts/tests/report_results.csh
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,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 |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
Expand All @@ -308,7 +309,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
Expand All @@ -318,10 +319,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 |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
Expand All @@ -331,7 +333,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
Expand Down

0 comments on commit 36083d7

Please sign in to comment.