Browse Source

tests: busted: add config file, use --verbose by default (#2076)

Daniel Hahler 2 years ago
parent
commit
1ab861ea3a
2 changed files with 11 additions and 5 deletions
  1. 9
    0
      .busted
  2. 2
    5
      CMakeLists.txt

+ 9
- 0
.busted View File

@@ -0,0 +1,9 @@
1
+return {
2
+    default = {
3
+        verbose = true,
4
+        helper = "spec/preload.lua",
5
+        lpath = "lib/?.lua;lib/?/init.lua;spec/?.lua",
6
+    },
7
+}
8
+
9
+-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

+ 2
- 5
CMakeLists.txt View File

@@ -412,8 +412,7 @@ a_find_program(BUSTED_EXECUTABLE busted FALSE)
412 412
 if(BUSTED_EXECUTABLE)
413 413
     # Keep the arguments in sync with the version below!
414 414
     add_custom_target(check-unit
415
-        ${BUSTED_EXECUTABLE} "--helper=${CMAKE_SOURCE_DIR}/spec/preload.lua"
416
-        "--lpath=lib/?.lua;lib/?/init.lua;spec/?.lua"
415
+        ${BUSTED_EXECUTABLE}
417 416
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
418 417
         COMMENT "Running unit tests"
419 418
         VERBATIM)
@@ -421,9 +420,7 @@ if(BUSTED_EXECUTABLE)
421 420
 
422 421
     # Same as above, but with --coverage argument
423 422
     add_custom_target(check-unit-coverage
424
-        ${BUSTED_EXECUTABLE} "--helper=${CMAKE_SOURCE_DIR}/spec/preload.lua"
425
-        "--lpath=lib/?.lua;lib/?/init.lua;spec/?.lua"
426
-        "--coverage"
423
+        ${BUSTED_EXECUTABLE} "--coverage"
427 424
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
428 425
         COMMENT "Running unit tests under LuaCov"
429 426
         VERBATIM)

Loading…
Cancel
Save