ROM-6881 How to fast test all the basic functions

From ESS-WIKI
Jump to: navigation, search

Preface

When sending samples to customer or test team (Lab、DQA etc) or releasing images, we need test all functions.

All functions are classified to three types:

  • Full-automatic Test
  • Semi-automatic Test
  • Manual Test

Full-Automatic Test

Run test script and get the result automatically.

Support to test the following items:

  • AIM Linux Applications
  • AIM Linux Services
  • AIM Timers
  • Thermal
  • NPU
  • GPU
  • VPU
  • eMMC
  • RTC
  • ALL the semi-automatic test Items

Preparation

  • Insert network cable to DUT
  • Open browser on DUT, then input "172.21.128.237"
  • Login your account to connect to internet
  • Prepare all semi-automatic items

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  /tools/test/adv/auto_test/auto_test.sh

 

Result

1. Failure

[ Failed ]: docker run hello-world Test Fail; Please check net connection, or docker

2. Success

[ OK ]: docker run hello-world Test Pass

RTENOTITLE

Semi-Automatic Test

GPIO

Test script need two GPIOs, set one GPIO to output and the other to input.

Then set the output to 1, read whether the input is 1.

Then set the output to 0, read whether the input is 0.

Preparation

  1. To get GPIO number from WIKI or User Mamual
  2. Short two GPIOs your want to test

[ Note ]

DB5901、DB2510 GPIOs have multi-functions, change to GPIO mode.

Testing

For example:

To test ROM-5880's GPIO0 and GPIO1

Run the following command on DUT Terminal、ADB or Debug console:

  /tools/test/adv/gpio/gpio_test.sh 88 89

Result

1. Failure

[ Failed ]: gpio-test 88 89 Test Fail

2. Success

[ OK ]: gpio-test 88 89 Test Pass

 

UART

UART may support RS232 or RS485 mode, we use env "uart_mode" to change mode in RUNTIME.

RS232 is tested in one port self-loop mode, RS485 in two port loop mode.

 

Preparation

  • To get UART information(RS232 or RS485; 4-wire or 2-wire; Software Port Number etc) from WIKI or User Mamual
  • Run the following command on DUT Terminal、ADB or Debug console to check env setting
 
        fw_printenv uart_mode

        # RS232: You will get the following information
        # Error: "uart_mode" not defined 
        # uart_mode=0x00

        # RS485: You will get the following information
        # uart_mode=0x0c
        
  • To test RS232 mode, short TX to RX (PIN2 to PIN3 DB9) and CTS to RTS (PIN7 to PIN8 DB9)

RS232 Mode Testing

For example:

To test /dev/ttyS0

Run the following command on DUT Terminal、ADB or Debug console:

4-wire

 

/tools/test/adv/uart/rs232_4_wire_test.sh /dev/ttyS0

2-wire

 

/tools/test/adv/uart/rs232_2_wire_test.sh /dev/ttyS0

Result

1. Failure

[ Failed ]: uart-test /dev/ttyS0 Test Fail

2. Success

[ OK ]: uart-test /dev/ttyS0 Test Pass

CAN

Test script need two CANs, set one CAN as sender and the other as receiver.

Then send "123#55" from the sender, check whether the receiver get the same data.

Preparation

  1. Short CAN0's CAN_L (PIN2 DB9) to CAN1's CAN_L (PIN2 DB9)
  2. Short CAN0's CAN_H (PIN7 DB9) to CAN1's CAN_H (PIN7 DB9)

Testing

Run the following command on DUT Terminal、ADB or Debug console:

can0 is receiver, can1 is sender

/tools/test/adv/can/can_test.sh can0 can1

can1 is receiver, can0 is sender

/tools/test/adv/can/can_test.sh can1 can0

Result

1. Failure

[ Failed ]: canbus Test Fail

2. Success

[ OK ]: canbus Test Pass

I2C PIN Header

Using EG70 Test Board to read I2C flash.

