<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11628">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ansible: gsm-tester: Support power cycling multiple quad modems<br><br>uhubctl doesn't support acting on several hubs from same vendor at once.<br><br>Change-Id: I01e698c96240130ed6f632f82383f6020d2a3b81<br>---<br>M ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh<br>1 file changed, 8 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/28/11628/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh b/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh</span><br><span>index 626a04e..f461d81 100755</span><br><span>--- a/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh</span><br><span>+++ b/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh</span><br><span>@@ -1,9 +1,15 @@</span><br><span> #!/bin/sh</span><br><span> set -ex</span><br><span style="color: hsl(0, 100%, 40%);">-uhubctl -p 123456 -a 0 -n 1d50:4002</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+locations="$(uhubctl -n 1d50:4002 | grep "Current status for hub" | awk '{print $5}')"</span><br><span style="color: hsl(120, 100%, 40%);">+for l in $locations; do</span><br><span style="color: hsl(120, 100%, 40%);">+ uhubctl -p 123456 -a 0 -n 1d50:4002 -l $l</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span> # give a lot of time to discharge capacitors on the board</span><br><span> sleep 20</span><br><span style="color: hsl(0, 100%, 40%);">-uhubctl -p 123456 -a 1 -n 1d50:4002</span><br><span style="color: hsl(120, 100%, 40%);">+for l in $locations; do</span><br><span style="color: hsl(120, 100%, 40%);">+  uhubctl -p 123456 -a 1 -n 1d50:4002 -l $l</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span> attempts=30</span><br><span> while [ "x$(uhubctl | grep -e 05c6 -e 1199 -c)" != "x{{ gsm_modems }}" ]; do</span><br><span>   attempts=$(($attempts - 1))</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11628">change 11628</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11628"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ci </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I01e698c96240130ed6f632f82383f6020d2a3b81 </div>
<div style="display:none"> Gerrit-Change-Number: 11628 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>