Exemplo n.º 1
0
def setup_license():
    print("base directory " + config.ConfigParams.base_directory)
    print("proj dir " + config.ConfigParams.proj_directory)
    # Need to find place for licenses.
    # g = config.ConfigParams.proj_directory + "license_test/Licenses/server_licenses"
    # g = "~/Desktop/server_licenses" this
    g = config.ConfigParams.license_test_dir + "\\server_licenses"
    print(g)
    # g = "C:\\Users\\Niall Buckley\\Desktop\\server_licenses"
    for subdir, dirs, files in os.walk(g, topdown=False):
        for license_file in files:
            if license_file != ".DS_Store":
                if test_utils.is_mac():
                    copyCmd = 'cp ' + str(g) + '/' + str(license_file) + " " + """ "/Library/Application Support/BorisFX/rlm/" """
                    print("Command " + copyCmd)
                    os.system(copyCmd)
                elif test_utils.is_win():
                    copyCmd = 'robocopy "C:\\Users\\Niall Buckley\\Desktop\\server_licenses" "C:\\Program Files\\BorisFX\\rlm" ' + str(license_file)
                    subprocess.call(copyCmd)
                # copyCmd = 'robocopy "C:\\Users\\Niall Buckley\\Desktop\\server_licenses" "C:\\Program Files\\BorisFX\\rlm" ' + str(license_file)
                # subprocess.call(copyCmd)
                #copyCmd = 'cp /Users/borisfx/Desktop/DedupedData/ae_test_projects/license_test/Licenses/server_licenses/multiSapph.lic "/Library/Application Support/BorisFX/rlm/"'
                #subprocess.call(copyCmd)
                refresh_server()
                config.ConfigParams.file_line += 1
                render_test._run_render_test()
                if test_utils.is_mac():
                    mac_utils.quit_ae(config.ConfigParams.target_app)
                remove_license(license_file)
Exemplo n.º 2
0
def install_latest_bcc_build():
    print ("install_latest_bcc_build")
    if test_utils.is_mac():
        config.ConfigParams.sub_build_install_path = config.ConfigParams.sub_build_install_path.replace('BCCAE',
                                                                                                        'BCCOFX')

    # Find the latest installer
    latest_installer = ""
    inst_name = ''
    if os.path.isdir(config.ConfigParams.installer_search_path):
        latest_installer = get_latest_build_path(config.ConfigParams.installer_search_path)
        if latest_installer:
            for item in os.listdir(latest_installer):
                if test_utils.is_mac():
                    if item.endswith('.dmg'):
                        inst_name = item
                else:
                    if item.endswith('.exe'):
                        inst_name = item
    if inst_name != config.ConfigParams.installer_name:
        print (
                    'Found a different installer name in search dir (' + inst_name + ') : using that one instead of ' + config.ConfigParams.installer_name)
        config.ConfigParams.installer_name = inst_name

    latest_installer = os.path.join(latest_installer, config.ConfigParams.installer_name)
    print ("latest installer")
    print (os.path.join(latest_installer, ''))
    dest_path = os.path.join(config.ConfigParams.base_directory, config.ConfigParams.installer_name)
    if config.ConfigParams.installer_name in os.listdir(config.ConfigParams.base_directory):
        os.remove(os.path.join(config.ConfigParams.base_directory, config.ConfigParams.installer_name))
    if os.path.isfile(latest_installer):
        copy(latest_installer, dest_path)
    else:
        print("ERROR: Latest installer was not found")
        return False

    # TODO: change to quit_app (to quit any of the potential hosts, rather than just AE)
    print("Quit AE if it is running")
    plat_utils.quit_ae(config.ConfigParams.target_app)

    print("Installing BCC Build from:{}".format(latest_installer))
    print ("Installing BCC Build from:{}".format(latest_installer))
    # results.TestResults.installed_build = latest_installer

    install_build(dest_path)
    return True
Exemplo n.º 3
0
def remove_license(license_file):
    #deleteCmd ='del ' + '"C:\\Program Files\\BorisFX\\rlm\\' + str(license_file) + '"'
    if test_utils.is_win():
        deleteCmd = 'del ' + '"C:\\Program Files\\BorisFX\\rlm\\' + str(license_file) + '"'
        subprocess.call(deleteCmd, shell=True)
    elif test_utils.is_mac():
        deleteCmd = 'rm ' + '"/Library/Application Support/BorisFX/rlm/' + str(license_file) + '"'
        os.system(deleteCmd)
