# HG changeset patch # User timothy.murphy@nokia.com # Date 1271767298 -3600 # Node ID b60bdff4158063c267d4f4f37ceb99112d9e93cd # Parent 4d8a8d0b17c070edbc7fc93ab00318727982d712 Make copyfromannofile test work on windows. diff -r 4d8a8d0b17c0 -r b60bdff41580 sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Tue Apr 20 12:08:50 2010 +0100 +++ b/sbsv2/raptor/python/raptor_make.py Tue Apr 20 13:41:38 2010 +0100 @@ -68,7 +68,10 @@ def AnnoFileParseOutput(annofile): """ A generator that extracts log output from an emake annotation file, perform an XML-unescape on it and "yields" it line by line. """ - af = open(annofile, "r") + if isinstance(annofile,str): + af = open(annofile, "r") + else: + af = annofile inOutput = False diff -r 4d8a8d0b17c0 -r b60bdff41580 sbsv2/raptor/test/smoke_suite/annofile2log.py --- a/sbsv2/raptor/test/smoke_suite/annofile2log.py Tue Apr 20 12:08:50 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/annofile2log.py Tue Apr 20 13:41:38 2010 +0100 @@ -26,7 +26,7 @@ t.errors = 0 t.returncode = 0 t.exceptions = 0 - t.command = "cd smoke_suite/test_resources/annofile2log && ( diff -wB <(python testanno2log.py <(bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2)) <(bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2))" + t.command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2 | python testanno2log.py >"${FROMANNO}" && FROMSTDOUT="`mktemp`"; bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2 > "${FROMSTDOUT}" && diff -wB "${FROMANNO}" "${FROMSTDOUT}"; RET=$? ; rm "${FROMANNO}" "${FROMSTDOUT}"; exit $RET )' t.mustmatch_multiline = [ "^ *.?" diff -r 4d8a8d0b17c0 -r b60bdff41580 sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py --- a/sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py Tue Apr 20 12:08:50 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/annofile2log/testanno2log.py Tue Apr 20 13:41:38 2010 +0100 @@ -27,7 +27,10 @@ retcode=0 -annofile = sys.argv[1] +if len(sys.argv) > 1: + annofile = sys.argv[1] +else: + annofile = sys.stdin sys.stdout.write("\n") try: