Go to the documentation of this file.00001
00002 import sys
00003 import os
00004 import string
00005 from locatescript import copydata
00006 from locatescript import locatescript
00007 import inspect
00008
00009
00010 def description():
00011 return "Test of the occurence of a segfault in the fits file handling in tasks with async==false"
00012
00013 pass_on = { "ms_name" : "test.ms",
00014 "image_name" : "test.clean.image"
00015 }
00016
00017 a=inspect.stack()
00018 stacklevel=0
00019 for k in range(len(a)):
00020 if (string.find(a[k][1], 'ipython console') > 0):
00021 stacklevel=k
00022 break
00023 gl=sys._getframe(stacklevel).f_globals
00024
00025 def data():
00026
00027 myfiles = []
00028 for i in pass_on.keys():
00029 myfiles.append(pass_on[i])
00030 return myfiles
00031
00032 def doCopy():
00033
00034
00035
00036
00037
00038
00039 return [1,1]
00040
00041 def run( fetch=False ):
00042
00043
00044 if fetch:
00045 for f in data( ):
00046 copydata( f, os.getcwd( ) )
00047
00048
00049 try:
00050 lepath=locatescript('async-segfault_regression.py')
00051 print 'Script used is ',lepath
00052 execfile(lepath, gl, pass_on)
00053 except:
00054 print 'execution failed: ', sys.exc_info()
00055 raise
00056
00057 return []