sbsv2/raptor/test/smoke_suite/input_validation.py
author timothy.murphy@nokia.com
Sun, 14 Feb 2010 21:04:58 +0200
branchfix
changeset 207 f7f333fcfeeb
parent 196 c0d1d904d868
permissions -rw-r--r--
test: test for make_engines that are aliases referring to a sequence of variants.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     1
#
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     2
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     3
# All rights reserved.
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     4
# This component and the accompanying materials are made available
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     6
# which accompanies this distribution, and is available
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     8
#
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
     9
# Initial Contributors:
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    11
#
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    12
# Contributors:
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    13
#
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    14
# Description: 
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    15
#
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    16
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    17
from raptor_tests import SmokeTest
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    18
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    19
def run():
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    20
	t = SmokeTest()
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    21
	t.description = "Set of tests for commandline option validation e.g. checking that the specified make engine exists"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    22
	
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    23
	
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    24
	t.usebash = True
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    25
	t.errors = 1
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    26
	t.returncode = 1
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    27
	t.exceptions = 0
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    28
	base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE}"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    29
	
196
c0d1d904d868 review comments, dates, test ids
timothy.murphy@nokia.com
parents: 194
diff changeset
    30
	t.id = "42562a"
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    31
	t.name = "validate_makeengine_nonexist"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    32
	t.command = base_command + " -e amakeenginethatdoesnotexist"
196
c0d1d904d868 review comments, dates, test ids
timothy.murphy@nokia.com
parents: 194
diff changeset
    33
	t.mustmatch = ["Unable to use make engine: 'amakeenginethatdoesnotexist' does not appear to be a make engine - no settings found for it"]
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    34
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    35
	t.run()
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    36
196
c0d1d904d868 review comments, dates, test ids
timothy.murphy@nokia.com
parents: 194
diff changeset
    37
	t.id = "43562b"
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    38
	t.mustmatch = ["Unable to use make engine: 'arm' is not a build engine \(it's a variant but it does not extend 'make_engine'"]
207
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    39
	t.name = "validate_makeengine_is_a_non_makengine_variant"
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    40
	t.command = base_command + " -e arm"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    41
	t.run()
207
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    42
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    43
	# aliases can be of the form name='blah' meaning='x.y.z'  i.e. where the alias is for a sequence of variants
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    44
	# this tests that we detect that at least one of these variants has make_engine as a parent
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    45
	# it is possible for one of them not to and we mustn't bomb-out just because of that
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    46
	t.id = "43562c"
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    47
	t.mustmatch = []
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    48
	t.name = "validate_real_dfs_modded_makeengine_alias"
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    49
	t.command = "export HOME=$SBS_HOME/test/custom_options/dfsconfig;  " + base_command + " -e dfstestmake -c arm.v5.urel.gcce4_4_1"
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    50
	t.errors = 0
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    51
	t.warnings = 0
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    52
	t.returncode = 0
f7f333fcfeeb test: test for make_engines that are aliases referring to a sequence of variants.
timothy.murphy@nokia.com
parents: 196
diff changeset
    53
	t.run()
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    54
	
196
c0d1d904d868 review comments, dates, test ids
timothy.murphy@nokia.com
parents: 194
diff changeset
    55
	t.id = "43562"
194
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    56
	t.name = "input_validation"
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    57
	t.print_result()
369939723b79 test for make engine validation
timothy.murphy@nokia.com
parents:
diff changeset
    58
	return t