diff options
Diffstat (limited to 'tools/regression/xsl_reports/test')
9 files changed, 0 insertions, 586 deletions
diff --git a/tools/regression/xsl_reports/test/common.py b/tools/regression/xsl_reports/test/common.py deleted file mode 100644 index cd9e5729a..000000000 --- a/tools/regression/xsl_reports/test/common.py +++ /dev/null @@ -1,165 +0,0 @@ -import xml.sax.saxutils -import time - -def make_test_name( library_idx, test_idx ): - return "test_%02d_%02d" % ( library_idx, test_idx ) - -def make_library_name( library_idx ): - if library_idx % 4 in ( 0, 1 ): - return "library_%02d/%02d" % ( int( library_idx / 4 ) * 4, library_idx % 4 ) - else: - return "library_%02d" % library_idx - -def make_toolset_name( toolset_idx ): - return "toolset_%02d" % toolset_idx - -def make_library_target_directory( library_idx, toolset_idx, variant = None ): - base = "lib/%s/%s" % ( make_library_name( library_idx ) - , make_toolset_name( toolset_idx ) ) - if variant is not None: - return "%s/%s" % ( base, variant ) - else: - return base - -def make_test_target_directory( library_idx, toolset_idx, test_name, variant ): - base = "%s/%s/%s" % ( make_library_name( library_idx ) - , make_toolset_name( toolset_idx ) - , test_name ) - if variant is not None: - return "%s/%s" % ( base, variant ) - else: - return base - -def format_timestamp( timestamp ): - return time.strftime( "%Y-%m-%dT%H:%M:%SZ", timestamp ) - -def make_test_log( xml_generator - , library_idx - , toolset_idx - , test_name - , test_type - , test_result - , show_run_output - , variant ): - library = make_library_name( library_idx ) - toolset_name = make_toolset_name( toolset_idx ) - - target_directory = "" - if test_type != "lib": - target_directory = make_test_target_directory( library_idx, toolset_idx, test_name, variant ) - else: - target_directory = make_library_target_directory( library_idx, toolset_idx, variant ) - - xml_generator.startElement( "test-log", { "library": library - , "test-name": test_name - , "toolset": toolset_name - , "test-type": test_type - , "test-program": "some_program" - , "target-directory": target_directory - , "show-run-output": show_run_output - } ) - - if test_type != "lib": - - if test_result == "success" and ( toolset_idx + 1 ) % 4: - xml_generator.startElement( "compile", { "result": "success" } ); - xml_generator.characters( "Compiling in %s" % target_directory ) - xml_generator.endElement( "compile" ) - - if test_type.find( "link" ) == 0 or test_type.find( "run" ) == 0 and toolset_idx % 4: - xml_generator.startElement( "lib", { "result": test_result } ); - xml_generator.characters( make_library_target_directory( library_idx, toolset_idx ) ) - xml_generator.endElement( "lib" ) - - xml_generator.startElement( "link", { "result": "success" } ); - xml_generator.characters( "Linking in %s" % target_directory ) - xml_generator.endElement( "link" ) - - if test_type.find( "run" ) == 0 and ( toolset_idx + 2 ) % 4: - xml_generator.startElement( "run", { "result": test_result } ); - xml_generator.characters( "Running in %s" % target_directory ) - xml_generator.endElement( "run" ) - - else: - xml_generator.startElement( "compile", { "result": test_result } ); - xml_generator.characters( "Compiling in %s" % make_library_target_directory( library_idx, toolset_idx ) ) - xml_generator.endElement( "compile" ) - - - - xml_generator.endElement( "test-log" ) - - -def make_expicit_failure_markup( num_of_libs, num_of_toolsets, num_of_tests ): - g = xml.sax.saxutils.XMLGenerator( open( "explicit-failures-markup.xml", "w" ), "utf-8" ) - g.startDocument() - g.startElement( "explicit-failures-markup", {} ); - - # required toolsets - for i_toolset in range( 0, num_of_toolsets ): - if i_toolset < 2: - g.startElement( "mark-toolset", { "name": "toolset_%02d" % i_toolset, "status":"required"} ) - g.endElement( "mark-toolset" ) - - for i_library in range( 0, num_of_libs ): - g.startElement( "library", { "name": make_library_name( i_library ) } ) - if i_library % 4 == 0: - g.startElement( "mark-unusable", {} ) - for i_toolset in range( 0, num_of_toolsets ): - if i_toolset % 2 == 1: - g.startElement( "toolset", { "name": make_toolset_name( i_toolset ) } ) - g.endElement( "toolset" ) - g.startElement( "note", { "author": u"T. T\xe8st" } ) - g.characters( "Test note" ) - g.endElement( "note" ) - g.endElement( "mark-unusable" ) - - for i_test in range( 0, num_of_tests ): - - category = 0 - explicitly_marked_failure = 0 - unresearched = 0 - - if i_test % 2 == 0: - category = i_test % 3 - - if i_test % 3 == 0: - explicitly_marked_failure = 1 - if i_test % 2 == 0: - unresearched = 1 - - if category or explicitly_marked_failure: - test_attrs = { "name": make_test_name( i_library, i_test ) } - if category: - test_attrs[ "category" ] = "Category %s" % category - g.startElement( "test", test_attrs ) - if explicitly_marked_failure: - failure_attrs = {} - if unresearched: failure_attrs[ "reason" ] = "not-researched" - - g.startElement( "mark-failure", failure_attrs ) - - g.startElement( "toolset", { "name": make_toolset_name( 1 ) } ) - g.endElement( "toolset" ) - g.startElement( "toolset", { "name": make_toolset_name( 0 ) } ) - g.endElement( "toolset" ) - g.startElement( "toolset", { "name": make_toolset_name( 2 ) } ) - g.endElement( "toolset" ) - - g.startElement( "note", { "author": u"V. Ann\xf3tated" } ) - g.characters( "Some thoughtful note" ) - g.endElement( "note" ) - - g.endElement( "mark-failure" ) - - g.endElement( "test" ); - g.endElement( "library" ) - - - g.endElement( "explicit-failures-markup" ) - g.endDocument() - - -def make_expected_results( num_of_libs, num_of_toolsets, num_of_tests ): - pass - diff --git a/tools/regression/xsl_reports/test/expected_results.xml b/tools/regression/xsl_reports/test/expected_results.xml deleted file mode 100644 index d9fdd26cc..000000000 --- a/tools/regression/xsl_reports/test/expected_results.xml +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<expected-failures> -</expected-failures> diff --git a/tools/regression/xsl_reports/test/generate_test_results.py b/tools/regression/xsl_reports/test/generate_test_results.py deleted file mode 100644 index ba6a7ee39..000000000 --- a/tools/regression/xsl_reports/test/generate_test_results.py +++ /dev/null @@ -1,160 +0,0 @@ -# -# Generates test test results for testing of boost_wide_report.py -# -import common -import xml.sax.saxutils - -import os -import time - -num_of_libs = 5 -num_of_runners = 5 -num_of_toolsets = 3 -num_of_tests = 10 - -results_directory = "results/incoming/CVS-HEAD/processed" - - -# Generated results follow the rules: -# -# * odd runners are testing on Win32, even runners are testin on Unix -# * the third toolset has 2 variants -# - -# Generated expected markup: -# -# * First two toolset are required -# * Every fourth library is unusable on event toolsets -# * Last two tests are corner-ase tests -# * Every 4th test is explicitly marked up as expected-failure - - -def library_build_failed( library_idx ): - return library_idx % 2 - -def test_run_source( runner_idx ): - if runner_idx % 2: return "tarball" - else: return "cvs head" - -def test_run_type( runner_idx ): - if runner_idx % 2: return "incremental" - else: return "full" - - -def test_type( i ): - types = [ "compile", "compile_fail", "link", "link_fail", "run", "run_fail", "run_pyd" ] - return types[ i % len( types) ] - - -def make_test_results(): - if not os.path.exists( results_directory ): - os.makedirs( results_directory ) - - for i_runner in range( 0, num_of_runners ): - runner_id = "runner %02d" % i_runner - g = xml.sax.saxutils.XMLGenerator( open( os.path.join( results_directory, runner_id + ".xml" ), "w" ), "utf-8" ) - g.startDocument() - if i_runner % 2: - platform = "Win32" - else: - platform = "Unix" - - g.startElement( "test-run", { "platform": platform - , "runner": runner_id - , "timestamp": common.format_timestamp( - time.gmtime( time.time() - i_runner * 24*60*60 ) - ) - , "revision": '%d' % ( 7000 + i_runner ) - , "source": test_run_source( i_runner ) - , "run-type": test_run_type( i_runner ) - } ) - - g.startElement( "comment", {} ) - g.characters( "<b>Runner</b> is who <i>running</i> does." ) - g.endElement( "comment" ) - - for i_lib in range( 0, num_of_libs ): - for i_toolset in range( num_of_toolsets ): - if library_build_failed( i_lib ): test_result = "fail" - else: test_result = "success" - - common.make_test_log( xml_generator = g - , library_idx = i_lib - , toolset_idx = i_toolset - , test_name = "" - , test_type = "lib" - , test_result = test_result - , show_run_output = "false" - , variant = None ) - - - for i_lib in range( 0, num_of_libs ): - library_name = "library_%02d" % i_lib - if num_of_runners - 1 == i_runner and i_lib % 2: - continue - - for i_toolset in range( num_of_toolsets ): - toolset_name = "toolset %02d" % ( i_toolset ) - - if num_of_runners - 1 == i_runner and i_toolset % 2: - continue - - for i_test in range( num_of_tests ): - test_name = "test_%02d_%02d" % ( i_lib, i_test ) - test_result = "" - show_run_output = "false" - - if num_of_runners - 1 == i_runner and i_test % 2: - continue - - if i_runner % 2: test_result = "success" - else: test_result = "fail" - - if i_runner == 1 and i_toolset == 2 and i_test % 6 == 0: - test_result = "fail" - - if test_result == "success" and ( 0 == i_test % 5 ): - show_run_output = "true" - - if i_toolset == 2: - variants = [ "static-lib", "shared-lib" ] - else: - variants = [ None ] - - for variant in variants: - common.make_test_log( xml_generator = g - , library_idx = i_lib - , toolset_idx = i_toolset - , test_name = test_name - , test_type = test_type( i_test ) - , test_result = test_result - , show_run_output = show_run_output - , variant = variant ) - g.endElement( "test-run" ) - g.endDocument() - - - -## <test-log library="algorithm" test-name="container" test-type="run" test-program="libs/algorithm/string/test/container_test.cpp" target-directory="bin/boost/libs/algorithm/string/test/container.test/borland-5.6.4/debug" toolset="borland-5.6.4" show-run-output="false"> -## <compile result="fail" timestamp="2004-06-29 17:02:27 UTC"> - -## "C:\Progra~1\Borland\CBuilder6\bin\bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -v -Od -vi- -tWC -tWR -tWC -WM- -DBOOST_ALL_NO_LIB=1 -w-8001 -I"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test" -I"C:\Users\Administrator\boost\main\boost" -I"C:\Progra~1\Borland\CBuilder6\include" -o"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test\container.test\borland-5.6.4\debug\container_test.obj" "..\libs\algorithm\string\test\container_test.cpp" - -## ..\libs\algorithm\string\test\container_test.cpp: -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_result.cpp 323: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function unit_test_result::~unit_test_result() -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 63: template argument _InputIter passed to 'find_if' is a output iterator: input iterator required in function test_case::Impl::check_dependencies() -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 204: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function test_suite::~test_suite() -## Error E2401 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 45: Invalid template argument list -## Error E2040 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 46: Declaration terminated incorrectly -## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Qualifier 'algorithm' is not a class or namespace name -## Error E2272 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Identifier expected -## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Qualifier 'algorithm' is not a class or namespace name -## Error E2228 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Too many error or warning messages -## *** 6 errors in Compile *** -## </compile> -## </test-log> - - -make_test_results() -common.make_expicit_failure_markup( num_of_libs, num_of_toolsets, num_of_tests ) - diff --git a/tools/regression/xsl_reports/test/generate_test_results_v1.py b/tools/regression/xsl_reports/test/generate_test_results_v1.py deleted file mode 100644 index 0f7f8f796..000000000 --- a/tools/regression/xsl_reports/test/generate_test_results_v1.py +++ /dev/null @@ -1,85 +0,0 @@ -import xml.sax.saxutils - -import common - -import os -import time - -num_of_libs = 2 -num_of_toolsets = 3 -num_of_tests = 10 - -tag = "1_30_0" - -def library_build_failed( library_idx ): - return library_idx % 2 - -def make_test_results(): - if not os.path.exists( tag ): - os.makedirs( tag ) - - g = xml.sax.saxutils.XMLGenerator( open( os.path.join( tag, "test.xml" ), "w" ) ) - platform = "Win32" - g.startElement( "test-results", {} ) - - for i_lib in range( 0, num_of_libs ): - for i_toolset in range( num_of_toolsets ): - if library_build_failed( i_lib ): test_result = "fail" - else: test_result = "success" - - common.make_test_log( xml_generator = g - , library_idx = i_lib - , toolset_idx = i_toolset - , test_name = "" - , test_type = "lib" - , test_result = test_result - , show_run_output = "false" ) - - - for i_lib in range( 0, num_of_libs ): - library_name = "library_%02d" % i_lib - - for i_toolset in range( num_of_toolsets ): - toolset_name = "toolset_%02d" % ( i_toolset ) - - for i_test in range( num_of_tests ): - test_name = "test_%02d_%02d" % ( i_lib, i_test ) - test_result = "" - test_type = "run" - show_run_output = "false" - - if i_lib % 2: test_result = "success" - else: test_result = "fail" - - if test_result == "success" and ( 0 == i_test % 5 ): - show_run_output = "true" - - common.make_test_log( g, i_lib, i_toolset, test_name, test_type, test_result, show_run_output ) - - g.endElement( "test-results" ) - - - - -## <test-log library="algorithm" test-name="container" test-type="run" test-program="libs/algorithm/string/test/container_test.cpp" target-directory="bin/boost/libs/algorithm/string/test/container.test/borland-5.6.4/debug" toolset="borland-5.6.4" show-run-output="false"> -## <compile result="fail" timestamp="2004-06-29 17:02:27 UTC"> - -## "C:\Progra~1\Borland\CBuilder6\bin\bcc32" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- -v -Od -vi- -tWC -tWR -tWC -WM- -DBOOST_ALL_NO_LIB=1 -w-8001 -I"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test" -I"C:\Users\Administrator\boost\main\boost" -I"C:\Progra~1\Borland\CBuilder6\include" -o"C:\Users\Administrator\boost\main\results\bin\boost\libs\algorithm\string\test\container.test\borland-5.6.4\debug\container_test.obj" "..\libs\algorithm\string\test\container_test.cpp" - -## ..\libs\algorithm\string\test\container_test.cpp: -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_result.cpp 323: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function unit_test_result::~unit_test_result() -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 63: template argument _InputIter passed to 'find_if' is a output iterator: input iterator required in function test_case::Impl::check_dependencies() -## Warning W8091 C:\Users\Administrator\boost\main\boost\libs/test/src/unit_test_suite.cpp 204: template argument _InputIter passed to 'for_each' is a output iterator: input iterator required in function test_suite::~test_suite() -## Error E2401 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 45: Invalid template argument list -## Error E2040 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 46: Declaration terminated incorrectly -## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Qualifier 'algorithm' is not a class or namespace name -## Error E2272 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 277: Identifier expected -## Error E2090 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Qualifier 'algorithm' is not a class or namespace name -## Error E2228 C:\Users\Administrator\boost\main\boost\boost/algorithm/string/finder.hpp 278: Too many error or warning messages -## *** 6 errors in Compile *** -## </compile> -## </test-log> - - -make_test_results( ) -common.make_expicit_failure_markup( num_of_libs, num_of_toolsets, num_of_tests ) diff --git a/tools/regression/xsl_reports/test/restrict_to_library.xsl b/tools/regression/xsl_reports/test/restrict_to_library.xsl deleted file mode 100644 index 8de3354d8..000000000 --- a/tools/regression/xsl_reports/test/restrict_to_library.xsl +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0"> - - <xsl:output method="xml" encoding="ascii"/> - <xsl:param name="library"/> - - - <xsl:template match="/"> - <xsl:message> - <xsl:value-of select="$library"/> - </xsl:message> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="*"> - <xsl:copy> - <xsl:apply-templates select="@*"/> - <xsl:apply-templates /> - </xsl:copy> - </xsl:template> - - <xsl:template match="test-log"> - <xsl:if test="@library=$library"> - <xsl:copy> - <xsl:apply-templates select="@*"/> - <xsl:apply-templates/> - </xsl:copy> - </xsl:if> - </xsl:template> - - <xsl:template match="@*"> - <xsl:copy-of select="."/> - </xsl:template> - -</xsl:stylesheet> diff --git a/tools/regression/xsl_reports/test/run_notes_regression.py b/tools/regression/xsl_reports/test/run_notes_regression.py deleted file mode 100644 index 884dcfe9d..000000000 --- a/tools/regression/xsl_reports/test/run_notes_regression.py +++ /dev/null @@ -1,32 +0,0 @@ -import sys - -sys.path.append( '..' ) - -import os - -import report -import merger -import utils - - -tag = "1_32_0" - -# utils.makedirs( "results" ) - -all_xml_file = "a.xml" - -report.make_result_pages( - test_results_file = os.path.abspath( all_xml_file ) - , expected_results_file = "" - , failures_markup_file = os.path.abspath( "../../../../status/explicit-failures-markup.xml" ) - , tag = tag - , run_date = "Today date" - , comment_file = os.path.abspath( "comment.html" ) - , results_dir = "results" - , result_prefix = "" - , reports = [ "dd" ] - , v2 = 1 - ) - - - diff --git a/tools/regression/xsl_reports/test/run_v1.py b/tools/regression/xsl_reports/test/run_v1.py deleted file mode 100644 index a995ed635..000000000 --- a/tools/regression/xsl_reports/test/run_v1.py +++ /dev/null @@ -1,35 +0,0 @@ -import sys - -sys.path.append( '..' ) - -import os - -import report -import merger -import utils - - -tag = "1_30_0" - -utils.makedirs( "results" ) - -all_xml_file = "results/all.xml" -all_xml_writer = open( all_xml_file, "w" ) -merger.merge_test_runs( ".", tag, all_xml_writer ) -all_xml_writer.close() - -report.make_result_pages( - test_results_file = os.path.abspath( all_xml_file ) - , expected_results_file = "" - , failures_markup_file = os.path.abspath( "explicit-failures-markup.xml" ) - , source = tag - , run_date = "Today date" - , comment_file = os.path.abspath( "comment.html" ) - , results_dir = os.path.abspath( "results" ) - , result_prefix = "" - , reports = [ "l", "dd" ] - , v2 = 0 - ) - - - diff --git a/tools/regression/xsl_reports/test/test.py b/tools/regression/xsl_reports/test/test.py deleted file mode 100644 index 1378586c1..000000000 --- a/tools/regression/xsl_reports/test/test.py +++ /dev/null @@ -1,34 +0,0 @@ -import sys - -sys.path.append( '..' ) - -import os - -import boost_wide_report -import common -import utils -import shutil -import time - -tag = "CVS-HEAD" - -if os.path.exists( "results/incoming/CVS-HEAD/processed/merged" ): - shutil.rmtree( "results/incoming/CVS-HEAD/processed/merged" ) - -boost_wide_report.ftp_task = lambda ftp_site, site_path, incoming_dir: 1 -boost_wide_report.unzip_archives_task = lambda incoming_dir, processed_dir, unzip: 1 - -boost_wide_report.execute_tasks( - tag = tag - , user = None - , run_date = common.format_timestamp( time.gmtime() ) - , comment_file = os.path.abspath( "comment.html" ) - , results_dir = os.path.abspath( "results" ) - , output_dir = os.path.abspath( "output" ) - , reports = [ "i", "x", "ds", "dd", "dsr", "ddr", "us", "ud", "usr", "udr" ] - , warnings = [ 'Warning text 1', 'Warning text 2' ] - , extended_test_results = os.path.abspath( "output/extended_test_results.xml" ) - , dont_collect_logs = 1 - , expected_results_file = os.path.abspath( "expected_results.xml" ) - , failures_markup_file = os.path.abspath( "explicit-failures-markup.xml" ) - ) diff --git a/tools/regression/xsl_reports/test/test_boost_wide_report.py b/tools/regression/xsl_reports/test/test_boost_wide_report.py deleted file mode 100644 index f7d52fc2f..000000000 --- a/tools/regression/xsl_reports/test/test_boost_wide_report.py +++ /dev/null @@ -1,36 +0,0 @@ -import unittest -import sys -import time - -sys.path.append( ".." ) - -import boost_wide_report - -class test_boost_wide_report(unittest.TestCase): - def test_diff( self ): - test_cases = [ - ( [] - , [] - , ( [], [] ) ) - , ( [ boost_wide_report.file_info( "a", 1, time.localtime( 0 ) ) ] - , [] - , ( [ "a" ], [] ) ) - , ( [] - , [ boost_wide_report.file_info( "a", 1, time.localtime( 0 ) ) ] - , ( [], [ "a" ] ) ) - , ( [ boost_wide_report.file_info( "a", 1, time.localtime( 0 ) ) ] - , [ boost_wide_report.file_info( "a", 1, time.localtime( 1 ) ) ] - , ( [ "a" ], [] ) ) - ] - - for test_case in test_cases: - source_dir_content = test_case[0] - destination_dir_content = test_case[1] - expected_result = test_case[2] - d = boost_wide_report.diff( source_dir_content, destination_dir_content ) - self.failUnlessEqual( d, expected_result ) - -if __name__ == '__main__': - unittest.main() - - |