Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.7 kB view raw
1diff --git a/configure.ac b/configure.ac 2index 41cb7db..93ef0ec 100644 3--- a/configure.ac 4+++ b/configure.ac 5@@ -115,9 +115,9 @@ GTK_DOC_CHECK(1.0) 6 7 AC_PATH_PROG([PYTHON],[python]) 8 AC_MSG_CHECKING(for gtester2xunit dependencies) 9-if !($PYTHON -c "import libxslt, libxml2" 2> /dev/null); then 10+if !($PYTHON -c "import lxml" 2> /dev/null); then 11 AC_MSG_RESULT([no]) 12- AC_MSG_ERROR([You need to install python-libxslt1 and python-libxml2]); 13+ AC_MSG_ERROR([You need to install python-lxml]); 14 fi 15 AC_MSG_RESULT([yes]) 16 17@@ -189,6 +189,6 @@ ${PACKAGE}-${VERSION} 18 Introspection: ${enable_introspection} 19 Headless tests: ${enable_headless_tests} 20 Coverage Reporting: ${use_gcov} 21- Export actions menus: ${enable_export_actions_menu} 22+ Export actions menus: ${enable_export_actions_menu} 23 24 EOF 25diff --git a/tests/gtester2xunit.py b/tests/gtester2xunit.py 26index fbe3c66..861d541 100755 27--- a/tests/gtester2xunit.py 28+++ b/tests/gtester2xunit.py 29@@ -1,18 +1,17 @@ 30 #! /usr/bin/python 31 from argparse import ArgumentParser 32-import libxslt 33-import libxml2 34 import sys 35 import os 36+from lxml import etree 37 38 XSL_TRANSFORM='/usr/share/gtester2xunit/gtester.xsl' 39 40 def transform_file(input_filename, output_filename, xsl_file): 41- gtester = libxml2.parseFile(xsl_file) 42- style = libxslt.parseStylesheetDoc(gtester) 43- doc = libxml2.parseFile(input_filename) 44- result = style.applyStylesheet(doc, None) 45- result.saveFormatFile(filename=output_filename, format=True) 46+ gtester = etree.parse(xsl_file) 47+ style = etree.XSLT(gtester) 48+ doc = etree.parse(input_filename) 49+ result = style(doc) 50+ result.write(filename=output_filename, format=True) 51 52 53 def get_output_filename(input_filename):