Preparation

  1. Insert EG70 Test Board to DUT

[ Note ]

EG70 support multi I2C address(0x50, 0x51 ...), change to correct address.

 

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/i2c/iic_pin_test.sh 4 0x50

 

Result

1. Failure

[ Failed ]: iic pinheader Test Fail

2. Success

[ OK ]: iic pinheader Test Pass

SPI PIN Header

Using EG70 Test Board to read SPI flash.

Preparation

  1. Insert EG70 Test Board to DUT

[ Note ]

DB2510 SPIs have multi-functions, change to SPI PIN Header.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/spi/spi_test.sh mtd0

If test 2 SPI PIN Headers at the same time:

  

/tools/test/adv/spi/spi_test.sh mtd1

Result

1. Failure

[ Failed ]: SPI mtd0 Test Fail

2. Success

[ OK ]: SPI mtd0 Test Pass

LAN

Test scripts automaticall ping www.baidu.com 10 times , check whether have packet loss.

Preparation

  1. Insert network cable

Testing

Run the following command on DUT Terminal、ADB or Debug console:

eth0

  

/tools/test/adv/net/net_test.sh eth0

eth1

  

/tools/test/adv/net/net_test.sh eth1

Result

1. Failure

[ Failed ]: net-test eth0 Test Fail

2. Success

[ OK ]: net-test eth0 Test Pass

WIFI

Test scripts automaticall ping www.baidu.com 10 times , check whether have packet loss.

Preparation

  1. Insert WIFI module and antenna
  2. Connect to Hotspot (eg: Advantech for guest) on DUT

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/net/net_test.sh wlan0

Result

1. Failure

[ Failed ]: net-test wlan0 Test Fail

2. Success

[ OK ]: net-test wlan0 Test Pass

4G/5G

Test scripts automaticall ping www.baidu.com 10 times , check whether have packet loss.

Preparation

  1. Insert 4G/5G module with antenna and SIM card
  2. Configure "Mobile Broadband connection" on DUT according User Manual or WIKI.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/net/net_test.sh wwan0

Result

1. Failure

[ Failed ]: net-test wwan0 Test Fail

2. Success

[ OK ]: net-test wwan0 Test Pass

SD Card

Test scripts automaticall copy a file in eMMC to SD card, check whether the file is different in eMMC and SD card.

Preparation

  1. Insert SD card

[ Note ]

  • DO NOT use bootup SD card.
  • Make sure SD card is partitioned and formatted.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/storage/storage_test.sh mmcblk1p1

Result

1. Failure

[ Failed ]: storage-test mmcblk1p1 Test Fail

2. Success

[ OK ]: storage-test mmcblk1p1 Test Pass

SATA

Test scripts automaticall copy a file in eMMC to SATA disk, check whether the file is different in eMMC and SATA disk.

Preparation

  1. Insert SATA disk
  2. Remove all USB disk

[ Note ]

  • Make sure SATA disk is partitioned and formatted.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/storage/storage_test.sh sda1

Result

1. Failure

[ Failed ]: storage-test sda1 Test Fail

2. Success

[ OK ]: storage-test sda1 Test Pass

PCIE

Using PCIE disk (SQF-CM3V1-512G-EDE) to test PCIE interface. The following cards is needed:

  1. PCIE disk : SQF-CM3V1-512G-EDE
  2. M.2 to mini-PCIE board : EXM-CMPF1(19A6MPF100-01 )
  3. mini-PCIE to standart PCIE board : 

Test scripts automatically copy a file in eMMC to PCIE disk, check whether the file is different in eMMC and PCIE disk.

Preparation

  1. Insert PCIE disk

[ Note ]

  • Make sure PCIE disk is partitioned and formatted.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

/tools/test/adv/storage/storage_test.sh nvme0n1p1

Result

1. Failure

[ Failed ]: storage-test nvme0n1p1 Test Fail

2. Success

[ OK ]: storage-test nvme0n1p1 Test Pass

