lf-lang / reactor-uc

A lightweight reactor runtime targeted at resource-constrained embedded systems
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Add Shutdown trigger and handle program exit #7

Closed erlingrj closed 1 month ago

erlingrj commented 1 month ago

This unfortunately messes a little with gcov and we get warnings:

libgcov profiling error:/home/erling/dev/reactor-uc/build/CMakeFiles/reactor-uc.dir/src/trigger.c.gcda:overwriting an existing profile data with a different timestamp

Presumably when the shutdown reactor is executed.

github-actions[bot] commented 1 month ago

Coverage after merging shutdown into main will be

14.76%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   builtin_triggers.c0%100%0%0%3–5, 7–9
   connection.c0%0%0%0%10–11, 11, 11–12, 14, 16–17, 21–22, 22, 22, 24–25, 27, 27, 27–29, 29, 29–30, 32, 34–39, 4, 40–41, 43–44, 5, 5, 5, 7, 7, 7, 7–9
   environment.c0%100%0%0%11–13, 15, 17, 19–20, 22, 25, 28–40, 8–9
   logical_action.c0%100%0%0%12–17, 4–7, 9
   port.c0%0%0%0%10, 12–16, 18–21, 23–24, 24, 24–25, 28, 28, 28–29, 31, 31, 31–33, 35, 40, 42–44, 46–47, 6–7, 7, 7–9
   queues.c55.48%44%66.67%60.22%100, 103, 109–112, 112, 112–113, 115–116, 17–18, 22–24, 24, 24–25, 30–31, 31, 31, 33–36, 36, 36, 36, 36–37, 39, 39, 39, 39, 39, 4, 40, 44, 44, 44–46, 48, 5, 50–54, 54, 54–55, 57, 6–7, 71–75, 8, 89, 94
   reaction.c0%0%0%0%11–12, 12, 12–13, 15, 19–20, 23, 23, 23–26, 26, 26–27, 32, 32, 32–34, 34, 34–35, 35, 35–36, 36, 36–38, 38, 38–40, 40, 40–43, 43, 43–44, 53, 56, 58–59, 6, 60–68, 7, 7, 7–9
   reactor.c0%0%0%0%10–11, 11, 11–13, 15–16, 16, 16–17, 19, 21, 23, 26–27, 27, 27–28, 30–31, 31, 31–32, 34, 36, 38–39, 39, 39–40, 44, 44, 44–45, 47, 49, 52–63, 7
   scheduler.c0%0%0%0%10, 12, 14, 16–17, 17, 17–18, 20, 22–23, 23, 23–25, 27, 29–33, 33, 33–35, 37–38, 40, 42–47, 47, 47–49, 49, 49, 5, 50–51, 53–54, 54, 54–55, 58–59, 6, 6, 6, 60, 62, 64–65, 65, 65–66, 68, 7, 70–71, 71, 71–72, 72, 72, 74–75, 78–79, 81–89, 9, 9, 9, 90–91
   tag.c11.58%8.70%20%13.64%21, 23, 26–27, 27, 27, 27, 27–28, 30, 30, 30, 30, 30–31, 33, 33, 33–34, 36–37, 37, 37–38, 40, 40, 40, 40, 40–41, 43, 43, 43, 43, 43–44, 46, 50–51, 53–54, 56–57, 59–60, 65–66, 66, 66, 66, 66–67, 70, 70, 70–71, 73–74, 74, 74, 78, 80–81, 83, 86–88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88–90, 92
   timer.c0%100%0%0%10, 12–13, 15, 18–20, 4, 6–8
   trigger.c0%0%0%0%10–11, 11, 11–13, 15–16, 16, 16–18, 20, 22–32, 34–37, 5–8