Exemplo n.º 4
0
def install_build(installer_path):
    if test_utils.is_mac():
        # good for all Mac test systems
        volumes_dir = '/Volumes'
        volume_name = ''
        bcc_pkg_name = ''

        # Mount the disc image
        mount_cmd = "hdiutil attach " + installer_path
        time.sleep(3)
        retVal = os.system(mount_cmd)

        if (retVal != 0):
            print 'Did not mount on first try!'
            time.sleep(5)
            retVal = os.system(mount_cmd)

            if (retVal != 0):
                raise Exception('Failed to mount installer disc image')

        for item in os.listdir(volumes_dir):
            if item.find('Continuum') > -1:
                # for BCC search for 'Adobe' rather than 'AE'
                if item.find(config.ConfigParams.plugin_catagory) > -1 or item.find('Adobe') > -1:
                    volume_name = item
        if volume_name:
            volume_name = os.path.join(volumes_dir, volume_name)
            for item in os.listdir(volume_name):
                if item.find('Continuum') > -1:
                    if item.find(config.ConfigParams.plugin_catagory) > -1 or item.find('Adobe') > -1:
                        bcc_pkg_name = '"' + item + '"'

        # run the installer
        install_cmd = "installer -target / -package /Volumes/" + os.path.splitext(config.ConfigParams.installer_name)[
            0] + "/" + bcc_pkg_name
        full_cmd = "echo " + config.ConfigParams.mac_admin_password + " | sudo -S " + install_cmd
        print (full_cmd)
        retVal = os.system(full_cmd)

        if (retVal != 0):
            raise Exception('Failed to run installer')

        # wait for install to finish?

        # Un-mount the disc image
        unmount_cmd = 'hdiutil unmount /Volumes/' + os.path.splitext(config.ConfigParams.installer_name)[0]
        retVal = os.system(unmount_cmd)

        if (retVal != 0):
            raise Exception('Failed to unmount installer volume')

    else:
        # Run the installer in silent
        print(installer_path)
        # cmd = str(installer_path) + ' /VERYSILENT  /SP-'
        # works!
        cmd = '"C:\\Users\\Niall Buckley\\Documents\\ae_test_env\\BCC13_AE_WinESD.exe"' + ' /VERYSILENT  /SP-'
        ret_val = subprocess.call(cmd)
        print("Finished running the silent install")
        # activate_license.activate_license(1397-3766-7629-7051)
        activate_license.find_license()
Exemplo n.º 5
0
# grab the git hash from build.xml in jenkins jobs folder
import xml.etree.ElementTree as ET

import server_license

try:
    import faulthandler

    faulthandler.enable()
    print 'Faulthandler activated!'
except ImportError:
    print 'No Faulthandler available!'

import test_utils

if test_utils.is_mac():
    import mac_utils as plat_utils
elif test_utils.is_win():
    import win_utils as plat_utils


def handle_cmd_args():
    parser = argparse.ArgumentParser()
    parser.add_argument("--mocha", help="override config file to run tests for mocha", action='store_true')
    parser.add_argument('--sapphire', help='override config file to run tests for Sapphire', action='store_true')
    parser.add_argument('--pprobcc', help='override config file to run tests for Premiere Pro render test',
                        action='store_true')
    parser.add_argument('--pprosapphire', help='override config file to run tests for Premiere Pro render test',
                        action='store_true')
    parser.add_argument("--mochaserver", help="override config file to run tests for mocha", action='store_true')
    parser.add_argument("--sapphireserver", help="override config file to run tests for mocha", action='store_true')
