17
17
# -------------------------------------------------------------------------------
18
18
# Test "cylc set-verbosity"
19
19
. " $( dirname " $0 " ) /test_header"
20
- set_test_number 6
20
+ set_test_number 4
21
21
22
22
# Test illegal log level
23
23
TEST_NAME=" ${TEST_NAME_BASE} -bad"
@@ -28,18 +28,32 @@ grep_ok 'InputError: Illegal logging level, duck' "${TEST_NAME}.stderr"
28
28
TEST_NAME=" ${TEST_NAME_BASE} -good"
29
29
init_workflow " ${TEST_NAME_BASE} " << '__FLOW__ '
30
30
[scheduler]
31
- allow implicit tasks = True
31
+ [[events]]
32
+ abort on stall timeout = True
33
+ stall timeout = PT0S
32
34
[scheduling]
33
35
[[graph]]
34
- R1 = andor
36
+ R1 = setter => getter
37
+ [runtime]
38
+ [[setter]]
39
+ script = """
40
+ echo "CYLC_VERBOSE: $CYLC_VERBOSE"
41
+ [[ "$CYLC_VERBOSE" != 'true' ]]
42
+ echo "CYLC_DEBUG: $CYLC_DEBUG"
43
+ [[ "$CYLC_DEBUG" != 'true' ]]
44
+
45
+ cylc set-verbosity DEBUG "$CYLC_WORKFLOW_ID"
46
+ cylc__job__poll_grep_workflow_log 'Command actioned: set_verbosity'
47
+ """
48
+ [[getter]]
49
+ script = """
50
+ echo "CYLC_VERBOSE: $CYLC_VERBOSE"
51
+ [[ "$CYLC_VERBOSE" == 'true' ]]
52
+ echo "CYLC_DEBUG: $CYLC_DEBUG"
53
+ [[ "$CYLC_DEBUG" == 'true' ]]
54
+ """
35
55
__FLOW__
36
56
37
57
run_ok " ${TEST_NAME} -validate" cylc validate " $WORKFLOW_NAME "
38
- workflow_run_ok " ${TEST_NAME} -run" cylc play --pause " $WORKFLOW_NAME "
39
-
40
- run_ok " $TEST_NAME " cylc set-verbosity DEBUG " $WORKFLOW_NAME "
41
- log_scan " ${TEST_NAME} -grep" " ${WORKFLOW_RUN_DIR} /log/scheduler/log" 5 1 \
42
- ' Command actioned: set_verbosity'
43
-
44
- cylc stop " $WORKFLOW_NAME "
58
+ workflow_run_ok " ${TEST_NAME} -run" cylc play --no-detach " $WORKFLOW_NAME "
45
59
purge
0 commit comments