-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
test.clj
59 lines (56 loc) · 2.87 KB
/
test.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(ns polylith.clj.core.help.test
(:require [polylith.clj.core.help.shared :as s]))
(defn help-text [color-mode]
(str " Executes brick and/or project tests.\n"
"\n"
" poly test [" (s/key "ARGS" color-mode) "]\n"
"\n"
" The brick tests are executed from all projects they belong to except for the development\n"
" project (if not " (s/key ":dev" color-mode) " is passed in):\n"
"\n"
" ARGS Tests to execute\n"
" ---------------- -------------------------------------------------------------\n"
" (empty) All brick tests that are directly or indirectly changed.\n"
"\n"
" " (s/key ":project" color-mode) " All brick tests that are directly or indirectly changed +\n"
" tests for changed projects.\n"
"\n"
" " (s/key ":all-bricks" color-mode) " All brick tests.\n"
"\n"
" " (s/key ":all" color-mode) " All brick tests + all project tests (except development).\n"
"\n"
"\n"
" To execute the brick tests from the development project, also pass in :dev:\n"
"\n"
" ARGS Tests to execute\n"
" ---------------- -------------------------------------------------------------\n"
" " (s/key ":dev" color-mode) " All brick tests that are directly or indirectly changed,\n"
" only executed from the development project.\n"
"\n"
" " (s/key ":project :dev" color-mode) " All brick tests that are directly or indirectly changed,\n"
" executed from all projects (development included) +\n"
" tests for changed projects (development included).\n"
"\n"
" " (s/key ":all-bricks :dev" color-mode) " All brick tests, executed from all projects\n"
" (development included).\n"
"\n"
" " (s/key ":all :dev" color-mode) " All brick tests, executed from all projects\n"
" (development included) + all project tests\n"
" (development included).\n"
"\n"
" Projects can also be explicitly selected with e.g. " (s/key "project:proj1" color-mode) " or " (s/key "project:proj1:proj2" color-mode) ".\n"
" " (s/key ":dev" color-mode) " is a shortcut for " (s/key "project:dev" color-mode) ".\n"
"\n"
" Example:\n"
" poly test\n"
" poly test :project\n"
" poly test :all-bricks\n"
" poly test :all\n"
" poly test project:proj1\n"
" poly test project:proj1:proj2 :project\n"
" poly test :dev\n"
" poly test :project :dev\n"
" poly test :all-bricks :dev\n"
" poly test :all :dev"))
(defn print-help [color-mode]
(println (help-text color-mode)))