dragonboard: add ethernet test case
Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
parent
42d216e0ee
commit
6cce50ffe8
4 changed files with 64 additions and 1 deletions
1
lichee/buildroot/target/dragonboard/src/testcases/Makefile
Normal file → Executable file
1
lichee/buildroot/target/dragonboard/src/testcases/Makefile
Normal file → Executable file
|
@ -26,6 +26,7 @@ all:
|
|||
make -C otgtester
|
||||
make -C 2gtester
|
||||
make -C bluetooth
|
||||
make -C nettester
|
||||
make -C gyrotester
|
||||
make -C gyroiiotester
|
||||
make -C vrcmptester
|
||||
|
|
11
lichee/buildroot/target/dragonboard/src/testcases/nettester/Makefile
Executable file
11
lichee/buildroot/target/dragonboard/src/testcases/nettester/Makefile
Executable file
|
@ -0,0 +1,11 @@
|
|||
|
||||
# define sources root directory before everything
|
||||
SRC_ROOT := ../..
|
||||
|
||||
# include rule.mk
|
||||
include $(SRC_ROOT)/rule.mk
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
cp nettester.sh $(BINDIR)/
|
||||
|
42
lichee/buildroot/target/dragonboard/src/testcases/nettester/nettester.sh
Executable file
42
lichee/buildroot/target/dragonboard/src/testcases/nettester/nettester.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
|
||||
#source script_parser.sh
|
||||
source send_cmd_pipe.sh
|
||||
|
||||
|
||||
if ifconfig -a | grep eth0; then
|
||||
ifconfig eth0 down
|
||||
sleep 1
|
||||
|
||||
ifconfig eth0 up
|
||||
if [ $? -ne 0 ];then
|
||||
|
||||
SEND_CMD_PIPE_FALL $3
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/etc/init.d/auto_config_network &
|
||||
sleep 10
|
||||
|
||||
ping_address=$(ping -c 4 www.baidu.com);
|
||||
|
||||
ping_cmd=$(echo $ping_address | grep -c "bytes from");
|
||||
|
||||
if [ $ping_cmd -eq 1 ]; then
|
||||
SEND_CMD_PIPE_OK $3
|
||||
else
|
||||
SEND_CMD_PIPE_FAIL $3
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ifconfig eth0 down
|
||||
# if [ $? -ne 0 ]; then
|
||||
# SEND_CMD_PIPE_FAIL $3
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
else
|
||||
|
||||
SEND_CMD_PIPE_FAIL $3
|
||||
exit 1
|
||||
fi
|
|
@ -59,7 +59,7 @@ run_type = 1
|
|||
;-------------------------------------------------------------------------------
|
||||
[wifi]
|
||||
display_name= "网络"
|
||||
activated = 1
|
||||
activated = 0
|
||||
program = "wifitester.sh"
|
||||
category = 0
|
||||
run_type = 1
|
||||
|
@ -67,6 +67,15 @@ module_count= 1
|
|||
module_path = "/system/vendor/modules/8723cs.ko"
|
||||
module_args =
|
||||
|
||||
[ethernet]
|
||||
display_name= "乙太網"
|
||||
activated = 1
|
||||
program = "nettester.sh"
|
||||
category = 0
|
||||
run_type = 1
|
||||
module_path =
|
||||
module_args =
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; module_path
|
||||
; The full path of g-sensor module file.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue