Make copyfromannofile test work on windows.
--- 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
--- 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 = [
"^ *.?"
--- 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("<build>\n")
try: