From ffd542a985507a45c9263438e70f2dc35ca77824 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 28 Nov 2023 22:21:50 +0200 Subject: [PATCH] cosmetics --- tests/package.json | 30 +++++++++---------- tests/platform-native/CMakeLists.txt | 2 -- tests/platform-native/meson.build | 1 - tests/platform-qemu-cortex-a15/CMakeLists.txt | 2 -- tests/platform-qemu-cortex-a15/meson.build | 3 +- tests/platform-qemu-cortex-a72/CMakeLists.txt | 1 - tests/platform-qemu-cortex-a72/meson.build | 3 +- tests/platform-qemu-cortex-m0/CMakeLists.txt | 2 -- tests/platform-qemu-cortex-m0/meson.build | 2 ++ tests/platform-qemu-cortex-m3/CMakeLists.txt | 2 -- tests/platform-qemu-cortex-m3/meson.build | 3 +- tests/platform-qemu-cortex-m4f/CMakeLists.txt | 2 -- tests/platform-qemu-cortex-m4f/meson.build | 3 +- tests/platform-qemu-cortex-m7f/CMakeLists.txt | 2 -- tests/platform-qemu-cortex-m7f/meson.build | 3 +- .../CMakeLists.txt | 2 -- .../platform-qemu-riscv-rv32imac/meson.build | 3 +- .../CMakeLists.txt | 4 +-- .../meson.build | 3 +- 19 files changed, 32 insertions(+), 41 deletions(-) diff --git a/tests/package.json b/tests/package.json index cd8ea6d..52880bb 100644 --- a/tests/package.json +++ b/tests/package.json @@ -49,9 +49,6 @@ "commandMesonClean": "meson compile -C {{ properties.buildFolderRelativePathPosix }} --clean", "commandMesonPerformTests": "meson test -C {{ properties.buildFolderRelativePathPosix }} --verbose" }, - "$actions": [ - "meson fails with darwin new linker; upgrade meson to 1.3.0" - ], "actions": { "deep-clean": "del-cli build node_modules xpacks package-lock.json", "install": [ @@ -122,6 +119,7 @@ ], "install-all": [ "npm install", + "xpm install", "xpm install --all-configs" ], "link-deps": [ @@ -169,14 +167,14 @@ "xpm run test-qemu-riscv-rv64imafdc-meson-gcc" ], "test-all": [ - "xpm run test-native-cmake", - "xpm run test-native-meson", - "xpm run test-cortex-cmake", - "xpm run test-cortex-meson", - "xpm run test-riscv-cmake", - "xpm run test-riscv-meson" - ], - "test-native-cmake": [ + "xpm run test-native-cmake-all", + "xpm run test-native-meson-all", + "xpm run test-cortex-cmake-all", + "xpm run test-cortex-meson-all", + "xpm run test-riscv-cmake-all", + "xpm run test-riscv-meson-all" + ], + "test-native-cmake-all": [ "xpm run test-native-cmake-sys{% if os.platform != 'darwin' %} --ignore-errors{% endif %}", "xpm run test-native-cmake-gcc13", "xpm run test-native-cmake-gcc12", @@ -266,7 +264,7 @@ "xpm run build --config native-cmake-clang16-release", "xpm run test --config native-cmake-clang16-release" ], - "test-native-meson": [ + "test-native-meson-all": [ "xpm run test-native-meson-sys{% if os.platform != 'darwin' %} --ignore-errors{% endif %}", "xpm run test-native-meson-gcc13", "xpm run test-native-meson-gcc12", @@ -356,7 +354,7 @@ "xpm run build --config native-meson-clang16-release", "xpm run test --config native-meson-clang16-release" ], - "test-cortex-cmake": [ + "test-cortex-cmake-all": [ "xpm run test-cortex-cmake-gcc13", "xpm run test-cortex-cmake-gcc12", "xpm run test-cortex-cmake-gcc11" @@ -393,7 +391,7 @@ "xpm run test-qemu-cortex-a15-cmake-gcc13", "xpm run test-qemu-cortex-a72-cmake-gcc13" ], - "test-cortex-meson": [ + "test-cortex-meson-all": [ "xpm run test-cortex-meson-gcc13", "xpm run test-cortex-meson-gcc12", "xpm run test-cortex-meson-gcc11" @@ -430,7 +428,7 @@ "xpm run test-qemu-cortex-a15-meson-gcc13", "xpm run test-qemu-cortex-a72-meson-gcc13" ], - "test-riscv-cmake": [ + "test-riscv-cmake-all": [ "xpm run test-riscv-cmake-gcc13", "xpm run test-riscv-cmake-gcc12", "xpm run test-riscv-cmake-gcc11" @@ -451,7 +449,7 @@ "xpm run test-qemu-riscv-rv32imac-cmake-gcc13", "xpm run test-qemu-riscv-rv64imafdc-cmake-gcc13" ], - "test-riscv-meson": [ + "test-riscv-meson-all": [ "xpm run test-riscv-meson-gcc13", "xpm run test-riscv-meson-gcc12", "xpm run test-riscv-meson-gcc11" diff --git a/tests/platform-native/CMakeLists.txt b/tests/platform-native/CMakeLists.txt index 53f5085..cdc94bc 100644 --- a/tests/platform-native/CMakeLists.txt +++ b/tests/platform-native/CMakeLists.txt @@ -112,7 +112,6 @@ endif() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -139,7 +138,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-native/meson.build b/tests/platform-native/meson.build index ab2d8d6..26df906 100644 --- a/tests/platform-native/meson.build +++ b/tests/platform-native/meson.build @@ -21,7 +21,6 @@ message('Processing tests/platform-native...') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names diff --git a/tests/platform-qemu-cortex-a15/CMakeLists.txt b/tests/platform-qemu-cortex-a15/CMakeLists.txt index 0a24b92..ac4ce39 100644 --- a/tests/platform-qemu-cortex-a15/CMakeLists.txt +++ b/tests/platform-qemu-cortex-a15/CMakeLists.txt @@ -103,7 +103,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -123,7 +122,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-cortex-a15/meson.build b/tests/platform-qemu-cortex-a15/meson.build index 973c5ae..eab4ac4 100644 --- a/tests/platform-qemu-cortex-a15/meson.build +++ b/tests/platform-qemu-cortex-a15/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-arm') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-cortex-a72/CMakeLists.txt b/tests/platform-qemu-cortex-a72/CMakeLists.txt index 8d8d9bc..7178e85 100644 --- a/tests/platform-qemu-cortex-a72/CMakeLists.txt +++ b/tests/platform-qemu-cortex-a72/CMakeLists.txt @@ -103,7 +103,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) diff --git a/tests/platform-qemu-cortex-a72/meson.build b/tests/platform-qemu-cortex-a72/meson.build index 11cb468..b4b1307 100644 --- a/tests/platform-qemu-cortex-a72/meson.build +++ b/tests/platform-qemu-cortex-a72/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-aarch64') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-cortex-m0/CMakeLists.txt b/tests/platform-qemu-cortex-m0/CMakeLists.txt index 347948f..aa5ed8c 100644 --- a/tests/platform-qemu-cortex-m0/CMakeLists.txt +++ b/tests/platform-qemu-cortex-m0/CMakeLists.txt @@ -103,7 +103,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -122,7 +121,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-cortex-m0/meson.build b/tests/platform-qemu-cortex-m0/meson.build index 530883e..f547ebe 100644 --- a/tests/platform-qemu-cortex-m0/meson.build +++ b/tests/platform-qemu-cortex-m0/meson.build @@ -165,6 +165,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-arm') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-cortex-m3/CMakeLists.txt b/tests/platform-qemu-cortex-m3/CMakeLists.txt index 1763ee8..3d70072 100644 --- a/tests/platform-qemu-cortex-m3/CMakeLists.txt +++ b/tests/platform-qemu-cortex-m3/CMakeLists.txt @@ -103,7 +103,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -122,7 +121,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-cortex-m3/meson.build b/tests/platform-qemu-cortex-m3/meson.build index c25a983..c74123f 100644 --- a/tests/platform-qemu-cortex-m3/meson.build +++ b/tests/platform-qemu-cortex-m3/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-arm') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-cortex-m4f/CMakeLists.txt b/tests/platform-qemu-cortex-m4f/CMakeLists.txt index c35a4e5..003438c 100644 --- a/tests/platform-qemu-cortex-m4f/CMakeLists.txt +++ b/tests/platform-qemu-cortex-m4f/CMakeLists.txt @@ -104,7 +104,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -123,7 +122,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-cortex-m4f/meson.build b/tests/platform-qemu-cortex-m4f/meson.build index bb39975..9e05c1b 100644 --- a/tests/platform-qemu-cortex-m4f/meson.build +++ b/tests/platform-qemu-cortex-m4f/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-arm') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-cortex-m7f/CMakeLists.txt b/tests/platform-qemu-cortex-m7f/CMakeLists.txt index 336cc6f..06873fb 100644 --- a/tests/platform-qemu-cortex-m7f/CMakeLists.txt +++ b/tests/platform-qemu-cortex-m7f/CMakeLists.txt @@ -104,7 +104,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -123,7 +122,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-cortex-m7f/meson.build b/tests/platform-qemu-cortex-m7f/meson.build index 2d08e92..94cf745 100644 --- a/tests/platform-qemu-cortex-m7f/meson.build +++ b/tests/platform-qemu-cortex-m7f/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-arm') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-riscv-rv32imac/CMakeLists.txt b/tests/platform-qemu-riscv-rv32imac/CMakeLists.txt index 8032b3e..66d5f35 100644 --- a/tests/platform-qemu-riscv-rv32imac/CMakeLists.txt +++ b/tests/platform-qemu-riscv-rv32imac/CMakeLists.txt @@ -103,7 +103,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -124,7 +123,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-riscv-rv32imac/meson.build b/tests/platform-qemu-riscv-rv32imac/meson.build index 3c29a25..2b32cb4 100644 --- a/tests/platform-qemu-riscv-rv32imac/meson.build +++ b/tests/platform-qemu-riscv-rv32imac/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-riscv32') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_ diff --git a/tests/platform-qemu-riscv-rv64imafdc/CMakeLists.txt b/tests/platform-qemu-riscv-rv64imafdc/CMakeLists.txt index eb0a239..be98c96 100644 --- a/tests/platform-qemu-riscv-rv64imafdc/CMakeLists.txt +++ b/tests/platform-qemu-riscv-rv64imafdc/CMakeLists.txt @@ -51,10 +51,12 @@ function(add_test_executable name) message(VERBOSE "A+ tests/src/${name}.cpp") target_compile_definitions(${name} PRIVATE + # None. ) target_compile_options(${name} PRIVATE + # None. ) @@ -103,7 +105,6 @@ endfunction() # ----------------------------------------------------------------------------- -# sample-test if(ENABLE_SAMPLE_TEST) add_test_executable(sample-test) @@ -124,7 +125,6 @@ endif() # ----------------------------------------------------------------------------- -# unit-test if(ENABLE_UNIT_TEST) add_test_executable(unit-test) diff --git a/tests/platform-qemu-riscv-rv64imafdc/meson.build b/tests/platform-qemu-riscv-rv64imafdc/meson.build index eafa6f5..6980b73 100644 --- a/tests/platform-qemu-riscv-rv64imafdc/meson.build +++ b/tests/platform-qemu-riscv-rv64imafdc/meson.build @@ -34,7 +34,6 @@ objcopy = find_program('objcopy') # ----------------------------------------------------------------------------- # Define the tests executables. - test_names = [ 'sample-test', 'unit-test' ] foreach name : test_names @@ -165,6 +164,8 @@ foreach name : test_names endforeach +# ----------------------------------------------------------------------------- + qemu = find_program('qemu-system-riscv64') # https://mesonbuild.com/Unit-tests.html#malloc_perturb_