Manual Test

USB

Watchdog

Test script enable watchdog, eat it 100 times then let it alone.

Run test script, watch DUT weither reboot.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

/tools/test/adv/watchdog/wdt /dev/watchdog 20

Result

1. Failure

DUT cann't reboot after 20s.

2. Success

DUT reboot after 20s.

Bluetooth

Send a file manually from DUT to other device (eg: PC or Phone), check whether the device receive it failed.

Preparation

  1. Insert WIFI/BT module and antenna

Testing

Send a file manually from DUT to other device (eg: PC or Phone) according User Manual or WIKI.

Result

1. Failure

Sending file failed.

2. Success

Sending file sucessfully.

Audio

Run test scripts to play or record, then manually check whether hearing sound clearly.

When testing record, first record, then play the audio just recorded.

Preparation

  1. Insert sound Board to DUT
  2. Insert necessary cable and accessories(speaker、microphone etc)
  3. Run the following command on DUT Terminal、ADB or Debug console to get sound card number:
  
cat /proc/asound/cards

0 [rockchiphdmi   ]: rockchip_hdmi - rockchip,hdmi
rockchip,hdmi
1 [rockchiprt5640c]: rockchip_rt5640 - rockchip,rt5640-codec
rockchip,rt5640-codec

Testing

Run the following command on DUT Terminal、ADB or Debug console:

For example to test sound card 1

/tools/test/adv/audio/audio_record_test.sh 1
/tools/test/adv/audio/audio_play_test.sh 1

Result

1. Failure

Cann't hear the recorded audio clearly.

2. Success

Can hear the recorded audio clearly.

Camera

Using EG58 Test Board to preview on DUT display.

Video Port

RK3399

 

RK3568

 

RK3588

ROM-6881
Camera Num Video Port Note
Camera 1 44 (I2C 4)  2 Lane
Camera 2 62 (I2C 3)  4 Lane 
Camera 3 53 On Core Board CN1 (I2C 5) 4 Lane 
Camera 4 71 On Core Board CN2 (I2C 8)  4 Lane

Preparation

  1. Insert EG58 Test Board to DUT
  2. Insert LCD panel
  3. To get camera port from WIKI or User Mamual

[ Note ]

DB5901、DB2510 GPIOs have multi-functions, change to Camera mode.

If setting multi-display, insert all LCD panel.

 

Testing

Run the following command on DUT Terminal、ADB or Debug console:

  

# 44 is camera port, need change according project
/tools/test/adv/camera/camera_rkaiq_test.sh 44

 

Result

1. Failure

Cann't see preview interface on DUT display.

2. Success

Can see preview interface on DUT display.

Display

Manually check whether the display panel works well.

Preparation

  1. Insert LCD panel
  2. Configure multi-display according User Manual or WIKI.

Testing

Watch display whether working well.

Run the following command on DUT Terminal、ADB or Debug console to check whether maximum resolutin of HDMI or DP is OK:

  
xrandr

Result

1. Failure

Display works on maximum resolution failed.

2. Success

Display works on maximum resolution fine.

SW reboot

Run “reboot” command, watch DUT weither reboot.

Testing

Run the following command on DUT Terminal、ADB or Debug console:

reboot

Result

1. Failure

DUT cann't reboot .

2. Success

DUT reboot immediately.

Reboot Button

Press reboot button, watch DUT weither reboot.

Testing

Press reboot button

Result

1. Failure

DUT cann't reboot .

2. Success

DUT reboot immediately.

 

Power Button

When DUT is power on, press power button, watch DUT weither power off.

When DUT is power off, press power button, watch DUT weither power on.

Preparation

  1. Insert power button if needed
  2. Insert Display & Mouse

Testing

When DUT is power on, press power button, some versions need to choose "Shut Down".

When DUT is power off, press power button.

Result

1. Failure

DUT cann't power on/off.

2. Success

DUT power on/off fine.