Fixed wip
authordavid.stone@nokia.com
Wed, 09 Dec 2009 14:00:42 +0000
branchwip
changeset 64 48417ae3ae38
parent 63 f6e0bbce6a2f
child 65 6209062c2236
Fixed
sbsv2/raptor/test/timing_tests/parse_time_exports_mmps.py
--- a/sbsv2/raptor/test/timing_tests/parse_time_exports_mmps.py	Mon Dec 07 14:58:25 2009 +0000
+++ b/sbsv2/raptor/test/timing_tests/parse_time_exports_mmps.py	Wed Dec 09 14:00:42 2009 +0000
@@ -1,8 +1,8 @@
 
 from raptor_tests import SmokeTest, ReplaceEnvs
+import os
 
 def generate_files():
-	import os
 	
 	bldinf_path = ReplaceEnvs("$(SBS_HOME)/test/timing_tests/test_resources/parse_time/bld.inf")
 	bldinf = open(bldinf_path, "w")
@@ -27,7 +27,7 @@
 prj_mmpfiles
 """
 	test_dir = ReplaceEnvs("$(SBS_HOME)/test/timing_tests/test_resources/parse_time")
-	for number in range(0, 500):
+	for number in range(0, 250):
 		mmp_path = ("parse_timing_" + str(number).zfill(3) + ".mmp")
 		mmp_file = open((test_dir + "/" + mmp_path), "w")
 		mmp_file.write("""/*
@@ -61,7 +61,7 @@
 		except:
 			pass
 		
-		for number2 in range (0, 5):
+		for number2 in range (0, 10):
 			source_file = ("/file_" + str(number2) + ".txt ")
 			export_file = open((test_dir + "/" + source_dir + source_file), "w")
 			export_file.write(str(number2))
@@ -81,13 +81,14 @@
 def delete_files():
 	import shutil
 	
-	test_dir = "$(SBS_HOME)/test/timing_tests/test_resources/parse_time"
+	test_dir = ReplaceEnvs("$(SBS_HOME)/test/timing_tests/test_resources/parse_time")
 	objects = os.listdir(test_dir)
 	for object in objects:
-		if os.path.isfile(object):
-			os.remove(object)
+		object_path = (test_dir + "/" + object)
+		if os.path.isfile(object_path):
+			os.remove(object_path)
 		else:
-			shutil.rmtree(object)
+			shutil.rmtree(object_path)
 	
 
 def run():
@@ -100,8 +101,8 @@
 	t.name = "parse_time_exports_mmps"
 	t.description = """Test to measure time taken to parse a large number of
 			exports and mmps"""
-	t.command = "sbs -b timing_tests/test_resources/parse_time/bld.inf " + \
-			"-c armv5_urel"
+	t.command = "sbs -b timing_tests/test_resources/parse_time/bld.inf -n " + \
+			"-c armv5_urel --toolcheck=off --timing"
 	t.run()
 	
 	delete_files()