Skip to content

Commit

Permalink
submit2xtc.sh: reflect changes in new android agent
Browse files Browse the repository at this point in the history
  • Loading branch information
lewurm committed Feb 22, 2016
1 parent c7a19fa commit 5f6d320
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
12 changes: 12 additions & 0 deletions http-api/build-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

# FIXME: get credentials `benchmarkerPostgres` and `httpAPITokens`

env GOOS=linux GOARCH=amd64 go build -o http-api *.go
docker build -t http-api-test .
rm http-api

docker tag -f http-api-test 633007691302.dkr.ecr.us-east-1.amazonaws.com/http-api-test:latest
docker push 633007691302.dkr.ecr.us-east-1.amazonaws.com/http-api-test:latest
5 changes: 5 additions & 0 deletions machines/SM-N910F_4.4.4.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Name": "SM-N910F_4.4.4",
"DefaultTimeout": 120,
"architecture": "armeabi-v7a",
}
21 changes: 21 additions & 0 deletions performancebot/utils/submit2xtc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ if [ ! -f $PARAMSJSON ]; then
exit 3
fi

if [ ! -f ./jq ]; then
wget -O ./jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64
chmod +x ./jq
fi

function checkjsonfield()
{
(cat "$PARAMSJSON" | ./jq -e '.'$1 > /dev/null) || (echo "file $PARAMSJSON must contain field $1" && exit 4)
}

# check if the json file has the required fields
checkjsonfield 'githubAPIKey'
checkjsonfield 'httpAPITokens'
checkjsonfield 'runSetId'

submitjob () {
DEVICENAME=$1
DEVICEID=$2
Expand All @@ -49,6 +64,11 @@ submitjob () {
| grep runSetId | grep -o -E '\d+')

echo "runSetId: $RUNSETID"
# insert new runSetId into JSON file
PARAMTMP=$(mktemp /tmp/param_template.json.XXXXXX)
mv "$PARAMSJSON" "$PARAMTMP"
cat "$PARAMTMP" | ./jq 'to_entries | map(if .key == "runSetId" then . + {"value":'$RUNSETID'} else . end) | from_entries ' > $PARAMSJSON
rm -f "$PARAMTMP"

# build app + uitests
(cd AndroidAgent && $XBUILDANDROID /p:Configuration=Release /target:SignAndroidPackage )
Expand Down Expand Up @@ -90,6 +110,7 @@ xbuild /p:Configuration=Release /target:compare

OLDIFS=$IFS
IFS=','
# for i in "SM-N910F_4.4.4",df355e99,"--test-chunk","1"; do
for i in "Nexus-5_4.4.4",aba2bb7e,"--test-chunk","1" "Nexus-5_4.4.4-f36cc9c33f1a",f36cc9c33f1a,"","2"; do
set $i
DEVICENAME=$1
Expand Down

0 comments on commit 5f6d320

Please sign in to comment.