Source
#pstr += "["+inspect.stack()[1][3]+"] : To re-run this test : mpirun -n 4 -xterm 0 `which casa` -c `echo $CASAPATH | awk '{print $1}'`/gcwrap/python/scripts/regressions/admin/runUnitTest.py test_refimager_parallel["+ inspect.stack()[1][3] +"]"
##########################################################################
#
# Test programs for the refactored imager's parallel runs: test_refimager_parallel
#
# Add tests for
# - cube/cont parallel with multiple MSs, MMS, w/wo model writes, restarts
# - mosaic, AWProj cont and cube
#
##########################################################################
import os
import sys
import shutil
import commands
import numpy
from __main__ import default
from tasks import *
from taskinit import *
import unittest
import inspect
from imagerhelpers.test_imager_helper import TestHelpers
_ia = iatool( )
refdatapath = os.environ.get('CASAPATH').split()[0] + '/data/regression/unittest/clean/refimager/'
#refdatapath = "/export/home/riya/rurvashi/Work/ImagerRefactor/Runs/UnitData/"
#refdatapath = "/home/vega/rurvashi/TestCASA/ImagerRefactor/Runs/WFtests/"
##############################################
##############################################
## List to be run
def suite():
return [test_cont,test_cube]
###################################################
## Base Test class with Utility functions
###################################################
class testref_base_parallel(unittest.TestCase):
def setUp(self):
self.epsilon = 0.05
self.msfile = ""
self.img = "tst"
# To use subdir in the output image names in some tests (CAS-10937)
self.img_subdir = 'refimager_tst_subdir'
self.th = TestHelpers()
def tearDown(self):
""" don't delete it all """
# self.delData()
# Separate functions here, for special-case tests that need their own MS.
def prepData(self,msname=""):
os.system('rm -rf ' + self.img_subdir)
os.system('rm -rf ' + self.img+'*')
if msname != "":
self.msfile=msname
if (os.path.exists(self.msfile)):
os.system('rm -rf ' + self.msfile)