Ejemplo n.º 1
0
                    default='information',
                    choices=log_levels,
                    help='Log level ' + str(log_levels))
options = parser.parse_args()

# Log to the configured default save directory
with open(SAVE_DIR_LIST_PATH, 'r') as f_handle:
    output_dir = f_handle.read().strip()

createScriptLog(os.path.join(output_dir, "TestScript.log"))
testRunLogPath = os.path.join(output_dir, "test_output.log")
testRunErrPath = os.path.join(output_dir, "test_errors.log")

log('Starting system tests')
log('Searching for packages in ' + options.package_dir)
installer = get_installer(options.package_dir, options.doInstall)

# Install the found package
if options.doInstall:
    log("Installing package '%s'" % installer.mantidInstaller)
    try:
        installer.install()
        log("Using Python wrapper: %r" % installer.python_cmd)
        installer.no_uninstall = False
    except Exception as err:
        scriptfailure("Installing failed. " + str(err))
else:
    installer.no_uninstall = True

log("Running system tests. Log files are: '%s' and '%s'" % (testRunLogPath, testRunErrPath))
try:
Ejemplo n.º 2
0
    if option == '-R' and arg != "":
        test_regex = arg
    if option == '-l' and arg != "":
        log_level = arg

# The log file for this script
parentDir = os.path.abspath('..').replace('\\','/')
if not os.path.exists(parentDir + '/logs'):
    os.mkdir(parentDir + '/logs')

createScriptLog(parentDir + '/logs/TestScript.log')
testRunLogPath = parentDir + '/logs/testsRun.log'
testRunErrPath = parentDir + '/logs/testsRun.err'

log('Starting system tests')
installer = get_installer(doInstall)

# Install the found package
if doInstall:
    log("Installing package '%s'" % installer.mantidInstaller)
    try:
        installer.install()
        log("Application path " + installer.mantidPlotPath)
        installer.no_uninstall = False
    except Exception,err:
        scriptfailure("Installing failed. "+str(err))
else:
    installer.no_uninstall = True

# Ensure MANTIDPATH points at this directory so that 
# the correct properties file is loaded              
Ejemplo n.º 3
0
    if option == '-l' and arg != "":
        log_level = arg
    if option == '-d' and arg != "":
        package_dir = arg

# Log to the configured default save directory
with open(SAVE_DIR_LIST_PATH, 'r') as f_handle:
    output_dir = f_handle.read().strip()

createScriptLog(os.path.join(output_dir, "TestScript.log"))
testRunLogPath = os.path.join(output_dir, "test_output.log")
testRunErrPath = os.path.join(output_dir, "test_errors.log")

log('Starting system tests')
log('Searching for packages in ' + package_dir)
installer = get_installer(package_dir, doInstall)

# Install the found package
if doInstall:
    log("Installing package '%s'" % installer.mantidInstaller)
    try:
        installer.install()
        log("Application path " + installer.mantidPlotPath)
        installer.no_uninstall = False
    except Exception, err:
        scriptfailure("Installing failed. " + str(err))
else:
    installer.no_uninstall = True

# Ensure MANTIDPATH points at this directory so that
# the correct properties file is loaded
Ejemplo n.º 4
0
log_levels = ['error', 'warning', 'notice', 'information', 'debug']
parser.add_argument('-l', dest='log_level', metavar='level', default='information',
                    choices=log_levels, help='Log level '+str(log_levels))
options = parser.parse_args()

# Log to the configured default save directory
with open(SAVE_DIR_LIST_PATH, 'r') as f_handle:
    output_dir = f_handle.read().strip()

createScriptLog(os.path.join(output_dir, "TestScript.log"))
testRunLogPath = os.path.join(output_dir, "test_output.log")
testRunErrPath = os.path.join(output_dir, "test_errors.log")

log('Starting system tests')
log('Searching for packages in ' + options.package_dir)
installer = get_installer(options.package_dir, options.doInstall)

# Install the found package
if options.doInstall:
    log("Installing package '%s'" % installer.mantidInstaller)
    try:
        installer.install()
        log("Application path: %r" % installer.mantidPlotPath)
        installer.no_uninstall = False
    except Exception as err:
        scriptfailure("Installing failed. "+str(err))
else:
    installer.no_uninstall = True

# conda mantid-framework does not have mantid plot. skip these
if not os.environ.get('MANTID_FRAMEWORK_CONDA_SYSTEMTEST'):
Ejemplo n.º 5
0
    if option == '-l' and arg != "":
        log_level = arg
    if option == '-d' and arg != "":
        package_dir = arg

# Log to the configured default save directory
with open(SAVE_DIR_LIST_PATH, 'r') as f_handle:
    output_dir = f_handle.read().strip()

createScriptLog(os.path.join(output_dir, "TestScript.log"))
testRunLogPath = os.path.join(output_dir, "test_output.log")
testRunErrPath = os.path.join(output_dir, "test_errors.log")

log('Starting system tests')
log('Searching for packages in ' + package_dir)
installer = get_installer(package_dir, doInstall)

# Install the found package
if doInstall:
    log("Installing package '%s'" % installer.mantidInstaller)
    try:
        installer.install()
        log("Application path " + installer.mantidPlotPath)
        installer.no_uninstall = False
    except Exception,err:
        scriptfailure("Installing failed. "+str(err))
else:
    installer.no_uninstall = True

# Ensure MANTIDPATH points at this directory so that 
# the correct properties file is loaded