Nancy Chen has proposed merging ~canonical-hw-cert/hwcert-jenkins-tools/+git/tf-cmd-scripts:add-tf-firmware-update into hwcert-jenkins-tools:master.
Commit message: Add tf-firmware-update for firmware_update phase https://github.com/canonical/testflinger/pull/141 Requested reviews: Canonical Hardware Certification (canonical-hw-cert) For more details, see: https://code.launchpad.net/~canonical-hw-cert/hwcert-jenkins-tools/+git/tf-cmd-scripts/+merge/457758 -- Your team Canonical Hardware Certification is requested to review the proposed merge of ~canonical-hw-cert/hwcert-jenkins-tools/+git/tf-cmd-scripts:add-tf-firmware-update into hwcert-jenkins-tools:master.
diff --git a/tf-allocate b/tf-allocate new file mode 100755 index 0000000..92368fe --- /dev/null +++ b/tf-allocate @@ -0,0 +1,10 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +if [ -f /srv/testflinger-agent/$AGENT/testflinger-agent.conf ]; then + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONUNBUFFERED=1 testflinger-device-connector $PROVISION_TYPE allocate -c /srv/testflinger-agent/$AGENT/default.yaml testflinger.json +else + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONIOENCODING=utf-8 PYTHONUNBUFFERED=1 snappy-device-agent $PROVISION_TYPE allocate -c /srv/testflinger-agent/$AGENT/snappy-device-agents/default.yaml testflinger.json +fi diff --git a/tf-cleanup b/tf-cleanup new file mode 100755 index 0000000..8ef6906 --- /dev/null +++ b/tf-cleanup @@ -0,0 +1,7 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +echo Cleaning up container if it exists... && docker rm -f $AGENT || /bin/true + diff --git a/tf-firmware-update b/tf-firmware-update new file mode 100755 index 0000000..6eb0e70 --- /dev/null +++ b/tf-firmware-update @@ -0,0 +1,6 @@ +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +if [ -f /srv/testflinger-agent/$AGENT/testflinger-agent.conf ]; then + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONUNBUFFERED=1 testflinger-device-connector $PROVISION_TYPE firmware_update -c /srv/testflinger-agent/$AGENT/default.yaml testflinger.json +fi diff --git a/tf-provision b/tf-provision new file mode 100755 index 0000000..f4f5887 --- /dev/null +++ b/tf-provision @@ -0,0 +1,10 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +if [ -f /srv/testflinger-agent/$AGENT/testflinger-agent.conf ]; then + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONUNBUFFERED=1 testflinger-device-connector $PROVISION_TYPE provision -c /srv/testflinger-agent/$AGENT/default.yaml testflinger.json +else + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONIOENCODING=utf-8 PYTHONUNBUFFERED=1 snappy-device-agent $PROVISION_TYPE provision -c /srv/testflinger-agent/$AGENT/snappy-device-agents/default.yaml testflinger.json +fi diff --git a/tf-reserve b/tf-reserve new file mode 100755 index 0000000..2d94099 --- /dev/null +++ b/tf-reserve @@ -0,0 +1,10 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +if [ -f /srv/testflinger-agent/$AGENT/testflinger-agent.conf ]; then + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONUNBUFFERED=1 testflinger-device-connector $PROVISION_TYPE reserve -c /srv/testflinger-agent/$AGENT/default.yaml testflinger.json +else + . /srv/testflinger-agent/$AGENT/env/bin/activate && PYTHONIOENCODING=utf-8 PYTHONUNBUFFERED=1 snappy-device-agent $PROVISION_TYPE reserve -c /srv/testflinger-agent/$AGENT/snappy-device-agents/default.yaml testflinger.json +fi diff --git a/tf-setup b/tf-setup new file mode 100755 index 0000000..8ef6906 --- /dev/null +++ b/tf-setup @@ -0,0 +1,7 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +echo Cleaning up container if it exists... && docker rm -f $AGENT || /bin/true + diff --git a/tf-test b/tf-test new file mode 100755 index 0000000..84fc8d6 --- /dev/null +++ b/tf-test @@ -0,0 +1,10 @@ +#!/bin/bash + +AGENT=$(echo $agent_id | sed 's/-\([0-9]*\)$/\1/g') +PROVISION_TYPE="$provision_type" + +if [ -f /srv/testflinger-agent/$AGENT/testflinger-agent.conf ]; then + docker run -t --name $AGENT -v $PWD:/home/ubuntu -v ~/.ssh:/home/ubuntu/.ssh:ro -v /srv/testflinger-agent/$AGENT:/srv/testflinger-agent/$AGENT plars/testflinger-testenv-focal bash -c "(cd /srv/testflinger-agent/$AGENT/testflinger/device-connectors && sudo pip install . &> /dev/null) && PYTHONUNBUFFERED=1 testflinger-device-connector $PROVISION_TYPE runtest -c /srv/testflinger-agent/$AGENT/default.yaml testflinger.json" +else + docker run -t --name $AGENT -v $PWD:/home/ubuntu -v ~/.ssh:/home/ubuntu/.ssh:ro -v /srv/testflinger-agent/$AGENT:/srv/testflinger-agent/$AGENT plars/testflinger-testenv-focal bash -c "(cd /srv/testflinger-agent/$AGENT/snappy-device-agents && sudo pip install . &> /dev/null) && PYTHONIOENCODING=utf-8 PYTHONUNBUFFERED=1 snappy-device-agent $PROVISION_TYPE runtest -c /srv/testflinger-agent/$AGENT/snappy-device-agents/default.yaml testflinger.json" +fi
-- Mailing list: https://launchpad.net/~canonical-hw-cert Post to : [email protected] Unsubscribe : https://launchpad.net/~canonical-hw-cert More help : https://help.launchpad.net/ListHelp

