diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2017-08-03 13:09:24 +0200 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2017-09-27 18:58:33 +0200 |
commit | fd1d9a0f5551fd5ae86324181b7f3ee6f344e54f (patch) | |
tree | c33fe81290fdabff1c2c9f3a3e156aafb7a8268a /tct | |
parent | dbce57bb513746d49ef5d3c41e80a3bc4e525f15 (diff) | |
download | major-fd1d9a0f5551fd5ae86324181b7f3ee6f344e54f.tar.gz major-fd1d9a0f5551fd5ae86324181b7f3ee6f344e54f.tar.bz2 major-fd1d9a0f5551fd5ae86324181b7f3ee6f344e54f.zip |
Run smoke on rpi3 using expect script
Change-Id: Ie89e94fd7e3bc361e9cb1eb1d1df312a80b8cc71
Diffstat (limited to 'tct')
-rwxr-xr-x | tct/rpi3_run.sh | 2 | ||||
-rwxr-xr-x | tct/run/rpi3.exp | 38 |
2 files changed, 39 insertions, 1 deletions
diff --git a/tct/rpi3_run.sh b/tct/rpi3_run.sh index 01bb269..dc1f59d 100755 --- a/tct/rpi3_run.sh +++ b/tct/rpi3_run.sh @@ -48,7 +48,7 @@ sdb -s "${IP}" root on echo "### run ###" copy_sdb "${IP}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" -run_smoke_sdb "${IP}" +"${TESTLAB_SCRIPTS}/run/rpi3.exp" "${IP}" | tee sysctl.result if [ -f "common_test.yaml" ] then diff --git a/tct/run/rpi3.exp b/tct/run/rpi3.exp new file mode 100755 index 0000000..c7a464b --- /dev/null +++ b/tct/run/rpi3.exp @@ -0,0 +1,38 @@ +#!/usr/bin/expect -f + +# Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Author: Aleksander Mistewicz <a.mistewicz@samsung.com> + +set serial [lindex $argv 0] + +spawn sdb -s $serial shell + +send "\r" + +expect { + "$ " { send "su -l root -c \"sh /tmp/smoke.sh\"\r" } + "sh-3.2# " { send "sh \"/tmp/smoke.sh\"\r" } +} + +expect "Password:" { + send "tizen\r" +} + +expect "FINISH_SUCCESS" { + send "logout\r" +} + +close |