apicompatanamdw/compatanalysercmd/checkbc/tsrc/testcases.py
author shrivatsa
Mon, 27 Sep 2010 14:51:17 +0530
changeset 12 a0eee409ff14
permissions -rw-r--r--
Updates to CompatibilityAnalyser - The Tool should now work with Symbian^4 - Some minor bug fixes related to Qt headers in the Symbian Platform
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     1
#
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     3
# All rights reserved.
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     4
# This component and the accompanying materials are made available
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     6
# which accompanies this distribution, and is available
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     8
#
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
     9
# Initial Contributors:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    11
#
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    12
# Contributors:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    13
#
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    14
# Description:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    15
#
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    16
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    17
import subprocess
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    18
import os
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    19
import re
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    20
import sys
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    21
import shutil
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    22
from xml.dom import minidom
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    23
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    24
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    25
if os.name == 'nt':
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    26
    path = os.path.dirname(sys.argv[0])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    27
else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    28
    path = os.getcwd()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    29
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    30
TC_DIR = path
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    31
CHECKBC = "python " + "\""+ TC_DIR + os.sep + os.pardir + os.sep + "CheckBC.py" +"\""
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    32
DEFAULT_TEMP = TC_DIR + os.sep + os.pardir + os.sep + "temp"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    33
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    34
#will create a seperate process for invoking checkbc with given parameters
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    35
def runTest(args):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    36
    return subprocess.call(CHECKBC + args, shell=True)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    37
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    38
def comment(list, updatepairs):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    39
    ip = open( TC_DIR + os.sep + 'config_template', 'r')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    40
    op = open( TC_DIR + os.sep + 'temp' + os.sep + 'config', 'w')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    41
    for line in ip:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    42
        if line[0] == '#':
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    43
            continue
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    44
        line = line.strip(' \t\n\r')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    45
        pair = line.split('=')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    46
        if updatepairs.has_key(pair[0]):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    47
            line = pair[0] + '=' + updatepairs[pair[0]]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    48
        if pair[0] not in list:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    49
            op.write(line)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    50
            op.write('\n')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    51
    ip.close()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    52
    op.close()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    53
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    54
def failUnless(res, exp_res):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    55
	if res == exp_res:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    56
		return True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    57
	else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    58
		return False	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    59
		
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    60
def checklists(list1,list2):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    61
    for val in list1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    62
        if not val in list2:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    63
            return False
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    64
    return True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    65
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    66
def checkreports(tag):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    67
    expectedreport=TC_DIR + os.sep + 'testdata' + os.sep + 'expected_results' + os.sep + tag + '.xml'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    68
    actualreport=TC_DIR + os.sep + 'temp' + os.sep + 'results' + os.sep + tag + '.xml'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    69
    if not os.path.exists(actualreport):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    70
    	return False
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    71
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    72
    expdoc=minidom.parse(expectedreport)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    73
    actdoc=minidom.parse(actualreport)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    74
    expparent=expdoc.documentElement
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    75
    actparent=actdoc.documentElement
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    76
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    77
    expparms=expparent.getElementsByTagName("parm")
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    78
    actparms=actparent.getElementsByTagName("parm")
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    79
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    80
    expparmslen=expparms.length
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    81
    actparmslen=actparms.length
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    82
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    83
    if expparmslen!=actparmslen:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    84
    	return False
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    85
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    86
    for expparm in expparms:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    87
    	exparg=expparm.getElementsByTagName("pname")[0].firstChild.nodeValue
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    88
    	expargval=""
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    89
    	if expparm.getElementsByTagName("pvalue")[0].firstChild:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    90
    		expargval=expparm.getElementsByTagName("pvalue")[0].firstChild.nodeValue
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    91
    	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    92
    	found=False
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    93
    	for actparm in actparms:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    94
    		actarg=actparm.getElementsByTagName("pname")[0].firstChild.nodeValue
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    95
    		actargval=""
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    96
    		if actparm.getElementsByTagName("pvalue")[0].firstChild:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    97
    			actargval=actparm.getElementsByTagName("pvalue")[0].firstChild.nodeValue
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    98
    		if exparg==actarg:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
    99
    			if exparg in "baselineversion currentversion bundlesize recursive replace excludedirs toolchain".split():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   100
    				if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   101
    					found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   102
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   103
    					   	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   104
    			if exparg in "baseplatformdata currentplatformdata".split():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   105
    				expargval=expargval[ expargval.index(os.sep+'data') : len(expargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   106
    				actargval=actargval[ actargval.index(os.sep+'data') : len(actargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   107
    				if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   108
    					found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   109
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   110
    				
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   111
    			if exparg == 'cfilt':
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   112
    				if expargval.rfind(os.sep+'bin') != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   113
    					expargval=expargval[ expargval.index(os.sep+'bin') : len(expargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   114
    					actargval=actargval[ actargval.index(os.sep+'bin') : len(actargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   115
    				if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   116
    					found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   117
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   118
    						
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   119
    			if exparg in "forcebaseinclude forcecurrentinclude".split():			
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   120
    				list1=expargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   121
    				list2=actargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   122
    				if len(list1) == len(list2):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   123
    				    for i in range(0,len(list1)): 
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   124
    				        list1[i]=list1[i][ list1[i].index(os.sep+'bin') : len(list1[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   125
    				        list2[i]=list2[i][ list2[i].index(os.sep+'bin') : len(list2[i]) ]        	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   126
    				    found=checklists(list1,list2)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   127
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   128
    				
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   129
    			if exparg in "baselinedir currentdir baselinelibdir currentlibdir baselinedlldir currentdlldir baseplatformheaders currentplatformheaders reportfile".split():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   130
    				list1=expargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   131
    				list2=actargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   132
    				if len(list1) == len(list2):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   133
    				    for i in range(0,len(list1)):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   134
    				    	if list1[i].find(os.sep+'tsrc') != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   135
    				    		list1[i]=list1[i][ list1[i].index(os.sep+'tsrc') : len(list1[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   136
    				    		list2[i]=list2[i][ list2[i].index(os.sep+'tsrc') : len(list2[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   137
    				    	else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   138
    				    		list1[i]=list1[i][ list1[i].index(os.sep+'data') : len(list1[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   139
    				    		list2[i]=list2[i][ list2[i].index(os.sep+'data') : len(list2[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   140
    				    found=checklists(list1,list2)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   141
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   142
					
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   143
    			if exparg in "baselinedlldir currentdlldir reportfile".split():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   144
    				list1=expargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   145
    				list2=actargval.split(';')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   146
    				if len(list1) == len(list2):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   147
    					  if actargval.find('.xml') != -1 and  expargval.find('.xml') != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   148
    					  	found = True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   149
    					  	break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   150
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   151
    					  for i in range(0,len(list1)):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   152
    					    list1[i]=list1[i][ list1[i].index(os.sep+'tsrc') : len(list1[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   153
    					    list2[i]=list2[i][ list2[i].index(os.sep+'tsrc') : len(list2[i]) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   154
    					  found=checklists(list1,list2)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   155
    				    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   156
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   157
    				
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   158
    			if exparg == 'set':
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   159
    				if expparent.getElementsByTagName("haversion").length > 0:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   160
    					if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   161
    						found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   162
    					break	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   163
    				if expparent.getElementsByTagName("laversion").length > 0:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   164
    					if expargval.rfind(os.sep) != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   165
    						expargval=expargval[ expargval.rindex(os.sep) : len(expargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   166
    						actargval=actargval[ actargval.rindex(os.sep) : len(actargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   167
    					if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   168
    						found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   169
    					break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   170
    						
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   171
    			if actarg == 'commandfile':
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   172
    				if expargval.rfind(os.sep) != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   173
    					expargval=expargval[ expargval.rindex(os.sep) : len(expargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   174
    					actargval=actargval[ actargval.rindex(os.sep) : len(actargval) ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   175
    					if expargval == actargval:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   176
    						found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   177
    					break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   178
    						
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   179
    			if exparg in "tools temp".split():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   180
    				found=True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   181
    				break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   182
    	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   183
    	if not found:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   184
    		return False
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   185
  		
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   186
    return True
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   187
    			
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   188
#print checkreports('headers_test_17')		
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   189
#print child  		
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   190
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   191
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   192
#Test without passing any parameters, procees should return 1 on exit
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   193
def test_00():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   194
    print "Executing test: test_00"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   195
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   196
    args = ""
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   197
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   198
    if failUnless(res, '3'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   199
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   200
    return tuple(['3', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   201
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   202
#Test passing help parameters, procees should return 1 on exit    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   203
def test_01():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   204
    print "Executing test: test_01"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   205
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   206
    args = " -h"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   207
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   208
    if failUnless(res, '8'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   209
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   210
    return tuple(['8', res, str])        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   211
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   212
#Test tool version parameter, process should return 1 on exit
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   213
def test_02():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   214
    print "Executing test: test_02"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   215
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   216
    v = re.compile('[1-9]+[.][0-9]+[.][0-9]+[ ][-][ ]([12]?[0-9]+|30|31)(nd|st|th|rd)[ ](January|February|March|April|May|June|July|August|September|October|November|December)[ ](2008|2009|2010)')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   217
    res = ''
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   218
    args = " -v > test_02.txt"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   219
    runTest(args)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   220
    f = open('test_02.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   221
    for line in f:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   222
        res = line
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   223
        if re.match( v, line):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   224
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   225
        print line    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   226
    f.close()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   227
    os.remove('test_02.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   228
    return tuple(['format : xx.yy.zz - dd month yyyy', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   229
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   230
#Test data version parameter, process should return 1 on exit
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   231
def test_03():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   232
    print "Executing test: test_03"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   233
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   234
    res = ''
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   235
    args = " -dv > test_03.txt"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   236
    runTest(args)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   237
    f = open('test_03.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   238
    for line in f:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   239
        try:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   240
            res = int(line)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   241
        except ValueError:            
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   242
            pass
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   243
        else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   244
            if ( 0 < res <= 9 ):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   245
                str = 'PASSED'            
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   246
    f.close()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   247
    os.remove('test_03.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   248
    return tuple(['integer value 0-9', repr(res), str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   249
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   250
#Test wrong parameters, process should return 3 on exit        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   251
def test_04():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   252
    print "Executing test: test_04"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   253
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   254
    args = " report.xml temp/config -j -d file -b"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   255
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   256
    if failUnless(res, '3'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   257
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   258
    return tuple(['3', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   259
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   260
#Test passing both header&libary analysis input
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   261
def test_05():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   262
    print "Executing test: test_05"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   263
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   264
    cmt = ['BASELINE_HEADERS', 'CURRENT_HEADERS', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   265
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   266
    args = " temp/config -ha -la -f test_05"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   267
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   268
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   269
    	if checkreports('headers_test_05') and checkreports('libraries_test_05'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   270
    	    str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   271
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   272
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   273
#Test execution for all headers only        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   274
def test_06():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   275
    print "Executing test: test_06"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   276
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   277
    cmt = ['REPLACE_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   278
    comment(cmt, {'EXCLUDE_DIR_HEADERS':''})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   279
    args = " temp/config -ha test_06"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   280
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   281
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   282
        if checkreports('headers_test_06'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   283
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   284
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   285
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   286
#Test executiion for all libraries only      
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   287
def test_07():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   288
    print "Executing test: test_07"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   289
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   290
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   291
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   292
    args = " temp/config -la test_07"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   293
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   294
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   295
        if checkreports('libraries_test_07'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   296
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   297
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   298
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   299
#Test execution for all headers & filter        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   300
def test_08():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   301
    print "Executing test: test_08"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   302
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   303
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   304
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   305
    args = " temp/config -ha -f test_08"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   306
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   307
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   308
        if checkreports('headers_test_08'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   309
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   310
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   311
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   312
#Test execution for all libraries & filter        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   313
def test_09():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   314
    print "Executing test: test_09"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   315
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   316
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   317
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   318
    args = " temp/config -la -f test_09"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   319
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   320
    if failUnless(res, '0'):    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   321
        if checkreports('libraries_test_09'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   322
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   323
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   324
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   325
#Test execution for only filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   326
def test_10():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   327
    print "Executing test: test_10"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   328
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   329
    shutil.copy(os.getcwd()+'/testdata/SAReport_test_10.xml',os.getcwd()+'/testdata/SAReport_test_10.xml.bak')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   330
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   331
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   332
    args = " temp/config -f test_10"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   333
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   334
    shutil.move(os.getcwd()+'/testdata/SAReport_test_10.xml.bak',os.getcwd()+'/testdata/SAReport_test_10.xml')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   335
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   336
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   337
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   338
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   339
#Test execution for multiple header analysis followed by filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   340
def test_11():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   341
    print "Executing test: test_11"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   342
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   343
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   344
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   345
    args = " temp/config -hm tsrc/testdata/headers.txt -f test_11"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   346
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   347
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   348
    	if checkreports('headers_test_11'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   349
    	    str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   350
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   351
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   352
#Test execution for multiple library analysis followed by filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   353
def test_12():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   354
    print "Executing test: test_12"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   355
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   356
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   357
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   358
    args = " temp/config -lm tsrc/testdata/libraries.txt -f test_12"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   359
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   360
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   361
        if checkreports('libraries_test_12'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   362
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   363
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   364
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   365
#Test execution combining both multiple header and library analysis
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   366
def test_13():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   367
    print "Executing test: test_13"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   368
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   369
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   370
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   371
    args = " temp/config -lm tsrc/testdata/libraries.txt -hm tsrc/testdata/headers.txt -f test_13"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   372
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   373
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   374
        if checkreports('libraries_test_13') and checkreports('headers_test_13'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   375
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   376
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   377
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   378
#Test execution for single header and single library analysis followed by filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   379
def test_14():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   380
    print "Executing test: test_14"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   381
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   382
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   383
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   384
    args = " temp/config -hs e32notif.h -ls agentdialog.dso -f test_14"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   385
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   386
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   387
    	if checkreports('headers_test_14') and checkreports('libraries_test_14'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   388
    	    str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   389
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   390
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   391
#Test execution for single header analysis followed by filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   392
def test_15():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   393
    print "Executing test: test_15"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   394
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   395
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   396
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   397
    args = " temp/config -hs bitbase.h -f test_15"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   398
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   399
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   400
        if checkreports('headers_test_15'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   401
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   402
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   403
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   404
#Test execution for single library analysis followed by filtering        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   405
def test_16():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   406
    print "Executing test: test_16"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   407
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   408
    cmt = ['REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'EXCLUDE_DIR_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   409
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   410
    args = " temp/config -ls cafutils.dso -f test_16"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   411
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   412
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   413
        if checkreports('libraries_test_16'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   414
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   415
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   416
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   417
#Test replace headers parameters
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   418
def test_17():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   419
    print "Executing test: test_17"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   420
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   421
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   422
    comment(cmt, {'REPLACE_HEADERS':'myheaderbase.h:myheadera.h'})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   423
    args = " temp/config -hs myheaderbase.h -f test_17"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   424
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   425
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   426
        if checkreports('headers_test_17'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   427
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   428
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   429
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   430
#Test Exclude directories
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   431
def test_18():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   432
    print "Executing test: test_18"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   433
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   434
    cmt = ['REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   435
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   436
    args = " temp/config -hs caf/agent.h -f test_18"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   437
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   438
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   439
        if checkreports('headers_test_18'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   440
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   441
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   442
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   443
#Test default Toolchain 
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   444
def test_19():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   445
    print "Executing test: test_19"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   446
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   447
    cmt = ['TOOLCHAIN', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'FILTER_FILE_HEADERS', 'REPORT_FILE_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   448
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   449
    args = " temp/config -ls bitgdi.dso -f test_19"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   450
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   451
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   452
        if checkreports('libraries_test_19'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   453
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   454
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   455
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   456
#Test armv5 toolchain
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   457
def test_20():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   458
    print "Executing test: test_20"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   459
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   460
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   461
    comment(cmt, {'TOOLCHAIN':'rvct', 'TOOLCHAIN_PATH':os.environ.get('RVCT22BIN')})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   462
    args = " temp/config -ls audioequalizerutility.dso -f test_20"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   463
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   464
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   465
        if checkreports('libraries_test_20'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   466
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   467
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   468
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   469
#Test without toochain path
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   470
def test_21():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   471
    print "Executing test: test_21"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   472
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   473
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   474
    if os.name == 'nt':	
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   475
        comment(cmt, {'TOOLCHAIN_PATH':''})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   476
    else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   477
        print "Testcase currently not valid for Linux\n"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   478
    args = " temp/config -ls c32.dso -f test_21"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   479
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   480
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   481
        if checkreports('libraries_test_21'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   482
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   483
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   484
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   485
#Test without platform data
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   486
def test_22():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   487
    print "Executing test: test_22"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   488
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   489
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   490
    comment(cmt, {'USE_PLATFORM_DATA':'false'})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   491
    args = " temp/config -hs s32strm.h -f test_22"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   492
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   493
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   494
        if checkreports('headers_test_22'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   495
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   496
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   497
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   498
#Test carbide plugin options
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   499
def test_23():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   500
    print "Executing test: test_23"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   501
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   502
    res = 'PID value in integer'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   503
    terms = []
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   504
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   505
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   506
    args = " temp/config -c -hs e32notif.h -ls caleninterimutils.dso -f test_23 > test_23.txt"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   507
    runTest(args)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   508
    f = open('test_23.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   509
    for line in f:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   510
        print line
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   511
        if line.find('PID:') != -1:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   512
            terms = line.split(':')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   513
            try:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   514
                val = int(terms[1])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   515
            except ValueError:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   516
                res = 'not integer'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   517
                str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   518
                break
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   519
            else:
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   520
                if (0 < val <= 100000):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   521
                    str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   522
    f.close()
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   523
    os.remove('test_23.txt')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   524
    return tuple(['integer 1-100000', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   525
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   526
#Test execution without passing config file
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   527
def test_24():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   528
    print "Executing test: test_24"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   529
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   530
    args = " -ha -la -f test_24"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   531
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   532
    if failUnless(res, '3'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   533
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   534
    return tuple(['3', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   535
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   536
#Test execution without passing report-id
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   537
def test_25():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   538
    print "Executing test: test_25"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   539
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   540
    cmt = ['REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   541
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   542
    args = " temp/config -hs e32notif.h -ls aknnotify.dso -f test_25"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   543
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   544
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   545
        if checkreports('headers_test_25') and checkreports('libraries_test_25'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   546
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   547
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   548
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   549
#Test execution for recursive headers     
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   550
def test_26():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   551
    print "Executing test: test_26"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   552
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   553
    cmt = ['RECURSIVE_HEADERS', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   554
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   555
    args = " temp/config -hs e32notif.h test_26"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   556
    res=repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   557
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   558
        if checkreports('headers_test_26'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   559
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   560
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   561
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   562
#Test execution for only filtering without issue file specified in config        
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   563
def test_27():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   564
    print "Executing test: test_27"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   565
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   566
    shutil.copy(os.getcwd()+'/testdata/SAReport_test_10.xml',os.getcwd()+'/testdata/SAReport_test_10.xml.bak')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   567
    cmt = ['ISSUES_FILE', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_LIBRARIES', 'FILTER_FILE_LIBRARIES' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   568
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   569
    args = " temp/config -f test_10"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   570
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   571
    shutil.move(os.getcwd()+'/testdata/SAReport_test_10.xml.bak',os.getcwd()+'/testdata/SAReport_test_10.xml')
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   572
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   573
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   574
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   575
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   576
#Test execution without passing the temp parameter
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   577
def test_28():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   578
    print "Executing test: test_28"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   579
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   580
    cmt = ['TEMP', 'EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   581
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   582
    args = " temp/config -hs e32notif.h -ls agentdialog.dso test_28"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   583
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   584
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   585
        if checkreports('headers_test_28') and checkreports('libraries_test_28'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   586
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   587
    shutil.rmtree(DEFAULT_TEMP)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   588
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   589
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   590
#Test execution to check baseline_sdk_dir and current_sdk_dir mandatory.
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   591
def test_29():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   592
    print "Executing test: test_29"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   593
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   594
    cmt = ['TEMP','BASELINE_SDK_DIR', 'CURRENT_SDK_DIR']
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   595
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   596
    args = " temp/config -hs e32notif.h -ls agentdialog.dso test_29"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   597
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   598
    if failUnless(res, '6'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   599
      str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   600
    shutil.rmtree(DEFAULT_TEMP)
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   601
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   602
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   603
#Test execution for relative path in baseline headers     
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   604
def test_30():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   605
    print "Executing test: test_30"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   606
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   607
    cmt = ['REPLACE_HEADERS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   608
    comment(cmt, {'BASELINE_HEADERS':'ecom'})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   609
    args = " temp/config -ha test_30"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   610
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   611
    if failUnless(res, '0'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   612
      if checkreports('headers_test_30'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   613
        str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   614
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   615
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   616
#Test execution to check for dependency between import library and dll    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   617
def test_31():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   618
    print "Executing test: test_31"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   619
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   620
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER','BASELINE_IMPORTDLLS' ]
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   621
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   622
    args = " temp/config -la -f test_31"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   623
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   624
    if failUnless(res, '6'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   625
    	str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   626
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   627
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   628
#Test execution only with default sdk, not import library and dll    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   629
def test_32():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   630
    print "Executing test: test_32"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   631
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   632
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER','BASELINE_IMPORTLIBRARIES',
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   633
            'CURRENT_IMPORTLIBRARIES','BASELINE_IMPORTDLLS','CURRENT_IMPORTDLLS']
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   634
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   635
    args = " temp/config -la test_32"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   636
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   637
    if failUnless(res, '0'):    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   638
        if checkreports('libraries_test_32'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   639
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   640
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   641
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   642
#Test execution with import library and dll    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   643
def test_33():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   644
    print "Executing test: test_33"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   645
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   646
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER']
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   647
    comment(cmt, {})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   648
    args = " temp/config -la test_33"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   649
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   650
    if failUnless(res, '0'):    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   651
        if checkreports('libraries_test_33'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   652
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   653
    return tuple(['0', res, str])
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   654
    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   655
#Test execution with multiple build target    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   656
def test_34():
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   657
    print "Executing test: test_34"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   658
    str = 'FAILED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   659
    cmt = ['EXCLUDE_DIR_HEADERS', 'REPLACE_HEADERS', 'REPORT_FILE_HEADERS', 'FILTER_FILE_HEADERS', 'REPORT_FILE_FILTER', 'OUTPUT_FILE_FILTER','BASELINE_IMPORTLIBRARIES',
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   660
            'CURRENT_IMPORTLIBRARIES','BASELINE_IMPORTDLLS','CURRENT_IMPORTDLLS']
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   661
    comment(cmt, {'BASELINE_BUILDTARGET':'ARMv5;ARMv6', 'CURRENT_BUILDTARGET':'ARMv5;ARMv6'})
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   662
    args = " temp/config -la test_34"
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   663
    res = repr(runTest(args))
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   664
    if failUnless(res, '0'):    
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   665
        if checkreports('libraries_test_34'):
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   666
            str = 'PASSED'
a0eee409ff14 Updates to CompatibilityAnalyser
shrivatsa
parents:
diff changeset
   667
    return tuple(['0', res, str])