[llvm-commits] CVS: llvm/test/QMTestDB/QMTest/llvm.py

John Criswell criswell at cs.uiuc.edu
Fri Aug 22 19:54:19 PDT 2003


Changes in directory llvm/test/QMTestDB/QMTest:

llvm.py updated: 1.2 -> 1.3

---
Log message:

Added code that creates a directory for each TestRunner test.
Added code that attempts to set the coredump size to zero, but it doesn't seem
to work.



---
Diffs of the changes:

Index: llvm/test/QMTestDB/QMTest/llvm.py
diff -u llvm/test/QMTestDB/QMTest/llvm.py:1.2 llvm/test/QMTestDB/QMTest/llvm.py:1.3
--- llvm/test/QMTestDB/QMTest/llvm.py:1.2	Wed Aug 20 15:42:18 2003
+++ llvm/test/QMTestDB/QMTest/llvm.py	Fri Aug 22 11:24:25 2003
@@ -15,6 +15,7 @@
 
 import os
 import filecmp
+import resource
 
 ##############################################################################
 #
@@ -45,6 +46,11 @@
 
 	def Run (self, context, result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -115,6 +121,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -182,6 +193,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -269,6 +285,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -335,6 +356,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -401,6 +427,11 @@
 	#
 	def Run (self, context, result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -536,6 +567,11 @@
 	#
 	def Run(self,context,result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Determine where the build directory is located.
 		#
 		srcroot=context['srcroot']
@@ -629,6 +665,11 @@
 
 	def Run (self, context, result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -693,6 +734,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -746,6 +792,11 @@
 
 	def Run (self, context, result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -799,6 +850,12 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		coresize=context['coresize']
+		resource.setrlimit (resource.RLIMIT_CORE, (coresize,coresize))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -807,6 +864,17 @@
 		buildtype=context['buildtype']
 
 		#
+		# Create a new directory based upon the test's name.
+		#
+		tmpdir = tmpdir + '/' + os.path.basename (self.srcfile)
+		if ((os.access(tmpdir,os.F_OK)) == 0):
+			try:
+				os.mkdir (tmpdir)
+			except OSError:
+				result.Fail ('Failed to make ' + tmpdir)
+				return
+
+		#
 		# Construct the pathname of the source file and output script
 		# file.
 		#
@@ -896,6 +964,11 @@
 	#
 	def SetUp(self, context, result):
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Determine the pathnames to the source code and object code.
 		#
 		self.srcroot     = context['srcroot']
@@ -971,6 +1044,11 @@
 	def Run (self, context, result):
 
 		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
+		#
 		# Fetch the source and build root directories from the context.
 		#
 		srcroot=context['srcroot']
@@ -1057,6 +1135,11 @@
 	#	the specified source file.
 	#
 	def SetUp(self, context, result):
+		#
+		# Set the core dump size
+		#
+		resource.setrlimit (resource.RLIMIT_CORE, (context['coresize'],-1))
+
 		#
 		# Determine the pathnames to the source code and object code.
 		#





More information about the llvm-commits mailing list