SRU will be triggered twice in the autostart file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Next Generation Checkbox (CLI) |
Fix Released
|
High
|
Po-Hsu Lin |
Bug Description
For the command we use for starting SRU test in the autostart file, it will trigger the test twice:
look into the command we use:
sh -c "pidof systemd && { sudo systemctl start checkbox-
The problem is that on a SRU system, it doesn't have the checkbox-ci-mailer package installed.
Let's break down what happened on a 15.04 system:
1. it will satisfy the "pidof systemd && {$first_part}" command, run SRU once with $first_part command
2. since it failed with no checkbox-ci-mailer package installed in $first_part command, it will not return 0 for step 1
3. as the return value is not 0, the second part (command after ||) will be triggered, which causing SRU to be triggered twice.
A possible solution is to add another if statement for checking the existence of the checkbox-ci-mailer package, call the mailer service if it's installed.
Related branches
- Sylvain Pineau (community): Approve
-
Diff: 12 lines (+1/-1)1 file modifiedcheckbox-ng/contrib/checkbox-sru.desktop (+1/-1)
Changed in checkbox-ng: | |
status: | New → Triaged |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
importance: | Undecided → High |
description: | updated |
Changed in checkbox-ng: | |
status: | Triaged → In Progress |
Changed in checkbox-ng: | |
milestone: | none → 0.20 |
status: | In Progress → Fix Committed |
Changed in checkbox-ng: | |
status: | Fix Committed → Fix Released |