print(0)
return
-TFILE="/tmp/tnum.csv"
-TFILEPRE="/tmp/tnum.csv_pre"
+
+lenArgs=len(argv)
+
+if argv[4] == 'headed':
+ PROFILE_DIR = 'tizeniot'
+else:
+ PROFILE_DIR = argv[4]
+
+if ( argv[1] == '-f' and lenArgs > 6 ):
+ TFILEPRE="/tmp/"+"workspace"+"_"+PROFILE_DIR+"_"+argv[6]+'_'+argv[3]+"_install"+"/tnum.csv_pre"
+ NEWFILE="/tmp/"+"workspace"+"_"+PROFILE_DIR+"_"+argv[6]+'_'+argv[3]+"_install"+"/tnum.csv_pre_new"
+elif ( argv[1] == '-anum' or argv[1] == '-mnum' ):
+ TFILEPRE="/tmp/"+"workspace"+"_"+PROFILE_DIR+"_"+argv[7]+'_'+argv[3]+"_install"+"/tnum.csv_pre"
+ NEWFILE="/tmp/"+"workspace"+"_"+PROFILE_DIR+"_"+argv[7]+'_'+argv[3]+"_install"+"/tnum.csv_pre_new"
+else:
+ TFILE="/tmp/tnum.csv"
+ TFILEPRE="/tmp/tnum.csv_pre"
+ NEWFILE="/tmp/tnum.csv_pre_new"
+
+
def tc_fullinfo(TC_FILES):
TC_LIST=[]
fil=open(TC_FILES)
return
-TFILE='/tmp/tnum.csv'
-NEWFILE="/tmp/tnum.csv_pre_new"
def tc_anum2(TC_FILES):
TC_COUNT=0
### script starts here ###
-lenArgs=len(argv)
-
if ( lenArgs == 1 ):
sys.exit()
exit('No such file: '+FILE)
MODULE_NAME_MOD=MODULE_NAME+'-native-'+TYPE
+if PROFILE == 'headed':
+ PROFILE_DIR = 'tizeniot'
+else:
+ PROFILE_DIR = PROFILE
+ARCH_PROFILE_DIR='workspace'+'_'+PROFILE_DIR+'_'+ARCH+'_'+TYPE+'_install'
WORKSPACE_SRC_DIR=os.getenv('HOME')+dirSeparator+'workspace'+'_'+PROFILE+'_'+ARCH+dirSeparator+MODULE_NAME_MOD
CATEGORY='IntegrationTestCases'
MAN_NUM=output
TOT_NUM=str(int(AUTO_NUM)+int(MAN_NUM))
-TFILE=dirSeparator+'tmp'+dirSeparator+'tempfile.xml'
+TFILE=dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tempfile.xml'
if ( path.exists(TFILE) ):
os.remove(TFILE)
MODULE_FULL_NAME='org.tizen.'+MODULE_NAME_MOD
MODULE_NAME_C=capwords(MODULE_NAME, '-').replace('-', '')
SCRIPT_DIR=path.abspath(path.dirname(argv[0]))
+ARCH_PROFILE_DIR='workspace'+'_'+profile+'_'+arch+'_'+argv[1]+'_install'
WORKSPACE_SRC_DIR=getenv('HOME')+dirSeparator+'workspace'+'_'+profile+'_'+arch+dirSeparator+MODULE_NAME_MOD
PACKAGING_DIR =SCRIPT_DIR+dirSeparator+".."+dirSeparator+"packaging"+dirSeparator+BUILD_TYPE+dirSeparator
if ( path.exists(FILE) ):
os.remove(FILE)
-TFILE=dirSeparator+'tmp'+dirSeparator+'tcs.csv'
+TFILE=dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tcs.csv'
if ( path.exists(TFILE) ):
os.remove(TFILE)
for line in tfile_pre:
print(line.strip('\n'))
tfile_pre.close()
+ print(output)
exit('Error executing retriever.py!!! Aborting...')
# TODO sort tcs based on set field (module)
status=os.system('cat '+TFILE+'_pre | sort -t\',\' -k2,2 -s > '+TFILE)
#####exclude.list#####
if ( arch == 'x86' ):
if os.path.exists('custom_tclist/Emulator.tclist_'+profile) and os.path.getsize('custom_tclist/Emulator.tclist_'+profile) > 0:
- NEWFILE="/tmp/tnum.csv_pre_new"
+ NEWFILE="/tmp/"+ARCH_PROFILE_DIR+"/tnum.csv_pre_new"
dest=open(TFILE,'r')
new_file=open(NEWFILE,'w')
src=open('custom_tclist/Emulator.tclist_'+profile,'r')
new_file.close()
shutil.copy(NEWFILE,TFILE)
if os.path.exists('exclude.list'):
- NEWFILE="/tmp/tnum.csv_pre_new"
+ NEWFILE="/tmp/"+ARCH_PROFILE_DIR+"/tnum.csv_pre_new"
dest=open(TFILE,'r')
new_file=open(NEWFILE,'w')
src=open('exclude.list','r')
sys.exit('Package Not Found '+PKG_VNAME)
TIZEN____='tizen_native_10.0'
TCT_DIR='opt'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE
+ ARCH_PROFILE_DIR='workspace'+'_'+ sys.argv[2]+'_'+sys.argv[1]+'_'+TYPE+'_install'
TO_PKG_DIR=dirSeparator+'opt'+dirSeparator+'tct'+dirSeparator+TIZEN____+dirSeparator+'packages'
print('Workspace Path:' +WORKSPACE_DIR)
print('Deploying '+TYPE+'->'+MODNAME+' suite to tct-mgr...')
# prepare tct directory and files
print('-- Preparing suite .zip file...')
- print('---- Creating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' directory')
- removeDir(dirSeparator+'tmp'+dirSeparator+'opt')
- os.makedirs(dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ print('---- Creating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' directory')
+ removeDir(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'opt')
+ os.makedirs(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# README
- print('---- Copying '+dirSeparator+'tmp'+dirSeparator+TCT_DIR)
- shutil.copy('scripts_tpk'+dirSeparator+'README', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ print('---- Copying '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'README', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# tpk
- print('---- Copying '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' package')
+ print('---- Copying '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' package')
try:
- shutil.copy(TPK_DIR+dirSeparator+PKG_FNAME, dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy(TPK_DIR+dirSeparator+PKG_FNAME, dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
except(shutil.Error):
sys.exit('Aborting...')
# inst.sh
- print('---- Generating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh file')
+ print('---- Generating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh file')
# TODO port for windows
#status=os.system('sed -e "s:%{PKG_NAME}:"'+PKG_NAME+'":g" \
# -e "s:%{PKG_FULLNAME}:"'+PKG_FNAME+'":g" \
# -e "s:%{PKG_DIR}:"/opt/usr/media/tct/'+TCT_DIR+'":g" \
# scripts_tpk/inst.sh > /tmp/'+TCT_DIR+'/inst.sh')
src_f=open('scripts_tpk'+dirSeparator+'inst.sh')
- dest_f=open(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', 'w')
+ dest_f=open(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', 'w')
for line in src_f:
#if ( (status % 256) != 0 ):
# sys.exit('Error executing inst.sh!!! Aborting...')
- os.chmod(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', stat.S_IXUSR|stat.S_IXGRP|stat.S_IXOTH|stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR)
+ os.chmod(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', stat.S_IXUSR|stat.S_IXGRP|stat.S_IXOTH|stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR)
# tests.xml
- print('---- Generating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR)
- status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tctestsgen.py '+TYPE+' '+MODNAME+' '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' '+PROFILE+' '+ARCH)
+ print('---- Generating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
+ status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tctestsgen.py '+TYPE+' '+MODNAME+' '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' '+PROFILE+' '+ARCH)
if ( status > 0 ):
+ print(output)
print('Failed to execute tctestsgen.py!!!')
sys.exit('Aborting...')
process1 = "dali-"
process2 = "_dali"
if ( re.search(process_dali_application, MODNAME) != None ):
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_app_launch.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_app_launch.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
elif ( re.search(process1, MODNAME) != None or re.search(process2, MODNAME) != None ):
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_multi_app_launch.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_multi_app_launch.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
elif ( COVERAGE == '1' ):
print('-- Using Coverage Wrapper...')
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_coverage.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_coverage.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
else:
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# LICENSE, add_all_smack_rule.sh, all_smack.rule
- shutil.copy('scripts_tpk'+dirSeparator+'LICENSE', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'LICENSE', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# gentestsxml.py generate multiple TC in tests.xml
if int(TC_COUNT) > 1:
- gentestsxml.gentestxmlfile(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator, TC_COUNT)
+ gentestsxml.gentestxmlfile(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator, TC_COUNT)
# zip
- print('---- Preparing '+dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-'+'native-'+TYPE+'-10.0.zip file')
+ print('---- Preparing '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-'+'native-'+TYPE+'-10.0.zip file')
# clear old zips
- removeDir(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages')
- os.makedirs(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages')
+ removeDir(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages')
+ os.makedirs(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages')
# create new zip
#os.chdir(dirSeparator+'tmp')
- zipper(dirSeparator+'tmp'+dirSeparator+'opt', dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', True, dirSeparator)
+ zipper(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'opt', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', True, dirSeparator)
# deployment
print('-- Suite deployment...')
print('---- Copying '+TO_PKG_DIR+dirSeparator+PROFILE+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip')
if ( os.path.exists(TO_PKG_DIR+dirSeparator+PROFILE) == False):
os.makedirs(TO_PKG_DIR+dirSeparator+PROFILE)
- shutil.copy(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', TO_PKG_DIR+dirSeparator+PROFILE)
+ shutil.copy(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', TO_PKG_DIR+dirSeparator+PROFILE)
print('---- Updating '+TO_PKG_DIR+dirSeparator+'pkg_infos'+dirSeparator+PROFILE+'_pkg_info.xml')
status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tcpackageslistsgen.py '+TYPE+' '+MODNAME+' '+PROFILE+' '+TO_PKG_DIR+dirSeparator+'pkg_infos'+dirSeparator+PROFILE+'_pkg_info.xml 0'+' '+TC_COUNT+' '+ARCH)
if ( status > 0 ):
dirSeparator='\\'
PROJECT_DIR=(os.path.abspath(os.path.dirname(sys.argv[0])))
-TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'
+if ( len(sys.argv) >= 6 ):
+ TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'+'_'+ sys.argv[2]+'_'+sys.argv[1]+'_'+sys.argv[5]
+else:
+ TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'+'_'+ sys.argv[2]+'_'+sys.argv[1]
WORKSPACE_DIR=os.getenv('HOME')+dirSeparator+'workspace'+'_'+ sys.argv[2]+'_'+sys.argv[1]
# TODO use argparse
sys.exit('Package Not Found '+PKG_VNAME)
TIZEN____='tizen_native_10.0'
TCT_DIR='opt'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE
+ ARCH_PROFILE_DIR='workspace'+'_'+ sys.argv[2]+'_'+sys.argv[1]+'_'+TYPE+'_install'
TO_PKG_DIR=dirSeparator+'opt'+dirSeparator+'tct'+dirSeparator+TIZEN____+dirSeparator+'packages'
print('Workspace Path:' +WORKSPACE_DIR)
print('Deploying '+TYPE+'->'+MODNAME+' suite to tct-mgr...')
# prepare tct directory and files
print('-- Preparing suite .zip file...')
- print('---- Creating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' directory')
- removeDir(dirSeparator+'tmp'+dirSeparator+'opt')
- os.makedirs(dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ print('---- Creating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' directory')
+ removeDir(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'opt')
+ os.makedirs(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# README
- print('---- Copying '+dirSeparator+'tmp'+dirSeparator+TCT_DIR)
- shutil.copy('scripts_tpk'+dirSeparator+'README', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ print('---- Copying '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'README', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# tpk
- print('---- Copying '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' package')
+ print('---- Copying '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' package')
try:
- shutil.copy(TPK_DIR+dirSeparator+PKG_FNAME, dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy(TPK_DIR+dirSeparator+PKG_FNAME, dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
except(shutil.Error):
sys.exit('Aborting...')
# inst.sh
- print('---- Generating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh file')
+ print('---- Generating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh file')
src_f=open('scripts_tpk'+dirSeparator+'inst.sh')
- dest_f=open(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', 'w')
+ dest_f=open(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', 'w')
for line in src_f:
pkg_dir_m=re.search('^\sPKG_DIR=(?P<pkg_dir>%{PKG_DIR})', line)
pkg_name_m=re.search('^\sPKG_NAME=(?P<pkg_name>%{PKG_NAME})', line)
#if ( (status % 256) != 0 ):
# sys.exit('Error executing inst.sh!!! Aborting...')
- os.chmod(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', stat.S_IXUSR|stat.S_IXGRP|stat.S_IXOTH|stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR)
+ os.chmod(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'inst.sh', stat.S_IXUSR|stat.S_IXGRP|stat.S_IXOTH|stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH|stat.S_IWUSR)
# tests.xml
- print('---- Generating '+dirSeparator+'tmp'+dirSeparator+TCT_DIR)
- status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tctestsgen.py '+TYPE+' '+MODNAME+' '+dirSeparator+'tmp'+dirSeparator+TCT_DIR+' '+PROFILE+' '+ARCH)
+ print('---- Generating '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
+ status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tctestsgen.py '+TYPE+' '+MODNAME+' '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+' '+PROFILE+' '+ARCH)
if ( status > 0 ):
print('Failed to execute tctestsgen.py!!!')
sys.exit('Aborting...')
process1 = "dali-"
process2 = "_dali"
if ( re.search(process_dali_application, MODNAME) != None ):
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_app_launch.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_app_launch.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
elif ( re.search(process1, MODNAME) != None or re.search(process2, MODNAME) != None ):
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_multi_app_launch.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_dali_multi_app_launch.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
elif ( COVERAGE == '1' ):
print('-- Using Coverage Wrapper...')
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_coverage.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper_coverage.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator+'external_wrapper.sh')
else:
- shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper.sh', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'external_wrapper.sh', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# LICENSE, add_all_smack_rule.sh, all_smack.rule
- shutil.copy('scripts_tpk'+dirSeparator+'LICENSE', dirSeparator+'tmp'+dirSeparator+TCT_DIR)
+ shutil.copy('scripts_tpk'+dirSeparator+'LICENSE', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR)
# gentestsxml.py generate multiple TC in tests.xml
if int(TC_COUNT) > 1:
- gentestsxml.gentestxmlfile(dirSeparator+'tmp'+dirSeparator+TCT_DIR+dirSeparator, TC_COUNT)
+ gentestsxml.gentestxmlfile(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+TCT_DIR+dirSeparator, TC_COUNT)
# zip
- print('---- Preparing '+dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-'+'native-'+TYPE+'-10.0.zip file')
+ print('---- Preparing '+dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-'+'native-'+TYPE+'-10.0.zip file')
# clear old zips
- removeDir(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages')
- os.makedirs(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages')
+ removeDir(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages')
+ os.makedirs(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages')
# create new zip
#os.chdir(dirSeparator+'tmp')
- zipper(dirSeparator+'tmp'+dirSeparator+'opt', dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', True, dirSeparator)
+ zipper(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'opt', dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', True, dirSeparator)
# deployment
print('-- Suite deployment...')
print('---- Copying '+TO_PKG_DIR+dirSeparator+PROFILE+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip')
if ( os.path.exists(TO_PKG_DIR+dirSeparator+PROFILE) == False):
os.makedirs(TO_PKG_DIR+dirSeparator+PROFILE)
- shutil.copy(dirSeparator+'tmp'+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', TO_PKG_DIR+dirSeparator+PROFILE)
+ shutil.copy(dirSeparator+'tmp'+dirSeparator+ARCH_PROFILE_DIR+dirSeparator+'tct'+dirSeparator+'packages'+dirSeparator+'tct-'+MODNAME+'-native-'+TYPE+'-10.0.zip', TO_PKG_DIR+dirSeparator+PROFILE)
print('---- Updating '+TO_PKG_DIR+dirSeparator+'pkg_infos'+dirSeparator+PROFILE+'_pkg_info.xml')
status, output=subprocess.getstatusoutput('scripts_tpk'+dirSeparator+'tcpackageslistsgen.py '+TYPE+' '+MODNAME+' '+PROFILE+' '+TO_PKG_DIR+dirSeparator+'pkg_infos'+dirSeparator+PROFILE+'_pkg_info.xml 0'+' '+TC_COUNT+' '+ARCH)
if ( status > 0 ):
dirSeparator='\\'
PROJECT_DIR=(os.path.abspath(os.path.dirname(sys.argv[0])))
-TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'
+if ( len(sys.argv) >= 6 ):
+ TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'+'_'+ sys.argv[2]+'_'+sys.argv[1]+'_'+sys.argv[5]
+else:
+ TPK_DIR=os.getenv('HOME')+dirSeparator+'tpks'+'_'+ sys.argv[2]+'_'+sys.argv[1]
WORKSPACE_DIR=os.getenv('HOME')+dirSeparator+'workspace'+'_'+ sys.argv[2]+'_'+sys.argv[1]
# TODO use argparse