for option, arg in opt: if option == '-n': doInstall = False if option == '-o': out2stdout = True 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))
action="store_true", help="Skip tests that do not import correctly rather raising an error.") 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("Using Python wrapper: %r" % installer.python_cmd) installer.no_uninstall = False except Exception as err:
parser.add_argument("-E", dest="test_exclude", metavar="exclude", default=None, help="String specifying which tests to not run") parser.add_argument('--archivesearch', dest='archivesearch', action='store_true', help='Turn on archive search for file finder') parser.add_argument('--exclude-in-pull-requests', dest="exclude_in_pr_builds",action="store_true", help="Skip tests that are not run in pull request builds") 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: