Code Monkey home page Code Monkey logo

boardfarm's Introduction


Creatordev

The Creatordev Github organisation holds the open source projects producted by the Creator team at MIPS. The Creator programme aims to provide developers using MIPS based development platforms with tools and support to accelerate their product development cycle, learn more about Creator at Creatordev.io.

Our open source projects on Github can be seen by browsing to the top level list of repositories for Creatordev.

You'll find info on the MIPS development boards at our documentation site docs.creatordev.io, or visit us at forum.creatordev.io for support and discussion

boardfarm's People

Contributors

francois-berder avatar ham22 avatar madhavishinde2318 avatar mattsm avatar mbanders avatar miska avatar mtusnio avatar nikhil-zinjurde-imgtec avatar payal-sarnot avatar shpinkso avatar wwahammy avatar yi-liang avatar z0n avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boardfarm's Issues

Add OPKG test

Check that OPKG update works
Check that OPKG install works (doesn't fail) for some stable package

Add boardfarm recovery from a broken state

There are two parts to this task:

The physical setup needs to ensure that, even with the usb kmod failing, the ethernet connection lets boardfarm download an image to fix itself.

Apart from that the software needs to be able to recover itself from a fail state and flash a stable image, so that any PR that breaks boardfarm won't break all other PRs.

Acceptance Criteria:

  • If NAND is empty, still able to program the NAND
  • Use bootloader to flash, firmware0 by default and gets image from a accessible IP location (not from USB)
  • Flash the image generated by Jenkins PR job
  • Steps from Flashing from UBoot Prompt

opkg install tests fail on lede

Because the packages don't exist yet for our arch. We should switch to some "core" packages for these tests or make a full release for lede

Update Boardfarms InterfaceShow test

InterfacesShow is passing now while it should be failing due to eth0 showing up as unknown, the test needs to properly differentiate between the interfaces to figure out how many of them should show up with a proper UP/DOWN status.

Add fw_printenv test

We should be checking whether we can access Uboot variables after flashing, a simple test to check if fw_printenv prints boot_partition value and returns a zero exit code would be enough.

OpkgUpdate & OpkgInstall regression failure on weekly "build all" CI job

Failure for OpkgUpdate test:

boardfarm.OpkgUpdate() (from (empty))
Failing for the past 1 build (Since Unstable#282 )
Took 30 sec.
Stacktrace

Traceback (most recent call last):
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/tests/linux_boot.py", line 72, in testWrapper
    self.runTest()
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/tests/opkg.py", line 41, in runTest
    board.expect('Updated list of available packages')
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/devices/openwrt_router.py", line 455, in expect
    return super(OpenWrtRouter, self).expect(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1418, in expect
    timeout, searchwindowsize)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1433, in expect_list
    timeout, searchwindowsize)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1535, in expect_loop
    raise TIMEOUT(str(err) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded.
<devices.openwrt_router.OpenWrtRouter object at 0x7f1028cd70d0>
version: 3.1
command: /bin/bash
args: ['/bin/bash', '-c', u'miniterm.py -b 115200 /dev/ttyUSB0']
searcher: <pexpect.searcher_re object at 0x7f1028d5f310>
buffer (last 100 chars): 'ck failed.\r\r\nSignature check failed.\r\r\nSignature check failed.\r\r\nroot@OpenWrt:/# \r\r\nroot@OpenWrt:/# '
before (last 100 chars): 'ck failed.\r\r\nSignature check failed.\r\r\nSignature check failed.\r\r\nroot@OpenWrt:/# \r\r\nroot@OpenWrt:/# '
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 23615
child_fd: 3
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: <devices.base.o_helper instance at 0x7f1028dab488>
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1

Failure for OpkgInstall test:

boardfarm.OpkgInstall() (from (empty))
Failing for the past 1 build (Since Unstable#282 )
Took 30 sec.
Stacktrace

Traceback (most recent call last):
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/tests/linux_boot.py", line 72, in testWrapper
    self.runTest()
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/tests/opkg.py", line 57, in runTest
    board.expect("Configuring {}".format(pkg))
  File "/home/jenkins/workspace/CreatorDev_openwrt_ci40-LYIXBKXU7P6M7VKINYW64SFJHCZJFZ43LACISJI2LBBWG2Q4GTUA/boardfarm/devices/openwrt_router.py", line 455, in expect
    return super(OpenWrtRouter, self).expect(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1418, in expect
    timeout, searchwindowsize)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1433, in expect_list
    timeout, searchwindowsize)
  File "/usr/lib/python2.7/dist-packages/pexpect/__init__.py", line 1535, in expect_loop
    raise TIMEOUT(str(err) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded.
<devices.openwrt_router.OpenWrtRouter object at 0x7f1028cd70d0>
version: 3.1
command: /bin/bash
args: ['/bin/bash', '-c', u'miniterm.py -b 115200 /dev/ttyUSB0']
searcher: <pexpect.searcher_re object at 0x7f1028b99950>
buffer (last 100 chars): 'ed errors:\r\r\n * opkg_install_cmd: Cannot install package nano.\r\r\nroot@OpenWrt:/# \r\r\nroot@OpenWrt:/# '
before (last 100 chars): 'ed errors:\r\r\n * opkg_install_cmd: Cannot install package nano.\r\r\nroot@OpenWrt:/# \r\r\nroot@OpenWrt:/# '
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 23615
child_fd: 3
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: <devices.base.o_helper instance at 0x7f1028dab488>
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1

Sysupgrade test

Testlink: CK-132/133

Sysupgrade to and from the last major release version.

WARNING: Unknown board model 'ci40'

Running boardfarm gives this warning in the logs

WARNING: Unknown board model 'ci40'. Please check spelling, or write an appropriate class to handle that kind of board.

Add BT/BLE scan, connect and ping test

Given a CI40 with BT/BLE enabled

  • scan for BT/BLE devices
  • when a wireless device connects, then connection and ping over BT/BLE is successful

Requires an additional BT/BLE device (RPi or other device) to be in the boardfarm setup

Test upgrades

We need to test upgrades, there are lots of scenarios to test but atm anything is better than nothing.

Acceptance criteria:

  • test that a build can upgrade the other nand partition to itself
  • confirms a reboot does switch parititions

Create a Jenkinsfile for boardfarm testing

As a boardfarm developer, I want to check that my boardfarm change has not broken anything before it is merged
As a developer, I want to manually run a hosted creator image through boardfarm, so that I know the creator image extensions haven't broken the core platform.

Intended to check that boardfarm works prior to a PR getting merged to the boardfarm repo.

  • Uploads the latest major release (hard code this to 1.0.1 for now)
  • Runs boardfarm tests on PR change
  • Optional build param allows to add a link to hosted image to be flashed

Add OPKG remove test

  • Check that OPKG remove works
  • Check that OPKG removes (doesn't fail) some stable package with no dependencies
  • Check that OPKG removes (doesn't fail) some stable package which has dependencies installed
  • Check that OPKG removed (doesn't fail) some kmod package
  • Check removing a package which is not even installed, should be handled
  • Test must be put through a fail case to ensure that it will report failure correctly

Add softap wifi connect and ping test

Given a CI40 in softAP mode, when a wireless device connects, then connection and ping over wireless is successful.
Requires an additional WLAN RPi to be in the boardfarm setup

Add stress test to weekly build

Acceptance

  • Runs on weekly builds only (not CI)
  • Runs the following for 12 hours
    stress --cpu 20 --io 20 --vm 4 --vm-bytes 16M & iperf3 -c <test-server-ip> -b0 -t0 -i 10 &
  • Flags a failure if the board crashes /coredumps/becomes unresponsive

Add test to flash bootloader from openwrt prompt

  • Check the current version of U-Boot from prompt (can use "strings /dev/mtd0 | grep "U-Boot"" command to find out the version)
  • Flash a different version of bootloader using "mtd write" command
  • Verify that the new version is flashed correctly using "mtd verify" command

Tests waste 180seconds waiting for boot

Currently once programming is finished we reboot the device and wait 180 seconds.

Instead we could just wait for a few seconds (to avoid accidentally interrupting boot loader) and then sit in a loop waiting for the console to appear. This shouldn't take more than 40 seconds. If it does timeout exception should be raised.

Test logs aren't in report

The test logs can be seen in the overall build log but I would expect the test report UI to be able to show full logs of each test. Currently it can only shows a stack trace of failed tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.