Exemplo n.º 6
0
def install_SapphireAE():
	split_list = []
	#list builds in store and filter by age to make naming consistent
	if test_utils.is_mac():
		install_path = '/Users/borisfx/Desktop/Engineering/tmp/buildbot-builds/master-sapphire-mac-ae'
	else:
		# should work for all Win test machines even if Engineering assigned as a different letter drive:
		# master-sapphire-win-ae
		install_path = '\\\\horton\\Engineering\\tmp\\buildbot-builds\\v20-maint-sapphire-win-ae'
	if config.ConfigParams.plugin_catagory == 'OFX':
		install_path = install_path.replace('-ae', '-ofx')
	split_list = os.listdir(install_path)
	# split_list = installer_list
	s_dates = [0, 0, 0, 0]
	i = 0
	current_dir = [0, 0, 0, 0]
	#try - and - except should be improved
	try:
		for dates in split_list:
			print("Dates = " + dates)
			print("Current Dir = " + str(current_dir))
			if dates == '.DS_Store':
				dates = '0'
			str_dates = (dates.split('-'))
			for num in str_dates:
				if num:
					s_dates[i] = int(num)
					i += 1
			if s_dates[0] > current_dir[0]:
				current_dir = s_dates
			elif s_dates[0] == current_dir[0]:
				if s_dates[1] > current_dir[1]:
					current_dir = s_dates
				elif s_dates[1] == current_dir[1]:
					if s_dates[2] > current_dir[2]:
						current_dir = s_dates
					elif s_dates[2] == current_dir[2]:
						if s_dates[3] > current_dir[3]:
							current_dir = s_dates
			s_dates = [0, 0, 0, 0]
			i = 0
	except ValueError:
		print("Current Dir2 = " + str(current_dir))
	#print 'current_dir:'
	print("Current Dir3 = " + str(current_dir))
	s_installer_name = ''
	i = 0
	for item in current_dir:
		if i < 3:
			if item < 10:
				s_installer_name += '0' + str(item) + '-'
			else:
				s_installer_name += str(item) + '-'
		else:
			if item < 100000:
				s_installer_name += '0' + str(item)
			else:
				s_installer_name += str(item)
		i+=1
	config.ConfigParams.build_num = s_installer_name
	print 'Installing file at: ' + os.path.join(install_path, s_installer_name)
	installer_source = os.path.join(install_path, s_installer_name)
	latest_installer = os.path.abspath(installer_source)
	print("Installing Sapphire Build from: {}".format(latest_installer))
	logging.info("Installing BCC Build from:{}".format(latest_installer))
	# results.TestResults.installed_build = latest_installer
	# find the name of the installer (either .exe or .dmg)
	pkg_name = ''
	if test_utils.is_win():
		inst_extension = '.exe'
	else:
		inst_extension = '.dmg'
	for item in os.listdir(latest_installer):
		if item.endswith(inst_extension):
			pkg_name = item
	##SHOULD HAVE THIS!##
	print("Quit AE if it is running")
	plat_utils.quit_ae(config.ConfigParams.target_app)
	#download and install newest 5.6.0 build
	if test_utils.is_mac():
		#Mac dest
		copy_dest = '/Users/borisfx/Documents/ae_test_env/'
		volume_name = ''
		sa_pkg_name = ''
		# good for all Mac test systems
		volumes_dir = '/Volumes'
		#copy over newest build to designated folder
		installer_source = os.path.join(latest_installer, pkg_name)
		print 'copying... ' + installer_source
		shutil.copy(installer_source, config.ConfigParams.base_directory)
		inst_dest = os.path.join(config.ConfigParams.base_directory, pkg_name)
		#mount disk image
		mount_cmd = 'hdiutil attach ' + inst_dest
		s_mount_cmd = shlex.split(mount_cmd)
		retVal = subprocess.call(s_mount_cmd)
		if (retVal != 0):
			raise Exception('Failed to mount pkg')
		for item in os.listdir(volumes_dir):
			if item.find('Sapphire') > -1:
				if item.find(config.ConfigParams.plugin_catagory) > -1:
					volume_name = item
		if volume_name:
			volume_name = os.path.join(volumes_dir, volume_name)
			for item in os.listdir(volume_name):
				if item.find('Sapphire') > -1:
					if item.find(config.ConfigParams.plugin_catagory) > -1:
						sa_pkg_name = item
		#os.path.splitext(config.ConfigParams.installer_name)[0]
		#run the installer
		if sa_pkg_name:
			sa_pkg_path = os.path.join(volume_name, sa_pkg_name)
			install_cmd = "installer -target / -package " + sa_pkg_path
			full_cmd = "echo " +  config.ConfigParams.mac_admin_password + " | sudo -S " + install_cmd
			retVal = os.system(full_cmd)
			if (retVal != 0):
				raise Exception('Failed to run installer')
			# unmount the installed volume
			unmount_cmd = shlex.split('hdiutil unmount ' + volume_name)
			subprocess.call(unmount_cmd)
		else:
			logging.error('No installer mounted!')
			return False
	elif test_utils.is_win():
		#Win dest
		copy_dest = 'C:\Users\\qa\\Documents\\ae_test_env\\installers'
		exe_name = pkg_name
		copy_path = os.path.join(latest_installer, exe_name)
		# print 'copying...'
		installer = os.path.abspath(copy_path)
		if exe_name in os.listdir(config.ConfigParams.base_directory):
			os.remove(os.path.join(config.ConfigParams.base_directory, exe_name))
		shutil.copy(installer, config.ConfigParams.base_directory)
		installer_path = os.path.join(config.ConfigParams.base_directory, exe_name)
		print installer_path
		cmd = '"C:\\Users\\Niall Buckley\\Documents\\ae_test_env\\sapphire-ae-install-2020.01.exe"' + ' /VERYSILENT /SP-'
		retVal = subprocess.call(cmd)
		if (retVal != 0):
			raise Exception('Failed to run installer')
		print("Finished running the silent install")
	print 'Sapphire Install Done'
	#delete old installer?
	return True
