sbsv2/raptor/test/unit_suite/raptor_unit.py
changeset 28 b8fa7dfeeaa1
parent 13 c327db0664bb
equal deleted inserted replaced
27:3a31ca4b29c4 28:b8fa7dfeeaa1
     1 #
     1 #
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     3 # All rights reserved.
     4 # This component and the accompanying materials are made available
     4 # This component and the accompanying materials are made available
     5 # under the terms of the License "Eclipse Public License v1.0"
     5 # under the terms of the License "Eclipse Public License v1.0"
     6 # which accompanies this distribution, and is available
     6 # which accompanies this distribution, and is available
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
   106 		hits = 0
   106 		hits = 0
   107 		for c in layers[0].children:
   107 		for c in layers[0].children:
   108 			if len(c.specs) > 0: 
   108 			if len(c.specs) > 0: 
   109 				# something will be built from this component because
   109 				# something will be built from this component because
   110 				# it has at least one spec
   110 				# it has at least one spec
   111 				shortname = str(c.bldinf_filename)[len(os.environ['SBS_HOME'])+1:]
   111 				sbsHome = os.environ['SBS_HOME'].rstrip('\\/')
       
   112 				shortname = str(c.bldinf_filename)[len(sbsHome)+1:]
   112 				self.assertTrue(shortname in expected_spec_output)
   113 				self.assertTrue(shortname in expected_spec_output)
   113 				hits += 1
   114 				hits += 1
   114 
   115 
   115 		# Ensure there actually are 5 build specs
   116 		# Ensure there actually are 5 build specs
   116 		self.assertEqual(hits, len(expected_spec_output) - 1)
   117 		self.assertEqual(hits, len(expected_spec_output) - 1)