Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
wrt-packagemgt-iot-tests for master (#3827)
Browse files Browse the repository at this point in the history
* Add the Crosswalk test suite list for IoT platform. (#3812)

* [wrt] Add wrt-packagemgt test suite for Ostro IoT platform

Add a test suite for building Ostro XT image with Crosswalk.
Impacted tests(approved): new 1, update 0, delete 0
Unit test result summary: pass 1, fail 0, block 0
  • Loading branch information
qiuzhong authored and Honry committed Oct 18, 2016
1 parent 7593bf1 commit f049a2a
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 0 deletions.
97 changes: 97 additions & 0 deletions tools/build/released_suites/IoT-Platform
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
IOTTESTSUITELIST="
sampleapp-iot-tests
tct-2dtransforms-css3-tests
tct-3dtransforms-css3-tests
tct-animations-css3-tests
tct-animationtiming-w3c-tests
tct-appcache-html5-tests
tct-audio-html5-tests
tct-backgrounds-css3-tests
tct-batterystatus-w3c-tests
tct-browserstate-html5-tests
tct-canvas-html5-tests
tct-colors-css3-tests
tct-cors-w3c-tests
tct-csp-w3c-tests
tct-deviceorientation-w3c-tests
tct-dnd-html5-tests
tct-extra-html5-tests
tct-fileapi-w3c-tests
tct-filesystemapi-w3c-tests
tct-filewriterapi-w3c-tests
tct-flexiblebox-css3-tests
tct-fonts-css3-tests
tct-forms-html5-tests
tct-fullscreen-nonw3c-tests
tct-geoallow-w3c-tests
tct-geodeny-w3c-tests
tct-gumallow-w3c-tests
tct-indexeddb-w3c-tests
tct-jsenhance-html5-tests
tct-mediacapture-w3c-tests
tct-mediaqueries-css3-tests
tct-multicolumn-css3-tests
tct-navigationtiming-w3c-tests
tct-netinfo-w3c-tests
tct-notification-w3c-tests
tct-pagevisibility-w3c-tests
tct-sandbox-html5-tests
tct-screenorientation-w3c-tests
tct-selectorslevel1-w3c-tests
tct-selectorslevel2-w3c-tests
tct-sessionhistory-html5-tests
tct-sse-w3c-tests
tct-svg-html5-tests
tct-text-css3-tests
tct-touchevent-w3c-tests
tct-transitions-css3-tests
tct-typedarrays-nonw3c-tests
tct-ui-css3-tests
tct-vibration-w3c-tests
tct-video-html5-tests
tct-webaudio-w3c-tests
tct-webdatabase-w3c-tests
tct-webmessaging-w3c-tests
tct-websocket-w3c-tests
tct-webstorage-w3c-tests
tct-workers-w3c-tests
tct-xmlhttprequest-w3c-tests
usecase-webapi-xwalk-tests
webapi-appuri-w3c-tests
webapi-gamepad-w3c-tests
webapi-hrtime-w3c-tests
webapi-imports-w3c-tests
webapi-input-html5-tests
webapi-nfc-w3c-tests
webapi-performancetimeline-w3c-tests
webapi-presentation-w3c-tests
webapi-promises-nonw3c-tests
webapi-rawsockets-w3c-tests
webapi-resourcetiming-w3c-tests
webapi-serviceworkers-w3c-tests
webapi-simd-nonw3c-tests
webapi-usertiming-w3c-tests
webapi-webgl-khronos-tests
webapi-webrtc-w3c-tests
webapi-webspeech-w3c-tests
wrt-packagemgt-iot-tests
"

IOTSERVICEDOCROOTLIST="
tct-canvas-html5-tests
tct-cors-w3c-tests
tct-csp-w3c-tests
tct-navigationtiming-w3c-tests
tct-sandbox-html5-tests
tct-sessionhistory-html5-tests
tct-sse-w3c-tests
tct-webmessaging-w3c-tests
tct-websocket-w3c-tests
tct-webstorage-w3c-tests
tct-xmlhttprequest-w3c-tests
webapi-webgl-khronos-tests
webapi-rawsockets-w3c-tests
webapi-resourcetiming-w3c-tests
webapi-serviceworkers-w3c-tests
usecase-webapi-xwalk-tests
"
24 changes: 24 additions & 0 deletions wrt/wrt-packagemgt-iot-tests/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2016 Intel Corporation.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of works must retain the original copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the original copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this work without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 13 additions & 0 deletions wrt/wrt-packagemgt-iot-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Introduction

This test suite is for testing wrt-packagemgt-iot-tests.

## Authors:

* Qiu Zhong <[email protected]>

## LICENSE

Copyright (c) 2016 Intel Corporation.
Except as noted, this software is licensed under BSD-3-Clause License.
Please see the COPYING file for the BSD-3-Clause License.
Binary file added wrt/wrt-packagemgt-iot-tests/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!DOCTYPE html>
<!--
Copyright (c) 2016 Intel Corporation.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of works must retain the original copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the original copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Intel Corporation nor the names of its contributors
may be used to endorse or promote products derived from this work without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

<meta charset="utf-8">
<title>Crosswalk_Ostro_OS_XT_Image_Build</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="author" title="Qiu Zhong" href="mailto:[email protected]">
<body>
<p>
<strong>Precondition:</strong>
</p>
<p>Hardware</p>
<ol>
<li>RAM memory: >= 8GB</li>
<li>Disk: Make sure more than 50GB free space.</li>
</ol>

<p>Software</p>
<ol>
<li>Ubuntu Linux 14.04+, x86_64</li>
<li>GCC: 4.9+</li>
<li>The packages <strong>gawk chrpath texinfo</strong> are installed: <pre>sudo apt-get install gawk chrpath texinfo<pre></li>
<li><strong>(Optionally) </strong>Docker installed</li>
<li><strong>(Optionally) </strong>Add the current user to docker group:<pre>sudo gpasswd -a ${USER} docker</pre></li>
</ol>
<p>
<strong>Test steps:</strong>
</p>
<ol>
<p>
<li>Build Ostro OS XT image with Crosswalk:<br />
<pre>$ ./ostro-os-xt-xwalk-build.sh</pre>
<strong>Optionally, </strong>if you want to build the image with docker, comment the last line of ostro-os-xt-xwalk-build.sh:
<pre> # bitbake ostro-xt-image-noswupd</pre>
Add a new line:
<pre>docker/local-build.sh<br /></pre>
Then run the ostro-os-xt-xwalk-build.sh script.
</li>
</p>
<p>
<li>Check if the image works well</li>
<ol>
<li>Flash the image to a Joule device</li>
<li>Launch a Crosswalk hello world application on Joule device<pre>$ xwalk &lt;path/to/manifest&gt;</pre></li>
</ol>
</p>
</ol>
<p>
<strong>Expected Results</strong>
</p>
<ol>
<li>No error during the build.</li>
<li>Ostro OS XT image generated successfully at <pre>ostro-os-xt/build/tmp-glibc/deploy/images/&lt;CPU arch&gt;</pre></li>
<li>The Joule can boot normally.</li>
<li>The Crosswalk hello world application can launch normally.</li>
</ol>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# This script tries to build ostro-os-xt image on a Ubuntu Linux host.
# Prerequirements:
# HW:
# RAM: > 8GB
# SW:
# Ubuntu Linux x86_64
# GCC: 4.9+
# Yocto environment ready for building Ostro images.

use_docker=$1

export WORKSPACE=$HOME/work/ostro-os-xt2
export all_proxy="socks://proxy-shz.intel.com:1080"
export no_proxy="intel.com,.intel.com,localhost,127.0.0.1"
export GIT_PROXY_COMMAND="oe-git-proxy"

if [ ! -d $WORKSPACE ]; then
mkdir -pv $WORKSPACE
cd $WORKSPACE
git clone --recursive https://github.com/ostroproject/ostro-os-xt .
else
cd $WORKSPACE
git pull
git submodule update
fi

if [ ! -d $WORKSPACE/meta-crosswalk ]; then
cd $WORKSPACE
git clone https://github.com/crosswalk-project/meta-crosswalk.git
else
cd $WORKSPACE/meta-crosswalk
git pull
fi

cd $WORKSPACE/meta-crosswalk
META_XWALK_PATH=$(pwd)

cd $WORKSPACE
rm -fr build
source ostro-init-build-env

echo "OSTRO_XT_LAYERS += \"$META_XWALK_PATH\"" >> $WORKSPACE/build/conf/bblayers.conf
sed -i "s|#require conf/distro/include/ostro-os-development.inc|require conf/distro/include/ostro-os-development.inc|" $WORKSPACE/build/conf/local.conf
echo "require $META_XWALK_PATH/include/ostro-xt-security-flags.inc" >> $WORKSPACE/build/conf/local.conf
echo "SUPPORTED_RECIPES_append = \"$META_XWALK_PATH/include/ostro-xt-supported-recipes.txt\"" >> $WORKSPACE/build/conf/local.conf
echo "OSTRO_XT_IMAGE_EXTRA_INSTALL_append = \" crosswalk\"" >> $WORKSPACE/build/conf/local.conf

bitbake ostro-xt-image-noswupd
30 changes: 30 additions & 0 deletions wrt/wrt-packagemgt-iot-tests/suite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"pkg-blacklist": [
"pack.py",
"testcase.xsl",
"testresult.xsl",
"tests.css",
"icon.png",
"suite.json",
"inst.*"
],
"pkg-list": {
"iot": {
"blacklist": [
"*"
],
"copylist": {
"PACK-TOOL-ROOT/resources/inst/inst.iot.py": "inst.py",
"tests.full.xml": "tests.full.xml",
"tests.xml": "tests.xml"
},
"pkg-app": {
"copylist": {
"PACK-TOOL-ROOT/resources/testharness": "resources",
"PACK-TOOL-ROOT/resources/webrunner": "webrunner"
}
}
}
},
"pkg-name": "wrt-packagemgt-iot-tests"
}
13 changes: 13 additions & 0 deletions wrt/wrt-packagemgt-iot-tests/tests.full.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
<test_definition>
<suite category="Crosswalk WRT" name="wrt-packagemgt-iot-tests">
<set name="packagemgt" type="js">
<testcase component="Crosswalk WRT/Package Management" execution_type="manual" id="Crosswalk_Ostro_OS_XT_Image_Build" priority="P0" purpose="Validate if Ostro OS XT image with Crosswalk can be built successfully" status="approved" type="compliance">
<description>
<test_script_entry>opt/wrt-packagemgt-iot-tests/packagemgt/Crosswalk_Ostro_OS_XT_Image_Build.html</test_script_entry>
</description>
</testcase>
</set>
</suite>
</test_definition>
13 changes: 13 additions & 0 deletions wrt/wrt-packagemgt-iot-tests/tests.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
<test_definition>
<suite category="Crosswalk WRT" name="wrt-packagemgt-iot-tests">
<set name="packagemgt" type="js">
<testcase component="Crosswalk WRT/Package Management" execution_type="manual" id="Crosswalk_Ostro_OS_XT_Image_Build" purpose="Validate if Ostro OS XT image with Crosswalk can be built successfully">
<description>
<test_script_entry>opt/wrt-packagemgt-iot-tests/packagemgt/Crosswalk_Ostro_OS_XT_Image_Build.html</test_script_entry>
</description>
</testcase>
</set>
</suite>
</test_definition>

0 comments on commit f049a2a

Please sign in to comment.