diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f8fd1fdc42d..544affd5b4b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,7 @@ endif() if(BUILD_MANTIDFRAMEWORK) add_subdirectory(scripts) + add_subdirectory(Testing/SystemTests/tests) endif() # Docs requirements @@ -209,7 +210,7 @@ if(ENABLE_DOCS) add_subdirectory(docs) endif() -# System test data target +# System test targets add_subdirectory(Testing/SystemTests/scripts) if(COVERAGE) diff --git a/Testing/SystemTests/lib/systemtests/systemtesting.py b/Testing/SystemTests/lib/systemtests/systemtesting.py index 5fb51ebf8ba9..051714ba5ffb 100644 --- a/Testing/SystemTests/lib/systemtests/systemtesting.py +++ b/Testing/SystemTests/lib/systemtests/systemtesting.py @@ -814,21 +814,7 @@ def execute(self, runner, exclude_in_pr_builds): self._result.date = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") self._result.addItem(["test_date", self._result.date]) - if retcode == TestRunner.SUCCESS_CODE: - status = "success" - elif retcode == TestRunner.GENERIC_FAIL_CODE: - # This is most likely an algorithm failure, but it's not certain - status = "algorithm failure" - elif retcode == TestRunner.VALIDATION_FAIL_CODE: - status = "failed validation" - elif retcode == TestRunner.SEGFAULT_CODE: - status = "crashed" - elif retcode == TestRunner.SKIP_TEST: - status = "skipped" - elif retcode < 0: - status = "hung" - else: - status = "unknown" + status = exit_code_to_str(retcode) # Check return code and add result self._result.status = status if status in ["success", "skipped"] else "failed" @@ -1161,7 +1147,7 @@ def loadTestsFromModule(self, filename): spec.loader.exec_module(mod) module_classes = dict(inspect.getmembers(mod, inspect.isclass)) - module_classes = [x for x in module_classes if self.isValidTestClass(module_classes[x]) and x != "MantidSystemTest"] + module_classes = [x for x in module_classes if isValidTestClass(module_classes[x]) and x != "MantidSystemTest"] for test_name in module_classes: tests.append(TestSuite(self._runner.getTestDir(), modname, test_name, filename)) module_loaded = True @@ -1176,21 +1162,6 @@ def loadTestsFromModule(self, filename): return module_loaded, tests - def isValidTestClass(self, class_obj): - """Returns true if the test is a valid test class. It is valid - if: the class subclassses MantidSystemTest and has no abstract methods - """ - if not issubclass(class_obj, MantidSystemTest): - return False - # Check if the get_reference_file is abstract or not - if hasattr(class_obj, "__abstractmethods__"): - if len(class_obj.__abstractmethods__) == 0: - return True - else: - return False - else: - return True - ######################################################################### # Class to handle the environment @@ -1321,6 +1292,42 @@ def restoreconfig(self): self.__moveFile(self.__userPropsFile, self.__userPropsFileSystest) self.__moveFile(self.__userPropsFileBackup, self.__userPropsFile) +def exit_code_to_str(exit_code): + if exit_code < 0: + return "hung" + match exit_code: + case TestRunner.SUCCESS_CODE: + return "success" + case TestRunner.GENERIC_FAIL_CODE: + # This is most likely an algorithm failure, but it's not certain + return "algorithm failure" + case TestRunner.VALIDATION_FAIL_CODE: + return "failed validation" + case TestRunner.SEGFAULT_CODE: + return "crashed" + case TestRunner.SKIP_TEST: + return "skipped" + case _: + return"unknown" + +######################################################################### +# Function to check if a given class object is a Mantid System Test +# that can be run by the TestRunner class. +######################################################################### +def isValidTestClass(class_obj): + """Returns true if the test is a valid test class. It is valid + if: the class subclassses MantidSystemTest and has no abstract methods + """ + if not issubclass(class_obj, MantidSystemTest): + return False + # Check if the get_reference_file is abstract or not + if hasattr(class_obj, "__abstractmethods__"): + if len(class_obj.__abstractmethods__) == 0: + return True + else: + return False + else: + return True ######################################################################### # Function to return a string describing the environment diff --git a/Testing/SystemTests/scripts/systestrunner.py b/Testing/SystemTests/scripts/systestrunner.py new file mode 100644 index 000000000000..946e33ce32e4 --- /dev/null +++ b/Testing/SystemTests/scripts/systestrunner.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2025 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + + +import inspect +import os +import sys +import time +import importlib.util + +from collections import OrderedDict + +# Prevents errors in systemtests that use matplotlib directly +os.environ["MPLBACKEND"] = "Agg" + +######################################################################### +# Set up the command line options +######################################################################### + +start_time = time.time() + +DEFAULT_QT_API = "pyqt5" +THIS_MODULE_DIR = os.path.dirname(os.path.realpath(__file__)) +DEFAULT_FRAMEWORK_LOC = os.path.realpath(os.path.join(THIS_MODULE_DIR, "..", "lib", "systemtests")) +SANS_TEST_LOC = os.path.realpath(os.path.join(THIS_MODULE_DIR, "..", "tests", "framework", "ISIS", "SANS")) +DATA_DIRS_LIST_PATH = os.path.join(THIS_MODULE_DIR, "datasearch-directories.txt") +SAVE_DIR_LIST_PATH = os.path.join(THIS_MODULE_DIR, "defaultsave-directory.txt") +DEFAULT_LOG_LEVEL = "information" +DEFAULT_ARCHIVE_SEARCH = True +DEFAULT_MAKE_PROP = True +DEFAULT_EXECUTABLE = sys.executable + + +def kill_children(processes): + for process in processes: + process.terminate() + # Exit with status 1 - NOT OK + sys.exit(1) + + +def main(argv): + # Set the Qt version to use during the system tests + os.environ["QT_API"] = DEFAULT_QT_API + + # import the system testing framework + sys.path.append(DEFAULT_FRAMEWORK_LOC) + import systemtesting + + # allow PythonInterface/test to be discoverable + sys.path.append(systemtesting.FRAMEWORK_PYTHONINTERFACE_TEST_DIR) + + sys.path.append(SANS_TEST_LOC) + ######################################################################### + # Configure mantid + ######################################################################### + + # Parse files containing the search and save directories + with open(DATA_DIRS_LIST_PATH, "r") as f_handle: + data_paths = f_handle.read().strip() + + with open(SAVE_DIR_LIST_PATH, "r") as f_handle: + save_dir = f_handle.read().strip() + + # Configure properties file + mtdconf = systemtesting.MantidFrameworkConfig( + loglevel=DEFAULT_LOG_LEVEL, data_dirs=data_paths, save_dir=save_dir, archivesearch=DEFAULT_ARCHIVE_SEARCH + ) + if DEFAULT_MAKE_PROP: + mtdconf.config() + + ######################################################################### + # Generate list of tests + ######################################################################### + + path_to_test = argv[1] + test_dir_name = os.path.dirname(path_to_test) + test_file_name = os.path.basename(path_to_test) + test_module_name = os.path.splitext(test_file_name)[0] + test_spec = importlib.util.spec_from_file_location(test_module_name, path_to_test) + test_module = importlib.util.module_from_spec(test_spec) + test_spec.loader.exec_module(test_module) + test_classes = dict(inspect.getmembers(test_module, inspect.isclass)) + + test_class_names = [test_class for test_class in test_classes if + systemtesting.isValidTestClass(test_classes[test_class]) and test_class != "MantidSystemTest"] + + if not test_class_names: + raise NameError(f"No test classes found in system test module: {test_module_name}.") + + runner = systemtesting.TestRunner( + executable=DEFAULT_EXECUTABLE, + # see InstallerTests.py for why lstrip is required + exec_args="--classic", + escape_quotes=True, + ) + + results = OrderedDict() + for test_class_name in test_class_names: + script_obj = systemtesting.TestScript(test_dir_name, test_module_name, test_class_name, False) + results[test_class_name] = runner.start_in_current_process(script_obj) + + ######################################################################### + # Process Results + ######################################################################### + + failure = False + if any(exit_code is not systemtesting.TestRunner.SUCCESS_CODE and + exit_code is not systemtesting.TestRunner.SKIP_TEST + for (exit_code, _) in results.values()): + failure = True + + ######################################################################### + # Cleanup + ######################################################################### + + # Put the configuration back to its original state + mtdconf.restoreconfig() + + if failure: + results_string = f"FAILURE REPORT FOR TESTS IN {test_file_name}:\n" + for class_name, (exit_code, stdout) in results.items(): + results_string += f"{class_name}: {systemtesting.exit_code_to_str(exit_code)}\n" + if exit_code is not systemtesting.TestRunner.SUCCESS_CODE: + results_string += f"Stdout: {stdout}\n" + raise RuntimeError(results_string) + + +if __name__ == "__main__": + main(sys.argv) diff --git a/Testing/SystemTests/tests/CMakeLists.txt b/Testing/SystemTests/tests/CMakeLists.txt new file mode 100644 index 000000000000..8e0cb50440f6 --- /dev/null +++ b/Testing/SystemTests/tests/CMakeLists.txt @@ -0,0 +1,4 @@ +# System Test Subdirectories to be added to ctest. + +add_subdirectory(framework) +add_subdirectory(qt) diff --git a/Testing/SystemTests/tests/framework/CMakeLists.txt b/Testing/SystemTests/tests/framework/CMakeLists.txt new file mode 100644 index 000000000000..b9fba21b2e84 --- /dev/null +++ b/Testing/SystemTests/tests/framework/CMakeLists.txt @@ -0,0 +1,228 @@ +# System tests for the Mantid Framework package. Files that contain only base classes, and no actual tests, should not +# be added to this list. + +set(SYSTEST_NAMES + AbinsTest.py + AbsorptionCorrectionTest.py + AlgorithmDocumentationTest.py + AlgorithmMatrixWorkspaceValidateInputsTest.py + AlgorithmMDWorkspaceValidateInputsTest.py + AlgorithmTableWorkspaceValidateInputsTest.py + AlgorithmWorkspaceGroupValidateInputsTest.py + AlignAndFocusPowderFromFilesTest.py + AlignComponentsTest.py + # ARCSReductionTest # Test skipped due to NaN Comparison. See Issue #38088 + BASISTest.py + BayesQuasiTest.py + BilbySANSDataProcessorTest.py + # BuildSQWTest # Tests skipped due to missing data. + CalMuonDeadTimeTest.py + # CNCSReductionTest # All tests skipped due to NaN Comparisons. See Issue #38088 + CodeConventions.py + CompareMDWorkspacesTest.py + complexShapeAbsorptionsTest.py + CompressEvents.py + ConvertHFIRSCDtoMDETest.py + ConvertMultipleRunsToSingleCrystalMDTest.py + ConvertQtoHKLMDHistoTest.py + ConvertToMDworkflow.py + ConvertWANDSCDtoQTest.py + ConvToMDCompareDefaultVsIndexing.py + CorelliPowderCalibrationTest.py + CountReflectionsTest.py + CRISPLoadingTest.py + CrystalFieldPythonInterface.py + D7AbsoluteCrossSectionsTest.py + D7YIGPositionCalibrationTest.py + Diffraction_Workflow_Test.py + DirectILLAutoProcessTest.py + DirectInelasticDiagnostic.py + DirectInelasticDiagnostic2.py + DistributeProtonChargeTest.py + DOSTest.py + DrillProcessTest.py + ElasticEMUReductionTest.py + ElasticWindowMultipleTest.py + EnginXScriptTest.py + EQSANSBeamCenterAPIv2.py + EQSANSDarkCurrentAPIv2.py + EQSANSEffAPIv2.py + # EQSANSFlatTestAPIv2 # Skipped due to missing sensitivity correction file + EQSANSIQOutputAPIv2.py + EQSANSNormalisationAPIv2.py + EQSANSProcessedEffAPIv2.py + EQSANSSolidAPIv2.py + EQSANSTOFStructureTest.py + EQSANSTransAPIv2.py + ExecuteGeneratedPythonFitScriptTest.py + FilteredLoadvsLoadThenFilter.py + FilterEventsWithHighFirstIndexSplitter.py + FindSatellitePeaksTest.py + FittingDocumentationTest.py + FlatPlatePaalmanPingsCorrectionTest.py + GenerateLogbookTest.py + GetEiT0atSNSSystemTest.py + GetQsInQENSDataSystemTest.py + # GSASIIRefineFitPeaksTest # Skipped due to missing GSASII Path + HB3AWorkflowTests.py + HFIRBackgroundAPIv2.py + HFIREffAPIv2.py + HFIRReductionAPIv2.py + HFIRTestsAPIv2.py + HFIRTransAPIv2.py + HYSPECReductionTest.py + ILLDetectorEfficiencyCorUserTest.py + ILLDirectGeometryReductionTest.py + ILLIndirectEnergyTransferBATS.py + ILLIndirectReductionFWS.py + ILLIndirectReductionQENS.py + ILLPowderD2BEfficiencyTest.py + ILLPowderDetectorScanTest.py + ILLPowderEfficiencyClosureTest.py + ILLPowderEfficiencyTest.py + ILLPowderLoadDetectorScanTest.py + ILLPowderParameterScanTest.py + ILLReflAutoProcessTest.py + ILLSANSMultiProcessTest.py + IndirectDiffractionTests.py + IndirectQuickRunTest.py + InelasticEMUReductionTest.py + IntegrateEllipsoidsTest.py + IntegratePeaksProfileFittingTest.py + InterfaceDocumentationTest.py + INTERLoadingTest.py + INTERReductionTest.py + ISIS_PowderGemTest.py + ISIS_PowderHRPDTest.py + ISIS_PowderOsirisTest.py + ISIS_PowderPearlTest.py + ISIS_PowderPolarisTest.py + ISIS_WISHPowderReductionTest.py + ISIS_WISHSingleCrystalReduction.py + ISISDirectInelastic.py + ISISDirectReductionComponents.py + ISISIndirectAnalysisTest.py + ISISIndirectBayesTest.py + ISISIndirectDiffractionReductionTest.py + ISISIndirectEnergyTransferTest.py + ISISIndirectInelastic.py + ISISIndirectSimulationTest.py + ISISLoadingEventData.py + ISISMuonAnalysis.py + ISISMuonAnalysisGrouping.py + ISISReflectometryAutoreductionTest.py + ISISReflectometryWorkflowPreprocessingTest.py + ISISReflectometryWorkflowSlicingTest.py + ISISReflInstrumentIDFTest.py + L2QScriptTest.py + LagrangeILLReductionTest.py + LinkedUBs_Test.py + LiquidsReflectometryReductionNoScalingTest.py + LiquidsReflectometryReductionTest.py + LiquidsReflectometryReductionWithBackgroundTest.py + LoadCIFTest.py + LoadElementalAnalysisTest.py + LoadEmbeddedInstrumentInfo.py + LoadExedTest.py + LoadLotsOfFiles.py + LoadLotsOfInstruments.py + LoadMuonNexusTest.py + LoadTest.py + LoadVesuvioTest.py + LoadWANDSCDTest.py + LRPrimaryFractionTest.py + # LRReductionWithReferenceTest # Skipped due to missing import. + LRScalingFactorsTest.py + MagnetismReflectometryReductionTest.py + MaxEntTest.py + MDNormBackgroundHYSPECTest.py + MDNormCORELLITest.py + MDNormHYSPECTest.py + MDWorkspaceTests.py + MonteCarloAbsorptionCorrTest.py + MRFilterCrossSectionsTest.py + MultiThreadedLoadNeXusTest.py + MuonFFTTest.py + MuonKerenFittingTest.py + MuonLoadersSignatureTest.py + MuonMaxEntTest.py + MuonProcessTest.py + NOMADTest.py + OFFSPECLoadingTest.py + OSIRISDiffractionReductionTest.py + PaalmanPingsMonteCarloAbsorptionTest.py + PelicanCrystalProcessingTest.py + PelicanReductionTest.py + POLDIAnalyseResidualsTest.py + POLDIAutoCorrelationTest.py + POLDICreatePeaksFromCellTest.py + POLDIDataAnalysisTest.py + PolDiffILLReductionTest.py + POLDIFitPeaks1DTest.py + POLDIFitPeaks2DTest.py + POLDILoadRunsTest.py + POLDIMergeTest.py + POLDIPeakSearchTest.py + POLDITruncateDataTest.py + PolrefExample.py + POLREFLoadingTest.py + PowderDiffProfileCalibrateTest.py + PowderReduceP2DTest.py + PredictPeaksTest.py + PythonChannels.py + QENSGlobalFitTeixeiraWaterSQE.py + ReduceOneSCD_Run.py + ReflectometryFloodCorrection.py + ReflectometryISIS.py + ReflectometryISIS_v2.py + ReflectometryISISSumBanksTest.py + ReflectometryQuickCombineMulti.py + ReflectometryQuickMultiDetector.py + ReflectometryQuickPointDetector.py + ReflectometryQuickPointDetectorMakeTransmission.py + RefRoi.py + RelectometryInstrumentSignedThetaTest.py + ReuseExistingCalibration.py + SANSILLAbsoluteScale2Test.py + SANSILLAbsoluteScaleTest.py + SANSILLAutoProcessTest.py + SANSILLReduction2Test.py + SANSILLReductionTest.py + SaveISISReflectometryORSOTest.py + SaveLoadNexusProcessed.py + SaveNexusTest.py + SEQUOIAreduction.py + SimulatedDensityOfStatesTest.py + SingleCrystalAbsorptionTest.py + SingleCrystalDiffuseReductionTest.py + SingleCrystalPeaksTest.py + SNAPRedux.py + SNSConvertToMDTest.py + SNSPowderRedux.py + SortHKLTest.py + SpaceGroupFactoryTest.py + SpaceGroupReflectionConditionsTest.py + SpaceGroupUnitCellTest.py + SphinxWarnings.py + SplineSmoothingTest.py + StepScan.py + SurfLoadingTest.py + SXDAnalysis.py + TOPAZPeakFinding.py + UnweightedLeastSquaresTest.py + ValidateInstrumentDir.py + VesuvioCommandsTest.py + VesuvioCorrectionsTest.py + VesuvioFittingTest.py + VesuvioLoadingTest.py + WeightedLeastSquaresTest.py + WishAnalysis.py + # WishCalibrate # Skipped since 2017 + WishDiffuseScattering.py + WishMasking.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework ${SYSTEST_NAMES}) + +add_subdirectory(ISIS/SANS) +add_subdirectory(PolarizationCorrections) diff --git a/Testing/SystemTests/tests/framework/DrillProcessTest.py b/Testing/SystemTests/tests/framework/DrillProcessTest.py index c7008a0b4ddc..25b540609b61 100644 --- a/Testing/SystemTests/tests/framework/DrillProcessTest.py +++ b/Testing/SystemTests/tests/framework/DrillProcessTest.py @@ -61,7 +61,7 @@ def editCell(self, row, column, text): def editSettings(self, settingValues, mDialog): """ Edit the settings window. This method will edit all the provided - settings and set them to their correcponding value. + settings and set them to their corresponding value. Args: settingValues (dict(str:str)): setting name and value to be set @@ -83,16 +83,19 @@ def editSettings(self, settingValues, mDialog): QTest.keyClicks(widgets[name], value) QTest.keyClick(widgets[name], Qt.Key_Tab) elif isinstance(widgets[name], QComboBox): - v = widgets[name].view() + w = widgets[name] m = widgets[name].model() for i in range(m.rowCount()): index = m.index(i, 0) text = index.data(Qt.DisplayRole) - if text == name: - v.scrollTo(index) - pos = index.center() - Qt.mouseClick(v.viewport(), Qt.LeftButton, 0, pos) + if text == value: + w.setCurrentIndex(index.row()) break + # Former code based on QTest.mouseclick is not working, the view is updated but the widget is not + # if text == name: + # v.scrollTo(index) + # pos = index.center() + # Qt.mouseClick(v.viewport(), Qt.LeftButton, 0, pos) QTest.mouseClick(sw.okButton, Qt.LeftButton) def cleanup(self): @@ -118,6 +121,7 @@ def runTest(self): "BeamRadius": "0.05,0.05,0.05", "CalculateResolution": "MildnerCarpenter", "TransmissionBeamRadius": "0.2", + "NormaliseBy": "Time", } ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/CMakeLists.txt new file mode 100644 index 000000000000..a070837b12ac --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/CMakeLists.txt @@ -0,0 +1,7 @@ +# System tests for ISIS SANS. + +add_subdirectory(LARMOR) +add_subdirectory(LOQ) +add_subdirectory(SANS2D) +add_subdirectory(WORKFLOWS) +add_subdirectory(ZOOM) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/CMakeLists.txt new file mode 100644 index 000000000000..5fe85d29c780 --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/CMakeLists.txt @@ -0,0 +1,7 @@ +# System tests related to the LARMOR instrument at ISIS. + +set(SYSTEST_NAMES SANSLARMOR_multiperiod_event_files_TOML.py SANSLARMORMultiPeriod.py SANSLARMORMultiPeriod_V2.py + SANSLARMORMultiPeriodAddFiles.py SANSLARMORMultiPeriodAddFilesTest_V2.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.ISIS.SANS.LARMOR ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py index 0f03e5020c18..1ec506f6e59d 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py @@ -8,7 +8,7 @@ # test batch mode with sans2d and selecting a period in batch mode import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService from ISISCommandInterface import AssignSample, Detector, LARMOR, MaskFile, Set1D from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py index 1574c76a7eff..ee25a6ca7b33 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import os import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.simpleapi import DeleteWorkspace diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py index dee9e34ba3b6..f177d5db9133 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py @@ -9,7 +9,7 @@ import systemtesting import os -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.api import AnalysisDataService from sans.command_interface.ISISCommandInterface import ( diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py index 35fcaf9fd3a5..9b3f422f0958 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init,too-few-public-methods import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService from sans.command_interface.ISISCommandInterface import Set1D, Detector, MaskFile, AssignSample, WavRangeReduction, LARMOR diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py index dadfe7f527c1..ff8853fde967 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py @@ -8,7 +8,7 @@ import systemtesting import os -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.api import AnalysisDataService from sans.command_interface.ISISCommandInterface import ( diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/CMakeLists.txt new file mode 100644 index 000000000000..b3fa08c74fe3 --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/CMakeLists.txt @@ -0,0 +1,18 @@ +# System tests related to the LOQ instrument at ISIS. + +set(SYSTEST_NAMES + LOQReloadWorkspaces.py + SANSLOQAddBatch.py + SANSLOQBatch.py + SANSLOQBatch_V2.py + SANSLOQCan2D.py + SANSLOQCan2D_TOML.py + SANSLOQCan2D_V2.py + SANSLOQCentreNoGrav.py + SANSLOQLegacyUserFile.py + SANSLOQReductionGUI.py + SANSLOQReductionGUITest_V2.py + SANSLOQTransFitWorkspace2D.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.ISIS.SANS.LOQ ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py index 6cd51c3b6fef..3dcdd7615c01 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import ( AssignCan, AssignSample, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py index 3fbe16220210..dee5693a7f3e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import Load from mantid.api import FileFinder from mantid import config diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py index 7d58267556e2..a9580e6819e8 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import LoadNexus, Plus from mantid import config, FileFinder from ISISCommandInterface import Detector, Gravity, LOQ, MaskFile, Set1D diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py index b5e29f3e6395..cc9ab4fde80c 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py @@ -9,7 +9,7 @@ import systemtesting import os.path -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.api import FileFinder from mantid.simpleapi import LoadNexus, Plus diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py index 666ce8d9c8aa..1e074fc336c2 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import AssignCan, AssignSample, Detector, Gravity, LOQ, MaskFile, Set2D, SetDetectorOffsets, WavRangeReduction # Test is giving odd results on Linux, but only this 2D one. diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py index 32924f6a88a3..2409c9caff3e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting import mantid # noqa -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( LOQ, Set2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py index 635804dba9e8..c4bca6535025 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py @@ -8,7 +8,7 @@ import systemtesting import mantid # noqa -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( LOQ, Set2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py index 536edefba6ce..09ae8e765701 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import ( AssignCan, AssignSample, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py index 4217cd75ab75..159d2239d53c 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py @@ -7,7 +7,7 @@ import systemtesting from mantid import FileFinder from sans.common.enums import SANSInstrument -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import LOQ, UseCompatibilityMode, BatchReduce from mantid.simpleapi import GroupWorkspaces diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py index 47efe78ace60..5ebed0059779 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py @@ -7,7 +7,7 @@ # pylint: disable=attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import FileFinder from mantid.kernel import config import ISISCommandInterface as i diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py index e0921df906a5..58513c0cfb67 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, LOQ, MaskFile, BatchReduce from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py index 106f600d3461..fbf1e2cd57f3 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import DeleteWorkspace, RenameWorkspace from ISISCommandInterface import ( AssignCan, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/CMakeLists.txt new file mode 100644 index 000000000000..6dc31ad104d4 --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/CMakeLists.txt @@ -0,0 +1,33 @@ +# System tests related to the SANS2D instrument at ISIS. + +set(SYSTEST_NAMES + SANS2D_empty_cycle_22_02.py + SANS2D_GDW20_4m_cycle_22_02.py + SANS2D_GDW20_12m_cycle_22_02.py + SANS2D_glassy_carbon_cycle_22_02.py + SANS2DBatch.py + SANS2DBatchTest_V2.py + SANS2DFrontNoGrav.py + SANS2DFrontNoGrav_V2.py + SANS2DLimitEventsTime.py + SANS2DLimitEventsTime_V2.py + SANS2DMultiPeriod.py + SANS2DMultiPeriod_V2.py + SANS2DMultiPeriodAddFiles.py + SANS2DMultiPeriodAddFilesTest_V2.py + SANS2DReductionGUI.py + SANS2DReductionGUI_V2.py + SANS2DReductionGUIAdded.py + SANS2DReductionGUIAddedTest_V2.py + SANS2DReductionGUITest_V2.py + SANS2DReloadWorkspaces.py + SANS2DSearchCentreGUI.py + SANS2DSlicing.py + SANS2DSlicingTest_V2.py + SANS2DTubeCalibrationTest.py + SANS2DTubeMergeTest.py + SANS2DWaveloops.py + SANS2DWaveloopsTest_V2.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.ISIS.SANS.SANS2D ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py index 11172fabd438..d3884d824ecb 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py @@ -7,7 +7,7 @@ # pylint: disable=no-init,attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import mtd, FileFinder from mantid.kernel import config from mantid.simpleapi import DeleteWorkspace, Load diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py index 04fa5dff9c34..049919738299 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init,attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid import config from mantid.api import FileFinder diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py index 0eb83eee55ef..7b5de9f280d1 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import AssignSample, Gravity, MaskFile, SANS2D, Set1D, SetDetectorOffsets, WavRangeReduction from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py index d8ad135be181..7e72a09e9d94 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting import mantid # noqa -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py index 3861561288a6..309fe773addc 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import AssignSample, MaskFile, SANS2D, WavRangeReduction from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py index 7bb2d8489db2..4aa8334c4f8e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py @@ -8,7 +8,7 @@ import systemtesting import mantid # noqa -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import SANS2D, MaskFile, AssignSample, WavRangeReduction, UseCompatibilityMode from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py index 10815220fb0e..b7bb5e0b2858 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py @@ -8,7 +8,7 @@ # test batch mode with sans2d and selecting a period in batch mode import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import AssignSample, Detector, Gravity, MaskFile, SANS2D, Set1D, WavRangeReduction from SANSBatchMode import BatchReduce from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py index 92ec7d1a4428..a31d9ef34152 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import os import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid import config from ISISCommandInterface import AssignSample, DefaultTrans, Detector, Gravity, MaskFile, SANS2D, Set1D, WavRangeReduction diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py index f497a82ef5c7..61070cea3536 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py @@ -9,7 +9,7 @@ import systemtesting import os -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py index 6aca5e1b915b..87b1c935c1de 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init,too-few-public-methods import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService, FileFinder from sans.command_interface.ISISCommandInterface import ( diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py index 553d7bfd7302..4a06634799a4 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py @@ -20,7 +20,7 @@ """ import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import FileFinder from mantid.kernel import config from mantid.simpleapi import RenameWorkspace diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py index 89ea19ae4613..42b879c8ca64 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py @@ -5,7 +5,7 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import mtd from mantid.kernel import config from mantid.simpleapi import DeleteWorkspace, RenameWorkspace diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py index c02955bc7d5e..ab610e6e1ba4 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py @@ -14,7 +14,7 @@ import systemtesting import os -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService from mantid.kernel import config from mantid.simpleapi import DeleteWorkspace diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py index 12ae40233a48..8955625d1d44 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py @@ -11,7 +11,7 @@ """ import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.simpleapi import RenameWorkspace from sans.command_interface.ISISCommandInterface import ( diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py index 921a65d5b8a4..ef9e6ca96424 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import mtd from mantid.kernel import config from mantid.simpleapi import CloneWorkspace, Load, LoadNexus, MoveInstrumentComponent, RenameWorkspace diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py index be5cf9d789a2..1ead1d15b5f3 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py @@ -13,7 +13,7 @@ import isis_reduction_steps import SANS2DReductionGUI as sansgui -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.common.enums import SANSInstrument diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py index b261da95ad1a..818082388f9d 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import mtd, RenameWorkspace, FileFinder import ISISCommandInterface as i diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py index 1b8890e80186..84890fbc3365 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py @@ -7,7 +7,7 @@ # pylint: disable=invalid-name,attribute-defined-outside-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService, FileFinder from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py index 3278a2b6180f..ead458f7f875 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.common.enums import SANSInstrument from mantid.api import AnalysisDataService diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py index c5069361086d..c9a3f661231c 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.common.enums import SANSInstrument from mantid.simpleapi import SANSTubeMerge diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py index 1ce287c99c08..fc745aba8495 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import ( AssignCan, AssignSample, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py index 213c32c94367..6ac60eb45c82 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py index 4fda09b3a586..7fcf92a5a076 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py index d81ef810bac9..8b1bec97dbf1 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import platform import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py index 943fd9222db1..ac1ad60c8168 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py index d86d971eaf7e..e7b9539cf54e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( SANS2D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/CMakeLists.txt new file mode 100644 index 000000000000..a100d9679078 --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/CMakeLists.txt @@ -0,0 +1,23 @@ +# System tests related to the SANS Workflows. + +set(SYSTEST_NAMES + SANSBatchReductionTest.py + SANSBeamCentreFinderCoreTest.py + SANSCentreSample.py + SANSDarkRunSubtractionTest.py + SANSDiagnosticPageTest.py + SANSFileChecking.py + SANSLoadersTest.py + SANSLoadTest.py + SANSLOWCentreNoGrav_V2.py + SANSMergedDetectorsTest.py + SANSMergedDetectorsTest_V2.py + SANSQResolutionTest.py + SANSReductionCoreTest.py + SANSSaveTest.py + SANSSingleReductionTest.py + SANSUtilityTest.py + SANSWorkspaceTypeTest.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.ISIS.SANS.WORKFLOWS ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py index 4d001a22b27a..3430782f20f0 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py @@ -10,7 +10,7 @@ import systemtesting from systemtesting import MantidSystemTest -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid import config from mantid.api import AnalysisDataService diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py index c24abff7fbfa..78dcab4d8b1d 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py @@ -11,7 +11,7 @@ import systemtesting import mantid -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AlgorithmManager from sans.state.Serializer import Serializer diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py index 887b50a3426f..b2fbdf38f411 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import ( AssignSample, Detector, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py index 71d824e7f09d..60daf1c178e6 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py @@ -10,7 +10,7 @@ # pylint: disable=too-many-public-methods import unittest import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AlgorithmManager from mantid.kernel import config from isis_reduction_steps import DarkRunSubtraction diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py index 84c906b4f4aa..aa4250887c2e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py @@ -13,7 +13,7 @@ import systemtesting import mantid -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.gui_logic.presenter.diagnostic_presenter import DiagnosticsPagePresenter from sans.state.StateObjects.StateData import get_data_builder diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py index 5926d698dfc1..6272ae49cf18 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py @@ -12,7 +12,7 @@ import unittest import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import ExperimentInfo from mantid.kernel import config import SANSUtility as su diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py index b50f86b155f0..881a16aab3a5 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting import mantid # noqa -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from sans.command_interface.ISISCommandInterface import ( LOQ, Set1D, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py index 0191dd6345e0..6c6cdf910871 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py @@ -8,7 +8,7 @@ import unittest import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.dataobjects import Workspace2D, EventWorkspace from mantid.api import AnalysisDataService, AlgorithmManager diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py index 98fe472d5491..a74ad25f0d92 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py @@ -14,7 +14,7 @@ import os import unittest import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.simpleapi import Load import isis_reduction_steps as steps diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py index 5ce770c522a9..fdc179bc851e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py @@ -5,7 +5,7 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import DeleteWorkspace, mtd import ISISCommandInterface as i import systemtesting diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py index 4e3f4b373984..ec9521e4d9cb 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py @@ -7,7 +7,7 @@ # pylint: disable=invalid-name import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import DeleteWorkspace, mtd from sans.command_interface.ISISCommandInterface import ( SANS2DTUBES, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py index 724c665cfff1..850935c9fd4a 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import ( set_q_resolution_a1, set_q_resolution_a2, diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py index e2ac7645f88c..cb42e54f1123 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py @@ -11,7 +11,7 @@ import systemtesting import mantid -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.api import AlgorithmManager from sans.state.Serializer import Serializer diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py index 177642f6714a..023679c1e791 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py @@ -11,7 +11,7 @@ import systemtesting from systemtesting import MantidSystemTest -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid import config from mantid.api import AlgorithmManager, WorkspaceGroup from sans.common.constants import EMPTY_NAME diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py index 7300212c96c9..394c32c60083 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py @@ -7,7 +7,7 @@ # pylint: disable=invalid-name,no-init,too-few-public-methods import systemtesting -from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest +from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import logger from mantid.simpleapi import Load import SANSUtility as su diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/CMakeLists.txt b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/CMakeLists.txt new file mode 100644 index 000000000000..be2566b3a9ee --- /dev/null +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/CMakeLists.txt @@ -0,0 +1,14 @@ +# System tests related to the ZOOM instrument at ISIS. + +set(SYSTEST_NAMES + SANSZOOMLegacyUserFileTest.py + SANSZOOMTomlFileConversion.py + SANSZOOMTomlFileTest.py + SANSZOOMWavLoopsTest.py + ZOOMLegacyUserFileTest.py + ZOOMTomlFileTest.py + ZOOMTransEventData.py + ZOOMWavLoopsTest.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.ISIS.SANS.ZOOM ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/ISISIndirectDiffractionReductionTest.py b/Testing/SystemTests/tests/framework/ISISIndirectDiffractionReductionTest.py index 1aafd1da43e3..cb4582160759 100644 --- a/Testing/SystemTests/tests/framework/ISISIndirectDiffractionReductionTest.py +++ b/Testing/SystemTests/tests/framework/ISISIndirectDiffractionReductionTest.py @@ -11,7 +11,7 @@ class ISISIndirectDiffractionReductionTest(MantidSystemTest): def requiredFiles(self): - return ["osi89813.raw", "osiris_041_RES10.cal", "OSIRIS89813_diffspec_red.nxs"] + return ["osi89813.raw", "osiris_041_RES10.cal"] def runTest(self): ISISIndirectDiffractionReduction( diff --git a/Testing/SystemTests/tests/framework/OFFSPECLoadingTest.py b/Testing/SystemTests/tests/framework/OFFSPECLoadingTest.py index 2f2254230abc..d7b09d708149 100644 --- a/Testing/SystemTests/tests/framework/OFFSPECLoadingTest.py +++ b/Testing/SystemTests/tests/framework/OFFSPECLoadingTest.py @@ -13,12 +13,18 @@ class OFFSPECLoadingTest(LoadAndCheckBase): Test File loading and basic data integrity checks of OFFSPEC data in Mantid. """ + def __init__(self): + LoadAndCheckBase.__init__(self) + def get_raw_workspace_filename(self): return "OFFSPEC00010791.raw" def get_nexus_workspace_filename(self): return "OFFSPEC00010791.nxs" + def get_expected_instrument_name(self): + return "OFFSPEC" + def get_expected_number_of_periods(self): return 2 diff --git a/Testing/SystemTests/tests/framework/PolarizationCorrections/CMakeLists.txt b/Testing/SystemTests/tests/framework/PolarizationCorrections/CMakeLists.txt new file mode 100644 index 000000000000..8918a97f166f --- /dev/null +++ b/Testing/SystemTests/tests/framework/PolarizationCorrections/CMakeLists.txt @@ -0,0 +1,7 @@ +# System tests for the Polarization Corrections algorithms. + +set(SYSTEST_NAMES DepolarizedAnalyserTransmissionTest.py FlipperEfficiencyTest.py HeliumAnalyserEfficiencyTest.py + PolarizerEfficiencyTest.py +) + +pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} framework.PolarizationCorrections ${SYSTEST_NAMES}) diff --git a/Testing/SystemTests/tests/framework/SaveNexusTest.py b/Testing/SystemTests/tests/framework/SaveNexusTest.py index d460c36d2b47..42651404fc5b 100644 --- a/Testing/SystemTests/tests/framework/SaveNexusTest.py +++ b/Testing/SystemTests/tests/framework/SaveNexusTest.py @@ -11,6 +11,7 @@ import os import glob import tempfile +import systemtesting temp_dir = tempfile.gettempdir() EXPECTED_EXT = ".expected" @@ -57,7 +58,7 @@ direc = config["instrumentDefinition.directory"] -class LoadAndSaveLotsOfInstruments(object): +class LoadAndSaveLotsOfInstruments(systemtesting.MantidSystemTest): def __getDataFileList__(self): # get a list of directories to look in print("Looking for instrument definition files in: %s" % direc) diff --git a/Testing/SystemTests/tests/qt/CMakeLists.txt b/Testing/SystemTests/tests/qt/CMakeLists.txt new file mode 100644 index 000000000000..73729182f0a2 --- /dev/null +++ b/Testing/SystemTests/tests/qt/CMakeLists.txt @@ -0,0 +1,9 @@ +# System Tests for the mantid qt package + +set(SYSTEST_NAMES CppInterfacesStartupTest.py FitScriptGeneratorStartupTest.py PythonInterfacesStartupTest.py + SliceViewerIntegrationTest.py WorkbenchStartupTest.py +) + +if(ENABLE_WORKBENCH) + pysystemtest_add_test(${CMAKE_CURRENT_SOURCE_DIR} qt ${SYSTEST_NAMES}) +endif() diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 000000000000..ed97d539c095 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/buildconfig/CMake/FindCxxTest.cmake b/buildconfig/CMake/FindCxxTest.cmake index d050d101f2da..59e1aa409f32 100644 --- a/buildconfig/CMake/FindCxxTest.cmake +++ b/buildconfig/CMake/FindCxxTest.cmake @@ -160,7 +160,7 @@ PYTHONHOME=${_python_home}" $ ${_suitename} ) - set_tests_properties(${_cxxtest_separate_name} PROPERTIES TIMEOUT ${TESTING_TIMEOUT}) + set_tests_properties(${_cxxtest_separate_name} PROPERTIES TIMEOUT ${TESTING_TIMEOUT} LABELS "UnitTest") if(WIN32) set_property( TEST ${_cxxtest_separate_name} diff --git a/buildconfig/CMake/PyUnitTest.cmake b/buildconfig/CMake/PyUnitTest.cmake index c96144e2a61b..493dfc74074d 100644 --- a/buildconfig/CMake/PyUnitTest.cmake +++ b/buildconfig/CMake/PyUnitTest.cmake @@ -5,6 +5,31 @@ # test. This directory is added to the PYTHONPATH when tests are executed _testname_prefix :: A prefix for each test # that is added to ctest, the name will be ${_testname_prefix}_TestName ${ARGN} :: List of test files function(PYUNITTEST_ADD_TEST _test_src_dir _testname_prefix) + if(NOT PYUNITTEST_RUNNER) + set(_test_runner_module ${CMAKE_SOURCE_DIR}/Framework/PythonInterface/test/testhelpers/testrunner.py) + else() + set(_test_runner_module ${PYUNITTEST_RUNNER}) + endif() + + py_add_test("UnitTest" ${_test_runner_module} ${ARGV}) + +endfunction() + +# PYSYSTEMTEST_ADD_TEST (public macro to add system tests) Adds a set of python tests based upon the MantidSystemTest +# class. This adds the system test modules (files), rather than the classes, but will run every class in the module. +function(PYSYSTEMTEST_ADD_TEST _test_src_dir _testname_prefix) + if(NOT PYSYSTEMTEST_RUNNER) + set(_systest_runner ${CMAKE_SOURCE_DIR}/Testing/SystemTests/scripts/systestrunner.py) + else() + set(_systest_runner ${PYSYSTEMTEST_RUNNER}) + endif() + py_add_test("SystemTest" ${_systest_runner} ${ARGV}) + +endfunction() + +# PY_ADD_TEST is used by the above test-adding methods. It SHOULD NOT be used directly in CMakeLists.txt files. Use +# PYSYSTEMTEST_ADD_TEST or PYUNITTEST_ADD_TEST instead. +function(PY_ADD_TEST _test_type _test_runner_module _test_src_dir _testname_prefix) # Property for the module directory if(CMAKE_GENERATOR MATCHES "Visual Studio" OR CMAKE_GENERATOR MATCHES "Xcode") set(_module_dir ${CMAKE_BINARY_DIR}/bin/$) @@ -12,12 +37,6 @@ function(PYUNITTEST_ADD_TEST _test_src_dir _testname_prefix) set(_module_dir ${CMAKE_BINARY_DIR}/bin) endif() - if(NOT PYUNITTEST_RUNNER) - set(_test_runner_module ${CMAKE_SOURCE_DIR}/Framework/PythonInterface/test/testhelpers/testrunner.py) - else() - set(_test_runner_module ${PYUNITTEST_RUNNER}) - endif() - # Environment if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set(_python_path ${_test_src_dir};${PYUNITTEST_PYTHONPATH_EXTRA};$ENV{PYTHONPATH};${_module_dir}) @@ -62,7 +81,8 @@ function(PYUNITTEST_ADD_TEST _test_src_dir _testname_prefix) ) # Set the PYTHONPATH so that the built modules can be found set_tests_properties( - ${_pyunit_separate_name} PROPERTIES ENVIRONMENT "${_test_environment}" TIMEOUT ${TESTING_TIMEOUT} + ${_pyunit_separate_name} PROPERTIES ENVIRONMENT "${_test_environment}" TIMEOUT ${TESTING_TIMEOUT} LABELS + ${_test_type} ) if(PYUNITTEST_RUN_SERIAL) set_tests_properties(${_pyunit_separate_name} PROPERTIES RUN_SERIAL 1) diff --git a/buildconfig/Jenkins/Conda/build b/buildconfig/Jenkins/Conda/build index 9e4834c5c305..1c4cac1a0253 100755 --- a/buildconfig/Jenkins/Conda/build +++ b/buildconfig/Jenkins/Conda/build @@ -38,6 +38,10 @@ if [[ $OSTYPE == "msys"* ]]; then BUILD_OPTIONS="$BUILD_OPTIONS --config Release" fi +if [[ ${JOB_NAME} == *pull_requests* ]]; then + EXTRA_CMAKE_FLAGS+=" -DPR_JOB=True" +fi + # Run CMake using preset and variables cmake --preset=${CMAKE_PRESET} ${MANTID_DATA_STORE_CMAKE} ${EXTRA_CMAKE_FLAGS} $WORKSPACE diff --git a/buildconfig/Jenkins/Conda/run-tests b/buildconfig/Jenkins/Conda/run-tests index d61ac05fb40b..c618dd25f975 100755 --- a/buildconfig/Jenkins/Conda/run-tests +++ b/buildconfig/Jenkins/Conda/run-tests @@ -82,9 +82,6 @@ if [[ $OSTYPE == "msys"* ]]; then WINDOWS_TEST_OPTIONS="-C Release" WINDOWS_UNITTEST_TIMEOUT_OPTIONS="--timeout 500" export PYTHONHOME=$CONDA_PREFIX - SYSTEM_TEST_EXECUTABLE=$WORKSPACE/build/systemtest.bat -else - SYSTEM_TEST_EXECUTABLE=$WORKSPACE/build/systemtest fi # Run unit tests @@ -92,7 +89,7 @@ cd $WORKSPACE/build # mkdir for test logs mkdir -p test_logs if [[ $ENABLE_UNIT_TESTS == true ]]; then - run_with_xvfb ctest -j$UNIT_TEST_THREADS --no-compress-output -T Test -O test_logs/ctest_$OSTYPE.log --schedule-random --output-on-failure --repeat until-pass:3 $WINDOWS_TEST_OPTIONS $WINDOWS_UNITTEST_TIMEOUT_OPTIONS + run_with_xvfb ctest -L UnitTest -j$UNIT_TEST_THREADS --no-compress-output -T Test -O test_logs/ctest_$OSTYPE.log --schedule-random --output-on-failure --repeat until-pass:3 $WINDOWS_TEST_OPTIONS $WINDOWS_UNITTEST_TIMEOUT_OPTIONS fi if [[ $ENABLE_DOCS == true && $ENABLE_DOC_TESTS == true ]]; then @@ -116,11 +113,7 @@ if [[ $ENABLE_SYSTEM_TESTS == true ]]; then echo "usagereports.enabled = 0" >> $userprops echo "CheckMantidVersion.OnStartup = 0" >> $userprops - SYSTEM_TEST_OPTIONS="-j${BUILD_THREADS_SYSTEM_TESTS} -l information --quiet --output-on-failure" - - if [[ ${JOB_NAME} == *pull_requests* ]]; then - SYSTEM_TEST_OPTIONS+=" --exclude-in-pull-requests" - fi + SYSTEM_TEST_OPTIONS="-j${BUILD_THREADS_SYSTEM_TESTS} --no-compress-output --schedule-random --repeat until-pass:3 --output-on-failure" - run_with_xvfb $SYSTEM_TEST_EXECUTABLE $WINDOWS_TEST_OPTIONS $SYSTEM_TEST_OPTIONS + run_with_xvfb ctest -L SystemTest --test-output-truncation middle -T Test -O test_logs/systest_$OSTYPE.log $SYSTEM_TEST_OPTIONS $WINDOWS_TEST_OPTIONS fi