From 437ccc3fb4fef9c8fd20ada5100b3c08bce54aa6 Mon Sep 17 00:00:00 2001 From: Bas Lijnse Date: Thu, 14 Sep 2017 14:26:23 +0200 Subject: [PATCH] Added some missing project files, and changed test runner tool to make it possible to integrate it in the nightly build scripts --- Tests/TestPrograms/CoreEditors.prj | 60 +++++++++++++++++++ Tests/TestPrograms/CoreTasks.prj | 60 +++++++++++++++++++ Tests/TestPrograms/Layout.prj | 60 +++++++++++++++++++ .../Misc.prj} | 5 +- Tests/TestPrograms/TaskEvaluation.prj | 60 +++++++++++++++++++ Tools/RunUnitTestsForCI.icl | 16 ++++- 6 files changed, 256 insertions(+), 5 deletions(-) create mode 100644 Tests/TestPrograms/CoreEditors.prj create mode 100644 Tests/TestPrograms/CoreTasks.prj create mode 100644 Tests/TestPrograms/Layout.prj rename Tests/{RunTests.prj.default => TestPrograms/Misc.prj} (94%) create mode 100644 Tests/TestPrograms/TaskEvaluation.prj diff --git a/Tests/TestPrograms/CoreEditors.prj b/Tests/TestPrograms/CoreEditors.prj new file mode 100644 index 000000000..e71aa60c9 --- /dev/null +++ b/Tests/TestPrograms/CoreEditors.prj @@ -0,0 +1,60 @@ +Version: 1.4 +Global + ProjectRoot: . + Target: iTasks + Exec: {Project}/CoreEditors.exe + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 20971520 + StackSize: 512000 + ExtraMemory: 8192 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + DisableRTSFlags: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Dynamics: True + DescExL: False + Output + Output: NoConsole + Font: Monaco + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateSymbolTable: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Path: {Project}/.. + Precompile: + Postlink: +MainModule + Name: CoreEditors + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False diff --git a/Tests/TestPrograms/CoreTasks.prj b/Tests/TestPrograms/CoreTasks.prj new file mode 100644 index 000000000..6dea29703 --- /dev/null +++ b/Tests/TestPrograms/CoreTasks.prj @@ -0,0 +1,60 @@ +Version: 1.4 +Global + ProjectRoot: . + Target: iTasks + Exec: {Project}/CoreTasks.exe + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 20971520 + StackSize: 512000 + ExtraMemory: 8192 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + DisableRTSFlags: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Dynamics: True + DescExL: False + Output + Output: ShowConstructors + Font: Monaco + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateSymbolTable: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Path: {Project}/.. + Precompile: + Postlink: +MainModule + Name: CoreTasks + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False diff --git a/Tests/TestPrograms/Layout.prj b/Tests/TestPrograms/Layout.prj new file mode 100644 index 000000000..dd4e6f4dd --- /dev/null +++ b/Tests/TestPrograms/Layout.prj @@ -0,0 +1,60 @@ +Version: 1.4 +Global + ProjectRoot: . + Target: iTasks + Exec: {Project}/Layout.exe + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 20971520 + StackSize: 512000 + ExtraMemory: 8192 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + DisableRTSFlags: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Dynamics: True + DescExL: False + Output + Output: NoConsole + Font: Monaco + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateSymbolTable: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Path: {Project}/.. + Precompile: + Postlink: +MainModule + Name: Layout + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False diff --git a/Tests/RunTests.prj.default b/Tests/TestPrograms/Misc.prj similarity index 94% rename from Tests/RunTests.prj.default rename to Tests/TestPrograms/Misc.prj index 03b8e98c8..caf349419 100644 --- a/Tests/RunTests.prj.default +++ b/Tests/TestPrograms/Misc.prj @@ -2,7 +2,7 @@ Version: 1.4 Global ProjectRoot: . Target: iTasks - Exec: {Project}/RunTests.exe + Exec: {Project}/Misc.exe CodeGen CheckStacks: False CheckIndexes: True @@ -41,10 +41,11 @@ Global ExportedNames: Paths Path: {Project} + Path: {Project}/.. Precompile: Postlink: MainModule - Name: RunTests + Name: Misc Dir: {Project} Compiler NeverMemoryProfile: False diff --git a/Tests/TestPrograms/TaskEvaluation.prj b/Tests/TestPrograms/TaskEvaluation.prj new file mode 100644 index 000000000..53ee9d4b5 --- /dev/null +++ b/Tests/TestPrograms/TaskEvaluation.prj @@ -0,0 +1,60 @@ +Version: 1.4 +Global + ProjectRoot: . + Target: iTasks + Exec: {Project}/TaskEvaluation.exe + CodeGen + CheckStacks: False + CheckIndexes: True + Application + HeapSize: 20971520 + StackSize: 512000 + ExtraMemory: 8192 + IntialHeapSize: 204800 + HeapSizeMultiplier: 4096 + ShowExecutionTime: False + ShowGC: False + ShowStackSize: False + MarkingCollector: False + DisableRTSFlags: False + StandardRuntimeEnv: True + Profile + Memory: False + MemoryMinimumHeapSize: 0 + Time: False + Stack: False + Dynamics: True + DescExL: False + Output + Output: NoConsole + Font: Monaco + FontSize: 9 + WriteStdErr: False + Link + LinkMethod: Static + GenerateRelocations: False + GenerateSymbolTable: False + GenerateLinkMap: False + LinkResources: False + ResourceSource: + GenerateDLL: False + ExportedNames: + Paths + Path: {Project} + Path: {Project}/.. + Precompile: + Postlink: +MainModule + Name: TaskEvaluation + Dir: {Project} + Compiler + NeverMemoryProfile: False + NeverTimeProfile: False + StrictnessAnalysis: True + ListTypes: StrictExportTypes + ListAttributes: True + Warnings: True + Verbose: True + ReadableABC: False + ReuseUniqueNodes: True + Fusion: False diff --git a/Tools/RunUnitTestsForCI.icl b/Tools/RunUnitTestsForCI.icl index 4fc7e3dcc..5565ca035 100644 --- a/Tools/RunUnitTestsForCI.icl +++ b/Tools/RunUnitTestsForCI.icl @@ -7,14 +7,24 @@ import iTasks import iTasks.Extensions.Development.Testing import iTasks.Internal.Test.Definition import System.FilePath +import System.CommandLine -TESTS_PATH :== "../Tests/TestPrograms" +DEFAULT_TESTS_PATH :== "../Tests/TestPrograms" runAllTests - = get (mapRead (filter ((==) "icl" o takeExtension)) (sdsFocus TESTS_PATH directoryListing)) + = determineTestDir + >>- \testDir -> + get (mapRead (filter ((==) "icl" o takeExtension)) (sdsFocus testDir directoryListing)) >>- \modules -> - sequence "Running all tests" [runTestModule (TESTS_PATH m) >>- traceValue \\ m <- modules] + sequence "Running all test programs" + [runTestModule (testDir m) >>- traceValue \\ m <- modules] >>- \results -> shutDown (if (noneFailed results) 0 1) +determineTestDir + = accWorld getCommandLine + @ \args -> case args of + [_,path] = path + _ = DEFAULT_TESTS_PATH + Start world = runTasks runAllTests world -- GitLab