Skip to content

Commit

Permalink
Fix formatting, cat config in sanity check, fix test configs
Browse files Browse the repository at this point in the history
  • Loading branch information
boddenberg-it committed May 24, 2017
1 parent 52265c6 commit dffd615
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 20 deletions.
1 change: 0 additions & 1 deletion ascent.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
# ascent config file
# https://github.com/boddenberg-it/ascent

Expand Down
23 changes: 12 additions & 11 deletions ascent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ print_help() {
echo -e "# #"
echo -e "# But first, one need to create ascent.cfg file, which can #"
echo -e "# be placed in ~/.ascent or passed when invoking: #"
echo -e "# #"
echo -e "# #"
echo -e "# ${GRAY}./ascent -c ${G}<path_to_config_file>${Y} ${G}arg(s)${Y} #"
echo -e "# #"
echo -e "# Following information need to be provided by config file: #"
echo -e "# #"
echo -e "# ${G}serial_0=05cd98e0f0fd7bc8${Y} #"
echo -e "# ${G}msisdn_0=1234${Y} #"
echo -e "# ${G}name_0=s7${Y} #"
echo -e "# #"
echo -e "# ${G}serial_1=4ef2d43176795a51${Y} #"
echo -e "# ${G}msisdn_1=5678${Y} #"
echo -e "# ${G}name_1=nexus6${Y} #"
echo -e "# ${G}serial_0=05cd98e0f0fd7bc8${Y} #"
echo -e "# ${G}msisdn_0=1234${Y} #"
echo -e "# ${G}name_0=s7${Y} #"
echo -e "# #"
echo -e "# ${G}serial_1=4ef2d43176795a51${Y} #"
echo -e "# ${G}msisdn_1=5678${Y} #"
echo -e "# ${G}name_1=nexus6${Y} #"
echo -e "# #"
echo -e "# ${R}1st)${Y} When ascent.sh is invoked, one can pass several #"
echo -e "# of following arguments (tests suites/cases): #"
Expand Down Expand Up @@ -107,7 +107,8 @@ sanity() {

else
echo
echo " [INFO] sourcing $ASCENT_CONFIG"
echo -e "${Y}[INFO] sourcing $ASCENT_CONFIG${NC}"
cat "$ASCENT_CONFIG"
echo

source "$ASCENT_CONFIG"
Expand Down Expand Up @@ -167,7 +168,7 @@ adb_call() {
}

adb_ping() {
adb -s "$1" shell ping -c 3 "$2"
adb -s "$1" shell ping -c 3 "$2"
}

adb_swipe() {
Expand All @@ -187,7 +188,7 @@ send_sms() {
# maybe allow passing text?
adb_send_sms "$1" "$2" "test_input"
sleep 0.2
adb_input_text "$1" "test_input"
adb_input_text "$1" "test_input"
sleep 0.2
adb_keyevent "$1" "$KEYCODE_DPAD_RIGHT"
sleep 0.2
Expand Down
9 changes: 7 additions & 2 deletions configs_for_tests/invalid_config
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
This is an invalid config file
4df1d42174585f61=001=s3

# device 0
serial_0=foo
name_0=bar

# device 1
name_1=s3
16 changes: 10 additions & 6 deletions configs_for_tests/valid_config
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# ascent config file
#
# device_0=<android_serial>=<msisdn>=<name>
# device_1=<android_serial>=<msisdn>=<name>
#
# https://github.com/boddenberg-it/ascent

device_0=05cd99e0f0dd9bc8=000=nexus5
device_1=4df1d42174595f61=001=s3
# device 0
serial_0=05cd99e0f0dd9bc8
msisdn_0=000
name_0=nexus5

# device 1
serial_1=4df1d42174595f61
msisdn_1=001
name_1=s3

0 comments on commit dffd615

Please sign in to comment.