@@ -22,42 +22,48 @@ runs:
22
22
- name : Flash unit test firmware
23
23
id : flashing
24
24
shell : bash
25
- timeout-minutes : 5
26
25
run : |
27
- source scripts/toolchain/fbtenv.sh
28
- ./fbt resources firmware_latest flash LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1
26
+ timeout 180 bash -c '
27
+ source scripts/toolchain/fbtenv.sh
28
+ ./fbt resources firmware_latest flash LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1
29
+ '
30
+ echo $? > flash_result.txt
29
31
30
32
- name : Prepare and reboot
31
33
id : copy
32
- if : steps.flashing.outcome == ' success'
34
+ if : success()
33
35
shell : bash
34
- timeout-minutes : 5
35
36
run : |
36
- source scripts/toolchain/fbtenv.sh
37
- python3 scripts/testops.py -t=15 await_flipper
38
- python3 scripts/storage.py -f send build/latest/resources /ext
39
- python3 scripts/storage.py -f send /region_data /ext/.int/.region_data
40
- python3 scripts/power.py reboot
41
- python3 scripts/testops.py -t=30 await_flipper
37
+ timeout 120 bash -c '
38
+ source scripts/toolchain/fbtenv.sh
39
+ python3 scripts/testops.py -t=15 await_flipper
40
+ python3 scripts/storage.py -f send build/latest/resources /ext
41
+ python3 scripts/storage.py -f send /region_data /ext/.int/.region_data
42
+ python3 scripts/power.py reboot
43
+ python3 scripts/testops.py -t=30 await_flipper
44
+ '
45
+ echo $? > copy_result.txt
42
46
43
47
- name : Run unit tests
44
48
id : run_units
45
- if : steps.copy.outcome == ' success'
49
+ if : success()
46
50
shell : bash
47
- timeout-minutes : 5
48
51
run : |
49
- source scripts/toolchain/fbtenv.sh
50
- python3 scripts/testops.py run_units
52
+ timeout 360 bash -c '
53
+ source scripts/toolchain/fbtenv.sh
54
+ python3 scripts/testops.py run_units
55
+ '
56
+ echo $? > run_units_result.txt
51
57
52
58
- name : Upload unit test results
53
- if : failure() && steps.flashing.outcome == 'success' && steps.run_units.outcome != 'skipped'
59
+ if : failure()
54
60
uses : actions/upload-artifact@v4
55
61
with :
56
62
name : unit-tests_output
57
63
path : unit_tests*.txt
58
64
59
65
- name : Check GDB output
60
- if : failure() && steps.flashing.outcome == 'success'
66
+ if : failure()
61
67
shell : bash
62
68
run : |
63
69
./fbt gdb_trace_all LIB_DEBUG=1 FIRMWARE_APP_SET=unit_tests FORCE=1
67
73
shell : bash
68
74
run : |
69
75
echo "timed_out=false" >> $GITHUB_OUTPUT
70
- if [[ "${{ steps.flashing.outcome }}" == "failure" && "${{ steps.flashing.conclusion }}" == "timed_out" ]]; then
71
- echo "timed_out=true" >> $GITHUB_OUTPUT
72
- elif [[ "${{ steps.copy.outcome }}" == "failure" && "${{ steps.copy.conclusion }}" == "timed_out" ]]; then
73
- echo "timed_out=true" >> $GITHUB_OUTPUT
74
- elif [[ "${{ steps.run_units.outcome }}" == "failure" && "${{ steps.run_units.conclusion }}" == "timed_out" ]]; then
75
- echo "timed_out=true" >> $GITHUB_OUTPUT
76
- fi
76
+ for file in flash_result.txt copy_result.txt run_units_result.txt; do
77
+ if [ -f "$file" ] && [ "$(cat $file)" = "124" ]; then
78
+ echo "timed_out=true" >> $GITHUB_OUTPUT
79
+ break
80
+ fi
81
+ done
0 commit comments