sbsv2/raptor/test/smoke_suite/annofile2log.py
author Jon Chatten
Wed, 07 Apr 2010 12:34:10 +0100
branchwip
changeset 457 9bebdb95e0de
parent 450 63f3bc391c14
parent 408 a819f9223567
child 553 7d4971eaf863
permissions -rw-r--r--
merge 2.13.0 (candidate 2) from default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
362
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     1
#
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     2
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     3
# All rights reserved.
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     8
#
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
     9
# Initial Contributors:
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    11
#
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    12
# Contributors:
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    13
#
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    14
# Description: 
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    15
#
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    16
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    18
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    19
def run():
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    20
	t = SmokeTest()
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    21
	t.id = "43563"
450
63f3bc391c14 Fix mismatches in test names vs. file names.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents: 363
diff changeset
    22
	t.name = "annofile2log"
362
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    23
	t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    24
	
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    25
	t.usebash = True
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    26
	t.errors = 0
408
a819f9223567 fix: stop using "magic" numbers in string operations for the copyannofile2log feature
timothy.murphy@nokia.com
parents: 363
diff changeset
    27
	t.returncode = 0
362
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    28
	t.exceptions = 0
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    29
	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))"
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    30
	
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    31
	t.mustmatch_multiline = [ 
408
a819f9223567 fix: stop using "magic" numbers in string operations for the copyannofile2log feature
timothy.murphy@nokia.com
parents: 363
diff changeset
    32
		"^ *.?"
362
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    33
                ]
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    34
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    35
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    36
	t.run()
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    37
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    38
	t.print_result()
0ff20a0b1aa9 add a test for annofile2log workaround for log corruption
timothy.murphy@nokia.com
parents:
diff changeset
    39
	return t