Exemplo n.º 7
0
    def init_config():
        """
        init will load the params from the config file and set the class variables
        it will also call the code to verify the config params(paths exist etc . . )
        """

        if len(
                ConfigParams.base_directory
        ) != 0:  #already inited, could happen if running from continuous integration
            return

        config = ConfigParser.ConfigParser()

        # determine if application is a script file or frozen exe
        if getattr(sys, 'frozen', False):
            application_path = os.path.dirname(sys.executable)
        elif __file__:
            application_path = os.path.dirname(__file__)
        else:
            application_path = ""
            print("***Error: Can't find application path")

        # This section points to the local (not in the git repo) test.cfg file per machine (both machines of the same OS have the same paths)
        # This allows the Jenkins agent to run the scripts right from the git repo and the ae_test_env will not need any other changes (projects, logs, etc. can stay in the same place)
        # The only things that need to change are the shell scripts on Mac and powershell scripts on Win that need to point to the git repo install_and_run.py
        if test_utils.is_win():
            ConfigParams.config_filename = 'C:\\Users\\Niall Buckley\\Desktop\\license_test\\tests.cfg'
        elif test_utils.is_mac():
            ConfigParams.config_filename = '/Users/borisfx/Desktop/license_test/tests.cfg'

        print("config_path1: " + ConfigParams.config_filename)
        config_path = os.path.join(application_path,
                                   ConfigParams.config_filename)
        print("config_path2: " + config_path)
        config_path = os.path.abspath(config_path)
        print("config_path3: " + config_path)

        ConfigParams.plugin_install = 'BCC'

        with open(config_path, 'r') as configfile:
            config.readfp(configfile)

            #Get the hardware system info
            ConfigParams.system_info = config.get('Hardware', "system_info")
            ConfigParams.cpu_info = config.get('Hardware', "cpu_info")
            ConfigParams.gpu_info = config.get('Hardware', "gpu_info")
            ConfigParams.memory_info = config.get('Hardware', "memory_info")

            #Horton
            ConfigParams.machine_name = config.get('General', 'machine_name')
            ConfigParams.copy_results = config.get('General', 'copy_results')
            ConfigParams.horton_path = config.get('General', 'horton_path')

            #copy mocha to gdrive
            ConfigParams.copy_mocha_results = config.get(
                'General', 'copy_mocha_results')

            # Load the General section
            if test_utils.is_mac():
                ConfigParams.target_app = config.get('General',
                                                     "target_app_mac")
                ConfigParams.installer_search_path = config.get(
                    'General', "installer_search_path_mac")
                ConfigParams.installer_name = config.get(
                    'General', "installer_name_mac")
                ConfigParams.mac_installer_package_name = config.get(
                    'General', "installer_package_name")
                ConfigParams.mac_admin_password = config.get(
                    'General', "mac_admin_password")

            elif test_utils.is_win():
                ConfigParams.target_app = config.get('General',
                                                     "target_app_win")
                ConfigParams.installer_search_path = config.get(
                    'General', "installer_search_path_win")
                ConfigParams.installer_name = config.get(
                    'General', "installer_name_win")

            # Load Licensing path
            if test_utils.is_mac():
                ConfigParams.mocha_licensing_path = config.get(
                    'LicensePath', "Mocha_mac_lic")
                ConfigParams.bcc_licensing_path = config.get(
                    'LicensePath', "BCC_mac_lic")
                ConfigParams.sapph_licensing_path = config.get(
                    'LicensePath', "Sapph_mac_lic")
            elif test_utils.is_win():
                ConfigParams.mocha_licensing_path = config.get(
                    'LicensePath', "Mocha_win_lic")
                ConfigParams.bcc_licensing_path = config.get(
                    'LicensePath', "BCC_win_lic")
                ConfigParams.sapph_licensing_path = config.get(
                    'LicensePath', "Sapph_win_lic")

            ConfigParams.base_directory = config.get('General',
                                                     "base_directory")
            # expand the path or some calls will fail
            ConfigParams.base_directory = os.path.expanduser(
                ConfigParams.base_directory)
            ConfigParams.base_directory = os.path.abspath(
                ConfigParams.base_directory)

            # Now that we've loaded the data from the config, fill in the paths that we create from the base_directory
            if not os.path.exists(ConfigParams.base_directory):
                print(
                    "***ConfigParams::init_config base_directory doesn't exist: "
                    + ConfigParams.base_directory)

            # License Testing path
            ConfigParams.license_test_dir = config.get('General',
                                                       "license_test_dir")
            ConfigParams.license_test_dir = os.path.expanduser(
                ConfigParams.license_test_dir)
            ConfigParams.license_test_dir = os.path.abspath(
                ConfigParams.license_test_dir)

            if not os.path.exists(ConfigParams.license_test_dir):
                print(
                    "***ConfigParams::init_config license test dir doesn't exist: "
                    + ConfigParams.license_test_dir)

            # horton projects:
            ConfigParams.proj_directory = config.get('General',
                                                     'proj_directory')
            res_tmp = config.get('General', 'results_directory')
            ConfigParams.results_directory = os.path.join(
                ConfigParams.base_directory, res_tmp)

            ConfigParams.restart_ae_every_n_renders = config.getint(
                'General', "restart_ae_every_n_renders")
            ConfigParams.create_test_data = config.getboolean(
                'General', "create_test_data")

            # Load the TestToRun section
            ConfigParams.run_installed_plugins_test = config.getboolean(
                'TestsToRun', "run_installed_plugins_test")
            ConfigParams.run_render_test = config.getboolean(
                'TestsToRun', "run_render_test")
            ConfigParams.run_speed_test = config.getboolean(
                'TestsToRun', "run_speed_test")
            ConfigParams.times_to_run_speed_test = config.getint(
                'TestsToRun', "times_to_run_speed_test")
            #ConfigParams.run_mocha_render_test = config.getboolean('TestsToRun', 'mocha_render_test')

            # Load the RenderTestDirectories section
            #render_directories = config.items('RenderTestDirectories')

            #temp
            render_directories = config.items('RenderTestDirectories')

            for item in render_directories:
                if item[0].find('render_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.render_test_directories.append(the_path)

            speed_directories = config.items('SpeedTestDirectories')

            for item in speed_directories:
                if item[0].find('speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.speed_test_directories.append(the_path)

            bcc_lic_test = config.items('BCCAELicTest')

            #create mocha file path?
            mocha_directories = config.items('MochaAERenderTestDirectories')

            for item in mocha_directories:
                if item[0].find('mocha_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.mocha_test_directories.append(the_path)

            mocha_speed_directories = config.items(
                'MochaAEPerformanceTestDirectories')

            for item in mocha_speed_directories:
                if item[0].find('m_speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.mocha_speed_directories.append(the_path)

            mocha_lic_test = config.items('MochaAELicTest')

            #Sapphire file path iterators
            sapphire_directories = config.items(
                'SapphireAERenderTestDirectories')

            for item in sapphire_directories:
                if item[0].find('sapphire_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.sapphire_test_directories.append(the_path)

            sapphire_speed_directories = config.items(
                'SapphireAEPerformanceTestDirectories')

            for item in sapphire_speed_directories:
                if item[0].find('s_speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.sapphire_speed_directories.append(the_path)

            #Sapphire license test
            sapphire_lic_dirs = config.items('SapphireAELicTest')

            for item in sapphire_lic_dirs:
                if item[0].find('s_lic_test') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.sapphire_lic_test.append(the_path)

            #Mocha license test
            mocha_lic_dirs = config.items('MochaAELicTest')

            for item in mocha_lic_dirs:
                if item[0].find('m_lic_test') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.mocha_lic_test.append(the_path)

            #BCC license test
            bcc_lic_dirs = config.items('BCCAELicTest')

            for item in bcc_lic_dirs:
                if item[0].find('bcc_lic_test') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory,
                                            item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.bcc_lic_test.append(the_path)

            # Premiere Pro Test Directories:
            # Doesn't exist in the tests.cfg file??
            '''ppro_directories = config.items('PProRenderTestDirectories')

            for item in ppro_directories:
                if item[0].find('ppro_render_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.ppro_render_directories.append(the_path)

            ppro_speed_directories = config.items('PProSpeedTestDirectories')

            for item in ppro_speed_directories:
                if item[0].find('ppro_speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.ppro_speed_directories.append(the_path)

            # Nuke Test Directories:
            nuke_directories = config.items('NukeRenderTestDirectories')

            for item in nuke_directories:
                if item[0].find('nuke_render_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.nuke_bcc_render_directories.append(the_path)

            nuke_directories = config.items('NukeSpeedTestDirectories')

            for item in nuke_directories:
                if item[0].find('nuke_speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.nuke_bcc_speed_directories.append(the_path)

            nuke_directories = config.items('NukeSapphireRenderTestDirectories')

            for item in nuke_directories:
                if item[0].find('nuke_sa_render_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.nuke_sapphire_render_directories.append(the_path)

            nuke_directories = config.items('NukeSapphireSpeedTestDirectories')

            for item in nuke_directories:
                if item[0].find('nuke_sa_speed_dir') > -1:
                    the_path = os.path.join(ConfigParams.proj_directory, item[1])
                    the_path = os.path.abspath(the_path)
                    ConfigParams.nuke_sapphire_speed_directories.append(the_path)'''

            ConfigParams.installed_plugin_script = os.path.join(
                ConfigParams.base_directory,
                "ae_scripts/verify_installed_plugins.jsx")
            ConfigParams.installed_plugin_script = os.path.abspath(
                ConfigParams.installed_plugin_script)

            if not os.path.exists(ConfigParams.installed_plugin_script):
                print(
                    "***ConfigParams::init_config installed_plugin_script doesn't exist: "
                    + ConfigParams.installed_plugin_script)

            if ConfigParams.use_tif_format:
                ConfigParams.render_test_script = os.path.join(
                    ConfigParams.base_directory,
                    "ae_scripts/render_license_test.jsx")
            else:
                ConfigParams.render_test_script = os.path.join(
                    ConfigParams.base_directory,
                    "ae_scripts/render_test_openexr.jsx")
            ConfigParams.render_test_script = os.path.abspath(
                ConfigParams.render_test_script)

            ConfigParams.speed_test_script = os.path.join(
                ConfigParams.base_directory,
                "ae_scripts/render_speed_test.jsx")
            ConfigParams.speed_test_script = os.path.abspath(
                ConfigParams.speed_test_script)

            if not os.path.exists(ConfigParams.render_test_script):
                print(
                    "***ConfigParams::init_config render_test_script doesn't exist: "
                    + ConfigParams.render_test_script)

            index = 0
            for path in ConfigParams.render_test_directories:
                ConfigParams.render_test_directories[index] = os.path.abspath(
                    os.path.expanduser(path))

                if not os.path.exists(
                        ConfigParams.render_test_directories[index]):
                    print(
                        "***ConfigParams::init_config render_test_directories[] doesn't exist: "
                        + ConfigParams.render_test_directories[index])
                index += 1

            # Don't bother to verify since they might not exist yet
            ConfigParams.installed_plugin_expected_results = os.path.join(
                ConfigParams.base_directory,
                "installed_plugin_test/installed_plugins_expected.json")
            ConfigParams.installed_plugin_expected_results = os.path.abspath(
                ConfigParams.installed_plugin_expected_results)

            ConfigParams.installed_plugin_test_folder = os.path.join(
                ConfigParams.base_directory, "installed_plugin_test")
            ConfigParams.installed_plugin_test_folder = os.path.abspath(
                ConfigParams.installed_plugin_test_folder)

            ConfigParams.installed_plugin_test_results = os.path.join(
                ConfigParams.base_directory,
                "installed_plugin_test/installed_plugins_test_results.json")
            ConfigParams.installed_plugin_test_results = os.path.abspath(
                ConfigParams.installed_plugin_test_results)

            ConfigParams.render_config_path = os.path.join(
                ConfigParams.base_directory, "ae_scripts/config.json")
            ConfigParams.render_config_path = os.path.abspath(
                ConfigParams.render_config_path)

            ConfigParams.speed_config_path = os.path.join(
                ConfigParams.base_directory, "ae_scripts/speed_config.json")
            ConfigParams.speed_config_path = os.path.abspath(
                ConfigParams.speed_config_path)

            ConfigParams.xlsx_path = os.path.join(ConfigParams.base_directory,
                                                  'ARCHIVED_RESULTS')
            ConfigParams.xlsx_path = os.path.abspath(ConfigParams.xlsx_path)

            ConfigParams.sapphire_lic_path = os.path.join(
                ConfigParams.base_directory,
                "ae_shared_proj_results/license_test/Sapphire_AE/S_Render/S_Aurora"
            )
            ConfigParams.sapphire_lic_path = os.path.abspath(
                ConfigParams.render_config_path)

            ConfigParams.mocha_lic_path = os.path.join(
                ConfigParams.base_directory,
                "ae_shared_proj_results/license_test/Mocha_AE/M_Insert")
            ConfigParams.sapphire_lic_path = os.path.abspath(
                ConfigParams.render_config_path)

            ConfigParams.mocha_lic_path = os.path.join(
                ConfigParams.base_directory,
                "ae_shared_proj_results/license_test/Mocha_AE/M_Insert")
            ConfigParams.sapphire_lic_path = os.path.abspath(
                ConfigParams.render_config_path)
            '''ConfigParams.rclone_cmd = config.get('General', 'rclone_cmd')'''

            # if running BCC-OFX test, change to the ofx paths:
            if test_utils.is_mac():
                ConfigParams.sub_build_install_path = "archive/SharedCode/artifacts/"
            else:
                ConfigParams.sub_build_install_path = "archive\SharedCode\Installers\win\Output"

            # Premiere Pro #
            ppro_config_folder = os.path.join(ConfigParams.base_directory,
                                              "ppro_scripts/")
            if not os.path.isdir(ppro_config_folder):
                os.mkdir(ppro_config_folder)

            ConfigParams.ppro_config_path = os.path.join(
                ConfigParams.base_directory, "ppro_scripts/config.json")
            ConfigParams.ppro_config_path = os.path.abspath(
                ConfigParams.ppro_config_path)

            ConfigParams.ppro_render_complete_path = os.path.join(
                ConfigParams.base_directory,
                "ppro_scripts/render_complete.txt")
            ConfigParams.ppro_render_complete_path = os.path.abspath(
                ConfigParams.ppro_render_complete_path)
            '''ConfigParams.extendscript_cmd_mac = config.get('General', 'extendscript_cmd_mac')'''

            # named adobe_script because the script only runs automatically when put in the 'Adobe Scripts' folder made by ExtendScript
            '''ConfigParams.adobe_scripts_render = config.get('General', 'adobe_scripts_render')'''
            '''ConfigParams.media_encoder = config.get('General', 'media_encoder')'''

            if test_utils.is_win():
                ConfigParams.ame_log_file = "C:\\Users\\Niall Buckley\\Documents\\Adobe\\Adobe Media Encoder\\13.0\\AMEEncodingLog.txt"
            else:
                ConfigParams.ame_log_file = '/Users/borisfx/Documents/Adobe/Adobe Media Encoder/12.0/AMEEncodingLog.txt'

            # --- Nuke - OFX --- #
            '''ConfigParams.installer_search_path_ofx = config.get('General', 'installer_search_path_ofx')
Exemplo n.º 8
0
def refresh_server():
    refreshCmd = 'curl localhost:5054/goforms/rlmreread_process'
    if test_utils.is_win():
        subprocess.call(refreshCmd)
    elif test_utils.is_mac():
        os.system(refreshCmd)