sbsv2/raptor/test/smoke_suite/non_ascii.py
author tnmurphy@4GBL06592.nokia.com
Mon, 16 Nov 2009 09:46:46 +0000
changeset 3 e1eecf4d390d
permissions -rw-r--r--
Team sf branch. Excluded win32 dir and also test epocroot Added test directory
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     1
# -*- coding: iso-8859-1 -*- This line *must* be on the first line of the file!
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     2
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     3
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     4
# All rights reserved.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     5
# This component and the accompanying materials are made available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     6
# under the terms of the License "Eclipse Public License v1.0"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     7
# which accompanies this distribution, and is available
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     8
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
     9
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    10
# Initial Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    11
# Nokia Corporation - initial contribution.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    12
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    13
# Contributors:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    14
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    15
# Description: 
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    16
#
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    17
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    18
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    19
from raptor_tests import SmokeTest
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    20
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    21
def run():
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    22
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    23
	t = SmokeTest()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    24
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    25
	# Should have returncode of 1 and output 1 error, but not cause a traceback
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    26
	t.returncode = 1
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    27
	t.errors = 1
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    28
	t.mustmatch = ["sbs: error: Non-ASCII character in argument or command file"]
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    29
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    30
	result = SmokeTest.PASS
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    31
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    32
	t.id = "0091a"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    33
	t.name = "non_ascii_argument"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    34
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    35
	# The dash in "-c" is an en dash, not a normal ASCII dash.
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    36
	t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf –c armv5"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    37
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    38
	t.run()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    39
	if t.result == SmokeTest.FAIL:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    40
		result = SmokeTest.FAIL
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    41
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    42
	t.id = "0091b"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    43
	t.name = "non_ascii_commandfile"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    44
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    45
	t.command = "sbs --command=smoke_suite/test_resources/non_ascii/cmd.txt"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    46
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    47
	t.run()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    48
	if t.result == SmokeTest.FAIL:
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    49
		result = SmokeTest.FAIL
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    50
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    51
	t.id = "91"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    52
	t.name = "non_ascii"
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    53
	t.result = result
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    54
	t.print_result()
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    55
	return t
e1eecf4d390d Team sf branch.
tnmurphy@4GBL06592.nokia.com
parents:
diff changeset
    56