diff options
-rw-r--r-- | src/nix-log2xml/local.mk | 3 | ||||
-rw-r--r-- | src/nix-log2xml/log2html.xsl | 83 | ||||
-rw-r--r-- | src/nix-log2xml/mark-errors.xsl | 24 | ||||
-rw-r--r-- | src/nix-log2xml/treebits.js | 50 | ||||
-rw-r--r-- | tests/common.sh.in | 1 | ||||
-rw-r--r-- | tests/logging.sh | 9 |
6 files changed, 0 insertions, 170 deletions
diff --git a/src/nix-log2xml/local.mk b/src/nix-log2xml/local.mk index 46eb2e02ca64..09c848c17f40 100644 --- a/src/nix-log2xml/local.mk +++ b/src/nix-log2xml/local.mk @@ -3,6 +3,3 @@ programs += nix-log2xml nix-log2xml_DIR := $(d) nix-log2xml_SOURCES := $(d)/log2xml.cc - -$(foreach file, mark-errors.xsl log2html.xsl treebits.js, \ - $(eval $(call install-data-in, $(d)/$(file), $(datadir)/nix/log2html))) diff --git a/src/nix-log2xml/log2html.xsl b/src/nix-log2xml/log2html.xsl deleted file mode 100644 index 209399470640..000000000000 --- a/src/nix-log2xml/log2html.xsl +++ /dev/null @@ -1,83 +0,0 @@ -<?xml version="1.0"?> - -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - - <xsl:output method='html' encoding="UTF-8" - doctype-public="-//W3C//DTD HTML 4.01//EN" - doctype-system="http://www.w3.org/TR/html4/strict.dtd" /> - - <xsl:template match="logfile"> - <html> - <head> - <script type="text/javascript" src="treebits.js" /> - <link rel="stylesheet" href="logfile.css" type="text/css" /> - <title>Log File</title> - </head> - <body> - <ul class='toplevel'> - <xsl:for-each select='line|nest'> - <li> - <xsl:apply-templates select='.'/> - </li> - </xsl:for-each> - </ul> - </body> - </html> - </xsl:template> - - - <xsl:template match="nest"> - - <!-- The tree should be collapsed by default if all children are - unimportant or if the header is unimportant. --> -<!-- <xsl:variable name="collapsed" - select="count(.//line[not(@priority = 3)]) = 0 or ./head[@priority = 3]" /> --> - <xsl:variable name="collapsed" select="count(.//*[@error]) = 0"/> - - <xsl:variable name="style"><xsl:if test="$collapsed">display: none;</xsl:if></xsl:variable> - <xsl:variable name="arg"><xsl:choose><xsl:when test="$collapsed">true</xsl:when><xsl:otherwise>false</xsl:otherwise></xsl:choose></xsl:variable> - - <script type='text/javascript'>showTreeToggle(<xsl:value-of select="$collapsed"/>)</script> - <xsl:apply-templates select='head'/> - - <!-- Be careful to only generate <ul>s if there are <li>s, otherwise it’s malformed. --> - <xsl:if test="line|nest"> - - <ul class='nesting' style="{$style}"> - <xsl:for-each select='line|nest'> - - <!-- Is this the last line? If so, mark it as such so that it - can be rendered differently. --> - <xsl:variable name="class"><xsl:choose><xsl:when test="position() != last()">line</xsl:when><xsl:otherwise>lastline</xsl:otherwise></xsl:choose></xsl:variable> - - <li class='{$class}'> - <span class='lineconn' /> - <span class='linebody'> - <xsl:apply-templates select='.'/> - </span> - </li> - </xsl:for-each> - </ul> - </xsl:if> - - </xsl:template> - - - <xsl:template match="head|line"> - <code> - <xsl:if test="@error"> - <xsl:attribute name="class">error</xsl:attribute> - </xsl:if> - <xsl:apply-templates/> - </code> - </xsl:template> - - - <xsl:template match="storeref"> - <em class='storeref'> - <span class='popup'><xsl:apply-templates/></span> - <span class='elided'>/...</span><xsl:apply-templates select='name'/><xsl:apply-templates select='path'/> - </em> - </xsl:template> - -</xsl:stylesheet> \ No newline at end of file diff --git a/src/nix-log2xml/mark-errors.xsl b/src/nix-log2xml/mark-errors.xsl deleted file mode 100644 index 4e91913e570a..000000000000 --- a/src/nix-log2xml/mark-errors.xsl +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> - -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - - <xsl:template match="@*|node()"> - <xsl:copy> - <xsl:apply-templates select="@*|node()"/> - </xsl:copy> - </xsl:template> - - <xsl:template match="line"> - <line> - <xsl:if test="contains(text(), ' *** ') or - contains(text(), 'LaTeX Error') or - contains(text(), 'FAIL:') or - contains(text(), ' error: ') or - true"> - <xsl:attribute name="error"></xsl:attribute> - </xsl:if> - <xsl:apply-templates select="@*|node()"/> - </line> - </xsl:template> - -</xsl:stylesheet> \ No newline at end of file diff --git a/src/nix-log2xml/treebits.js b/src/nix-log2xml/treebits.js deleted file mode 100644 index 3011b391d88b..000000000000 --- a/src/nix-log2xml/treebits.js +++ /dev/null @@ -1,50 +0,0 @@ -/* Acknowledgement: this is based on the Wikipedia table-of-contents - * toggle. */ - - -var idCounter = 0; - - -function showTreeToggle(isHidden) { - if (document.getElementById) { - var id = "toggle_" + idCounter; - document.writeln( - '<a href="javascript:toggleTree(\'' + id + '\')" class="toggle" id="' + id + '">' + - '<span class="showTree" ' + (isHidden ? '' : 'style="display: none;"') + '>+</span>' + - '<span class="hideTree" ' + (isHidden ? 'style="display: none;"' : '') + '>-</span>' + - '</a>'); - idCounter = idCounter + 1; - } -} - - -function toggleTree(id) { - - var href = document.getElementById(id); - - var node = href; - var tree = null; - while (node != null) { - if (node.className == "nesting") tree = node; - node = node.nextSibling; - } - - node = href.firstChild; - var hideTree = null; - var showTree = null; - while (node != null) { - if (node.className == "showTree") showTree = node; - else if (node.className == "hideTree") hideTree = node; - node = node.nextSibling; - } - - if (tree.style.display == 'none') { - tree.style.display = ''; - hideTree.style.display = ''; - showTree.style.display = 'none'; - } else { - tree.style.display = 'none'; - hideTree.style.display = 'none'; - showTree.style.display = ''; - } -} diff --git a/tests/common.sh.in b/tests/common.sh.in index 48ca7d2dddce..8581223b3d89 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -23,7 +23,6 @@ export PATH=@bindir@:$PATH export NIX_BUILD_HOOK= export dot=@dot@ export xmllint="@xmllint@" -export xsltproc="@xsltproc@" export SHELL="@bash@" export version=@PACKAGE_VERSION@ diff --git a/tests/logging.sh b/tests/logging.sh index 5ba71c3e409d..0113ed11c401 100644 --- a/tests/logging.sh +++ b/tests/logging.sh @@ -14,15 +14,6 @@ if test "$xmllint" != "false"; then $xmllint --noout $TEST_ROOT/log.xml || fail "malformed XML" fi -# Convert to HTML. -if test "$xsltproc" != "false"; then - (cd $datadir/nix/log2html && $xsltproc mark-errors.xsl - | $xsltproc log2html.xsl -) < $TEST_ROOT/log.xml > $TEST_ROOT/log.html - # Ideally we would check that the generated HTML is valid... - - # A few checks... - grep "<code>.*FOO" $TEST_ROOT/log.html || fail "bad HTML output" -fi - # Test nix-store -l. [ "$(nix-store -l $path)" = FOO ] |