tools/testlab/major.git
7 years agoAdd timestamp argument to tsp/scripts/crawler.py 28/108728/3
Aleksander Mistewicz [Wed, 9 Nov 2016 13:16:28 +0000 (14:16 +0100)]
Add timestamp argument to tsp/scripts/crawler.py

Change-Id: I9a1c51c024ea0b58b0e76b17e604743a30782065
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMake TITS profile independent 27/108727/3
Aleksander Mistewicz [Mon, 7 Nov 2016 10:07:16 +0000 (11:07 +0100)]
Make TITS profile independent

Overall TITS adjustments

Change-Id: I8a9b1255a122efa50a8275a558c0bc01174ad4fa
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd sr2profile() to tsp/common.sh 25/108725/3
Aleksander Mistewicz [Wed, 30 Nov 2016 15:04:04 +0000 (16:04 +0100)]
Add sr2profile() to tsp/common.sh

Add sr2profile tests to test/tsp_common.bats

Change-Id: I8903012b22a6346ed2618bd242fc998a2228975c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd url2profile() to tsp/common.sh 23/108723/3
Aleksander Mistewicz [Wed, 30 Nov 2016 14:49:58 +0000 (15:49 +0100)]
Add url2profile() to tsp/common.sh

Add url2profile tests to test/tsp_common.bats

Change-Id: Ia0cd72a3abd859fa0af409867392d585cf49986c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd "No image" to tsp/results-values-result.sql 22/108722/3
Aleksander Mistewicz [Wed, 9 Nov 2016 13:58:16 +0000 (14:58 +0100)]
Add "No image" to tsp/results-values-result.sql

Database update is required. Delete it or run:
    . tsp/common.sh
    sqlite3 "${DBPATH}" -batch < tsp/results-values-result.sql

Change-Id: I43156ffbc66ac72077df8bc8c805403441d613c6

7 years agoMake crawler universal 20/108720/3
Aleksander Mistewicz [Fri, 4 Nov 2016 10:27:55 +0000 (11:27 +0100)]
Make crawler universal

Directories, where MD5SUMS files should be, are now detected by crawl.
If MD5SUMS file is missing prerelease will not be dispatched.
If image directory is missing, prerelease will be dispatched.

Change-Id: I98088af7073ba9a8708b084f6974cbea18d000cd
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoSet request timeout in download_all.py 19/108719/3
Aleksander Mistewicz [Fri, 4 Nov 2016 10:20:57 +0000 (11:20 +0100)]
Set request timeout in download_all.py

Change-Id: I95d135eeac2e8a10f2352f6d626b250aa2ddd75e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd --map argument to tsp/scripts/download_all.py 17/108717/3
Aleksander Mistewicz [Fri, 4 Nov 2016 10:05:36 +0000 (11:05 +0100)]
Add --map argument to tsp/scripts/download_all.py

Add tsp/image_map.example

Change-Id: Ic35154314076253696e20972835adb0e4d97a48b
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/scripts/download_all.py 16/108716/3
Aleksander Mistewicz [Fri, 4 Nov 2016 09:30:10 +0000 (10:30 +0100)]
Add tsp/scripts/download_all.py

Change-Id: I7125d71ac3be8607a97a5aeecdf6bca83667f8fa
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoReplace urllib2 with requests in crawler.py 98/95298/6
Aleksander Mistewicz [Wed, 19 Oct 2016 14:52:39 +0000 (16:52 +0200)]
Replace urllib2 with requests in crawler.py

It uses urllib3 connection pooling what dramatically increases
performance. Also changed link discovery to follow latest guide.

Package "python-requests" is now required.

Change-Id: Ide3e3c9dd290c2ce01137c00fa2f01cd29e35712
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd sync after screenshooter install 97/95297/6
Aleksander Mistewicz [Wed, 19 Oct 2016 10:23:24 +0000 (12:23 +0200)]
Add sync after screenshooter install

Change-Id: I00a5064b78e0008281bb57a9788eb337d5909e1c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove wait_ssh() to tct/conf/conf.sh 96/95296/6
Aleksander Mistewicz [Tue, 18 Oct 2016 14:15:47 +0000 (16:15 +0200)]
Move wait_ssh() to tct/conf/conf.sh

Change-Id: I55f0426b19a503ca998e711d350d5c4249381848
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoLink screenshot only if in a set of screenshotable 93/95293/6
Aleksander Mistewicz [Thu, 13 Oct 2016 13:55:21 +0000 (15:55 +0200)]
Link screenshot only if in a set of screenshotable

Change-Id: Ica1f8f443bf02ed4a6e9719df4a20a20b10b2147
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAlternate row colors in html results 92/95292/6
Aleksander Mistewicz [Thu, 13 Oct 2016 13:00:36 +0000 (15:00 +0200)]
Alternate row colors in html results

Change-Id: Ia95bc0578628bbd2da4eaee3c07b201983f326b4
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd artik target support 89/95289/5
Aleksander Mistewicz [Tue, 27 Sep 2016 16:03:23 +0000 (18:03 +0200)]
Add artik target support

Database update is required. Delete it or run:
    . tsp/common.sh
    sqlite3 "${DBPATH}" -batch < tsp/results-values-device.sql

Change-Id: I687cd0435ff0a9f5470a0cc5b9178e9b615ef44c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tct/artik_prepare_flash.sh 86/95286/5
Aleksander Mistewicz [Tue, 27 Sep 2016 15:58:45 +0000 (17:58 +0200)]
Add tct/artik_prepare_flash.sh

Change-Id: I1ecf8cf7fe257c2e015ebd631514833afecb494a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove wait_sdb() to tct/conf/conf.sh 85/95285/5
Aleksander Mistewicz [Mon, 10 Oct 2016 07:13:37 +0000 (09:13 +0200)]
Move wait_sdb() to tct/conf/conf.sh

Change-Id: I49afd4a22c6959f25f7e009ea36fbad589c9aa3e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd mbr64 target support 82/95282/5
Aleksander Mistewicz [Thu, 6 Oct 2016 14:48:19 +0000 (16:48 +0200)]
Add mbr64 target support

mbr64 is a minimal generic x86_64 image.

Database update is required. Delete it or run:
    . tsp/common.sh
    sqlite3 "${DBPATH}" -batch < tsp/results-values-device.sql

Change-Id: I7f4e45b0da4afa06d662c3a6a378076a933a3130
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd "--dry-run" argument to download_image.py 78/95278/5
Aleksander Mistewicz [Thu, 6 Oct 2016 14:14:06 +0000 (16:14 +0200)]
Add "--dry-run" argument to download_image.py

Images will not be downloaded and project.conf file not created.

Change-Id: Ibb5682b8167f273cc0adb1616afce87ca55efe60
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoSimplify tsp/scripts/download_image.py code 77/95277/5
Aleksander Mistewicz [Thu, 6 Oct 2016 14:07:03 +0000 (16:07 +0200)]
Simplify tsp/scripts/download_image.py code

It makes it easier to add support for new target devices.

Change-Id: I082686f3a55453677094b7a2559802a1bd0481d7
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd check, install to tct/run/common_test.py 76/95276/5
Aleksander Mistewicz [Tue, 27 Sep 2016 12:30:53 +0000 (14:30 +0200)]
Add check, install to tct/run/common_test.py

Change-Id: Ic7aac3d125e923d559bac7e4b1c3e68af9fa17d7
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd set_usb_mode to tct/prepare/prepare.sh 74/95274/5
Aleksander Mistewicz [Fri, 30 Sep 2016 10:26:34 +0000 (12:26 +0200)]
Add set_usb_mode to tct/prepare/prepare.sh

Prepare image with set_usb_mode()

Change-Id: I7b1109947512d7814ca9ba586824ff7d482dbd04
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix set operation in tsp/scripts/download_image.py 73/95273/5
Aleksander Mistewicz [Thu, 29 Sep 2016 16:16:37 +0000 (18:16 +0200)]
Fix set operation in tsp/scripts/download_image.py

Change-Id: I6afb5259018f14238880fce2ce9d15f0cb8c543c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd dyper functions to tct/flash/flash.sh 72/95272/5
Aleksander Mistewicz [Wed, 28 Sep 2016 13:38:16 +0000 (15:38 +0200)]
Add dyper functions to tct/flash/flash.sh

Change-Id: I300a5c6211c66184e0334f5b16ceae568691fd4f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd push to SSH and SDB in tct/run/common_test.py 71/95271/5
Aleksander Mistewicz [Tue, 27 Sep 2016 11:50:07 +0000 (13:50 +0200)]
Add push to SSH and SDB in tct/run/common_test.py

Change-Id: If08193b590ad9ba6728c32cd7105062f2d2ffa18
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd Screenshot to tct/run/common_test.py 69/95269/5
Aleksander Mistewicz [Mon, 26 Sep 2016 15:50:39 +0000 (17:50 +0200)]
Add Screenshot to tct/run/common_test.py

Add screenshot_test() to tct/run/common_test.py
Add screenshot test to tsp/common_test.yaml

Change-Id: I28b9945473ff744bcfe3d8336d5c3e43dfe6ee95
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd pull to SSH and SDB in tct/run/common_test.py 68/95268/5
Aleksander Mistewicz [Mon, 26 Sep 2016 15:29:41 +0000 (17:29 +0200)]
Add pull to SSH and SDB in tct/run/common_test.py

Change-Id: I5f549d1fa9dff3bcc075066521a3cd38f2335a1f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd screenshots to tests on odroid images 65/89465/6
Aleksander Mistewicz [Thu, 22 Sep 2016 09:31:06 +0000 (11:31 +0200)]
Add screenshots to tests on odroid images

Link to snapshot's screenshot is created and updated.
It will be used for comparison, eventually.

Change-Id: I16e70d1a1a746362ff7a43705ee722db608d930a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd destination argument to ssh_copy and sdb_copy 62/89462/5
Aleksander Mistewicz [Thu, 22 Sep 2016 09:18:02 +0000 (11:18 +0200)]
Add destination argument to ssh_copy and sdb_copy

It is optional and defaults to "/tmp/smoke.sh".

Change-Id: I74db36b9f0066925854fae3d0b4d9079bcfb2f6b
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFake EDID on odroid images 61/89461/5
Aleksander Mistewicz [Thu, 22 Sep 2016 09:03:28 +0000 (11:03 +0200)]
Fake EDID on odroid images

Add tct/prepare/hdmi_force.sh
Author of this script: Andrzej Hajda <a.hajda@samsung.com>
Any change to this file may break this hack.

Add install_hdmi_force to tct/prepare/prepare.sh

Change-Id: Ie08f234c2dc8c5f1973d64e933e10e371dbcadc6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoLink results only when available 02/88802/7
Aleksander Mistewicz [Tue, 20 Sep 2016 12:12:08 +0000 (14:12 +0200)]
Link results only when available

Change-Id: I20ef9afde0b1b27fe6c8b58b81f1eee3447a3e6c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoProvide more detailed status of SR 01/88801/7
Aleksander Mistewicz [Tue, 20 Sep 2016 11:40:29 +0000 (13:40 +0200)]
Provide more detailed status of SR

"In test queue" in tsp/jobs/img_test_common.sh,
"Testing" and "In test queue" in tsp/jobs/common_prep_flash_conf.sh,
"Downloading" in tsp/jobs/trigger_downloads.sh.

Database update is required. Delete it or run:
    . tsp/common.sh
    sqlite3 "${DBPATH}" -batch < tsp/results-values-result.sql

Change-Id: I84e39e32f5fc8099f8b8ad2d8c74fbda527e1a5f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove db insert into function in tsp/common.sh 99/88799/6
Aleksander Mistewicz [Tue, 20 Sep 2016 11:37:41 +0000 (13:37 +0200)]
Move db insert into function in tsp/common.sh

lockfile-progs is now required for tl-master.
Access to database is now serialized.

Change-Id: I5d8de1da372ab4437a9ab885cb3a61dd0ef33d86
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd sr conversions functions to tsp/common.sh 97/88797/6
Aleksander Mistewicz [Tue, 20 Sep 2016 11:28:41 +0000 (13:28 +0200)]
Add sr conversions functions to tsp/common.sh

Add project2sr() and url2sr() to tsp/common.sh
Add tests of url2sr function to test/tct_common.bats

Change-Id: Ib4ecc900f0791578ab13110a28e63d634234f86d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUpdate README 34/87834/7
Aleksander Mistewicz [Fri, 9 Sep 2016 09:24:18 +0000 (11:24 +0200)]
Update README

Change-Id: Idb42cdfee8c642ac9f157df3974b00b76d4f207a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove "run" section to separate file for minnow 32/87832/7
Aleksander Mistewicz [Fri, 9 Sep 2016 09:13:40 +0000 (11:13 +0200)]
Move "run" section to separate file for minnow

Change-Id: I56ed1b7142ea80397af7653131d7d89587a126e0
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoReplace part of minnow script by get_ip() 31/87831/7
Aleksander Mistewicz [Fri, 9 Sep 2016 09:08:13 +0000 (11:08 +0200)]
Replace part of minnow script by get_ip()

Move TL_IP_CONF to tct/common.sh

Change-Id: I3b78a20e95e237e402da56e3cb053d505f356e41
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove "run" section to separate file for odroid 30/87830/7
Aleksander Mistewicz [Fri, 9 Sep 2016 08:57:57 +0000 (10:57 +0200)]
Move "run" section to separate file for odroid

Change-Id: Ia905a23c3975cde0cfadea484db39b1816c711e0
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/start.sh 70/87370/7
Aleksander Mistewicz [Wed, 7 Sep 2016 11:24:24 +0000 (13:24 +0200)]
Add tsp/start.sh

It is counterpart to tsp/stop.sh.
It installs cronfile and starts SDB server.

Change-Id: Ib1344e4887c426d16ef37e312153705fc34f3a6e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoShow journal entries with error priority 69/87369/7
Aleksander Mistewicz [Wed, 7 Sep 2016 09:31:18 +0000 (11:31 +0200)]
Show journal entries with error priority

Change affects smoke tests only.

Change-Id: I95d9729b471c59d709e6eaa4a610a80cf68fe9eb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd user session listing to smoke_tests.sh 12/85712/8
Aleksander Mistewicz [Fri, 26 Aug 2016 10:46:00 +0000 (12:46 +0200)]
Add user session listing to smoke_tests.sh

Change-Id: I88521ff482b619dac3a15727b3dad63191cf3c0c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd avocado services in "activating" state test 11/85711/8
Aleksander Mistewicz [Thu, 25 Aug 2016 13:19:00 +0000 (15:19 +0200)]
Add avocado services in "activating" state test

systemctl_test takes additional optional argument - state.
Default value is 'failed'.

Change-Id: Ie244a15f952f0fcde916899ceadf55eab70a284f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd listing of services in "activating" state 10/85710/7
Aleksander Mistewicz [Thu, 25 Aug 2016 13:08:56 +0000 (15:08 +0200)]
Add listing of services in "activating" state

Some services are being restarted before they fail.
There are two solutions:
 * wait until all services activate or fail
 * list services that are activating

2nd is used until 1st is being developed.

Change-Id: Ib60e28ac057d38fa97aea10d42c28410efc2972e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUse build_nr for label of download_image.py job 09/85709/7
Aleksander Mistewicz [Thu, 25 Aug 2016 10:40:43 +0000 (12:40 +0200)]
Use build_nr for label of download_image.py job

All required information is available in command line arguments.
tsp/scripts/download_image.py was the only one missing build_nr
and therefore confusing users searching for it.

Change-Id: I4da02f4fc567b22bf23d4794c75cfdf75d16d080
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoRun crawler.py in trigger_downloads.sh 08/85708/7
Aleksander Mistewicz [Thu, 25 Aug 2016 10:21:57 +0000 (12:21 +0200)]
Run crawler.py in trigger_downloads.sh

tsp/jobs/watcher.sh is now a simple script. There are only
two jobs dispatched: one for snapshots and the other for prereleases.
Output of crawler and resulting url processing is in the same logfile.

Change-Id: I42ed6146c098695508e911d83c68d93b1e51f1bb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUnify workdir manipulation 07/85707/7
Aleksander Mistewicz [Thu, 25 Aug 2016 09:40:57 +0000 (11:40 +0200)]
Unify workdir manipulation

CWD is changed at tsp/jobs/common_prep_flash_conf.sh start
as it is in other scripts.

Change-Id: I1a97b5f3397195ed56567467bf78337502f3cce6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoForce crash-worker to create reports 47/85247/8
Aleksander Mistewicz [Tue, 23 Aug 2016 11:33:30 +0000 (13:33 +0200)]
Force crash-worker to create reports

It takes undefined amount of time for dump_systemstate to gather dlog
messages. Therefore Avocado test results were uncomparable.

Killing the process causes the script crash-manager.sh to create
the report (tar archive). dump_systemstate return value is ignored.

Change-Id: I978ea523e4925a15591233e12dd65c446958af18
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAssign 'Status' based on Avocado test results 05/83905/11
Aleksander Mistewicz [Fri, 12 Aug 2016 12:12:04 +0000 (14:12 +0200)]
Assign 'Status' based on Avocado test results

Change-Id: I36c5eb870da5353b08a1903b2741a920cc9b403d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUpdate README 67/79767/17
Aleksander Mistewicz [Tue, 12 Jul 2016 10:38:34 +0000 (12:38 +0200)]
Update README

Change-Id: I9c62cb70e8ab5e8491882e2c6e9704e5738669e1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/scripts/publish_cmp.py 04/83904/11
Aleksander Mistewicz [Fri, 12 Aug 2016 11:05:09 +0000 (13:05 +0200)]
Add tsp/scripts/publish_cmp.py

"Unclear" is printed in case:
 * number of tests run is different
 * prerelease's result is not 'PASS', but snapshot's is
"OK" is printed otherwise.

Change-Id: Ic01e7652808f62e5d3c63925d1ea4326a2eeef2c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd avocado to results 02/83902/11
Aleksander Mistewicz [Thu, 11 Aug 2016 09:29:45 +0000 (11:29 +0200)]
Add avocado to results

Change-Id: I9c2bf74874bc59f4bb10e2151cac02f70d5c89a1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUnify odroid and minnow sleep values 40/84440/9
Aleksander Mistewicz [Mon, 22 Aug 2016 09:22:56 +0000 (11:22 +0200)]
Unify odroid and minnow sleep values

Sleep values are now stored in: tct/common.sh
Test results are now comparable.

Change-Id: I32b08ae0b959b01d417665e8b0c487d09917d4f4
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFollow crash-worker path change 46/85246/8
Aleksander Mistewicz [Mon, 22 Aug 2016 09:21:52 +0000 (11:21 +0200)]
Follow crash-worker path change

Change path "/opt/share/crash" to "/opt/usr/share/crash".

Change-Id: I6d8480a61912aabc2acbdc7a37b1275b1954594a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoDispatch publish job before retrigger 39/84439/9
Aleksander Mistewicz [Thu, 18 Aug 2016 12:43:37 +0000 (14:43 +0200)]
Dispatch publish job before retrigger

If failure occured job was retriggered until FAIL_CNT was exceeded at
the start what created jobs that only triggered publishing of failure.

Raise FAIL_CNT max value to 2.

Change-Id: I3772ba293f0749b8a2b1d4c436c5c36e0d68c1fb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoRemove unused variable FAIL_CNT 38/84438/9
Aleksander Mistewicz [Thu, 18 Aug 2016 12:42:36 +0000 (14:42 +0200)]
Remove unused variable FAIL_CNT

Change-Id: Ib257fd31f2d7e7988479e0e56d90a988d62a9418
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoRun Avocado tests on odroid and minnow 01/83901/11
Aleksander Mistewicz [Thu, 18 Aug 2016 12:36:47 +0000 (14:36 +0200)]
Run Avocado tests on odroid and minnow

Change-Id: I438d266802b9d9b29e4dd3f7314f3ec1f5776fca
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd run_avocado_sdb() to tct/run/run.sh 36/84436/9
Aleksander Mistewicz [Thu, 18 Aug 2016 12:32:48 +0000 (14:32 +0200)]
Add run_avocado_sdb() to tct/run/run.sh

Change-Id: I656c7302ed5fbf79b277890920b9d93b897eeb9d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd run_avocado_ssh() to tct/run/run.sh 00/83900/10
Aleksander Mistewicz [Thu, 18 Aug 2016 12:31:26 +0000 (14:31 +0200)]
Add run_avocado_ssh() to tct/run/run.sh

Change-Id: Id3ede4bad3079cb95404a5f733dcc67b62fb087d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/common_test.yaml.example 37/84437/8
Aleksander Mistewicz [Thu, 18 Aug 2016 12:58:02 +0000 (14:58 +0200)]
Add tsp/common_test.yaml.example

Run: avocado run tct/run/common_test.py \
    --multiplex tsp/common_test.yaml.example

Change-Id: Ie90e774e410626ccfca33ab262f85e5bd71b59ec
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd SDB support to tct/run/common_test.py 99/83899/10
Aleksander Mistewicz [Wed, 10 Aug 2016 09:06:34 +0000 (11:06 +0200)]
Add SDB support to tct/run/common_test.py

Change-Id: Ic5a135a2763762cacbd0d756e1dea077d545204d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd avocado testscript: tct/run/common_test.py 98/83898/10
Aleksander Mistewicz [Tue, 2 Aug 2016 15:05:41 +0000 (17:05 +0200)]
Add avocado testscript: tct/run/common_test.py

Change-Id: I2d0bb33c99a2672175fd06ccc19bd0720ebde1d2
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoPreserve SSH session between calls 97/83897/10
Aleksander Mistewicz [Tue, 2 Aug 2016 14:27:19 +0000 (16:27 +0200)]
Preserve SSH session between calls

Connection time to DUT averages to 28s.
After first call each subsequent is near instant.

Change-Id: I4fe50406fec06a7468d0e904295a4f7669803b2d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUse WS instead of / in tsp/jobs/watch_diskspace.sh 96/83896/10
Aleksander Mistewicz [Mon, 1 Aug 2016 07:46:07 +0000 (09:46 +0200)]
Use WS instead of / in tsp/jobs/watch_diskspace.sh

Manual configuration was required for this script to use proper value.
Now it gets it automatically.

Change-Id: Icd0881ba05bafe120387f159fbb29c5c604d8a27
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix build_nr in tsp/jobs/trigger_downloads.sh 98/82098/11
Aleksander Mistewicz [Fri, 29 Jul 2016 09:21:02 +0000 (11:21 +0200)]
Fix build_nr in tsp/jobs/trigger_downloads.sh

If a url is present in tsmaster queue $i value will be changed
to last killed task's number or simply undefined value.

Rename $i to $next
Add update_next() which checks if write to a file was successful.
Append to unique_dispatch instead of overwrite.

Change-Id: Ib49c248a0f756a090c2408a7ae60be76dccd707a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd artik support to tsp/scripts/download_image.py 34/81834/12
Aleksander Mistewicz [Thu, 28 Jul 2016 11:35:16 +0000 (13:35 +0200)]
Add artik support to tsp/scripts/download_image.py

Supported target configurations:
 * odroid, minnow32, minnow64 (unchanged)
 * headless-artik5, artik5, headless-artik10, artik10 (new)

Change-Id: Idf46f15e633fab34ed8bd9de71934ac2fd3293b8
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoNew version of tsp/scripts/download_image.py 33/81833/12
Aleksander Mistewicz [Thu, 28 Jul 2016 10:29:46 +0000 (12:29 +0200)]
New version of tsp/scripts/download_image.py

It breaks backward-compatibility with arguments and results.
TSP scripts are adjusted.

Supported target configurations (unchanged): odroid, minnow32, minnow64

Changes:
 * now uses target name for project-$target.conf and diff-$target.report
 * old arguments are replaced by one "-t TARGET"

Change-Id: I0d503717c09073d72cb742fcc024247ec807896a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix issues reported by ShellCheck in tct 32/81832/12
Aleksander Mistewicz [Fri, 26 Aug 2016 14:45:31 +0000 (16:45 +0200)]
Fix issues reported by ShellCheck in tct

ShellCheck: https://github.com/koalaman/shellcheck

Command below should not print anything.
shellcheck -e SC2164,SC1090,SC2148,SC2010,SC2155,SC2024,SC2086,SC2044 \
    $(find tct -name "*.sh")

Change-Id: I30d7db0bdd1370d8010b8adbea76bf65f2e07373
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix issues reported by ShellCheck in tsp 31/81831/12
Aleksander Mistewicz [Fri, 26 Aug 2016 14:43:02 +0000 (16:43 +0200)]
Fix issues reported by ShellCheck in tsp

Move check_diff() to tsp/jobs/img_test_common.sh
Add newline at the end of 'modifed_paths' in tsp/scripts/crawler.py
so that whole lines instead of words can be read.

ShellCheck: https://github.com/koalaman/shellcheck
shellcheck -e SC1090,SC2155,SC2068,SC2145,SC2164 `find tsp -name "*.sh"`

output should report following problems only:
    tsp/common.sh: SC2148, SC2034, SC2139
    tsp/jobs/trigger_downloads.sh: SC2115
    tsp/jobs/common_prep_flash_conf.sh: SC2029
    tsp/jobs/publish.sh: SC2046, SC2029

Change-Id: I7791769a0d653c784715cdd1a8b1446fafcba1e9
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd test/tct_prepare.bats 92/79692/18
Aleksander Mistewicz [Tue, 12 Jul 2016 09:49:57 +0000 (11:49 +0200)]
Add test/tct_prepare.bats

mkfs.ext4 is required.
It does not check error paths.

Change-Id: I54477a575350d9c70d8413a9243a72d3fa27e25c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd test/tct_sdmux.bats 91/79691/18
Aleksander Mistewicz [Tue, 12 Jul 2016 08:44:40 +0000 (10:44 +0200)]
Add test/tct_sdmux.bats

Exactly one sdmux device should be connected during these tests.

Change-Id: I48c098cc02416e52067fe5b2bfe23da5e9c78463
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd test/tct_common.bats 89/79689/18
Aleksander Mistewicz [Mon, 11 Jul 2016 14:51:21 +0000 (16:51 +0200)]
Add test/tct_common.bats

Change-Id: I80c9ae848873742a0521e6c4aa29c8f8d138bb69
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd test/resource_locking.py.bats 66/79766/15
Aleksander Mistewicz [Tue, 12 Jul 2016 16:31:35 +0000 (18:31 +0200)]
Add test/resource_locking.py.bats

Change-Id: I7ea1e13702ea17488da6c2c0424db1283d7f4db2
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/stop.sh 15/81515/13
Aleksander Mistewicz [Tue, 26 Jul 2016 12:45:20 +0000 (14:45 +0200)]
Add tsp/stop.sh

To stop TITS run:
    ./tsp/stop.sh

Steps are:
    * remove crontab
    * save currently dispatched urls
    * for tsmaster, tspoll, tspwb:
    ** remove queued jobs
    ** kill running jobs
    ** kill the server
    * for tsrun_target queues:
    ** remove queued jobs
    ** wait for running jobs
    ** kill the server

To start TITS run:
    crontab tsp/cronfile.example

Change-Id: I051a9ddcec0093c1fae3888ec9a9b438b73f5bb3
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/tsp-sudoer 14/81514/12
Aleksander Mistewicz [Tue, 26 Jul 2016 10:52:11 +0000 (12:52 +0200)]
Add tsp/tsp-sudoer

Syntax error in any file used by sudo will break it.
Always check it as in example below:
    visudo -c -f tsp/tsp-sudoer

Change-Id: Icb7978c31370924d1f1928a711de86283022aa4c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoDo not run sshpass and sd-mux-ctrl as root 30/81830/10
Aleksander Mistewicz [Thu, 28 Jul 2016 12:42:05 +0000 (14:42 +0200)]
Do not run sshpass and sd-mux-ctrl as root

When using sshpass in a container special privileges were required.
It is no longer the case as TITS should run bare metal.

User should be member of 'plugdev' group.

Change-Id: I785c262dae9d78bc0b07759ba6e29df1fe744adc
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoCheck for ssh errors in common_prep_flash_conf.sh 13/81513/9
Aleksander Mistewicz [Tue, 26 Jul 2016 10:31:17 +0000 (12:31 +0200)]
Check for ssh errors in common_prep_flash_conf.sh

Change-Id: I3850233b5459d5d4bf075cdad37f94020ca7641c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUpdate tsp/scripts/free_diskspace.sh 39/81339/10
Aleksander Mistewicz [Mon, 25 Jul 2016 09:36:44 +0000 (11:36 +0200)]
Update tsp/scripts/free_diskspace.sh

Only directories, modified at least 2 days ago, in WS_DOWNLOAD
are processed. All non-snapshot directories are verbosely removed.

Change-Id: Ibabb7d874e1e75453c8f348725b99346007e1908
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoReplace sqlite3 html output with python script 38/81338/9
Aleksander Mistewicz [Mon, 25 Jul 2016 08:31:23 +0000 (10:31 +0200)]
Replace sqlite3 html output with python script

Change-Id: I137be0324c7b783c191e8e6abdc8a83139a80777
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tsp/scripts/publish.py 37/81337/9
Aleksander Mistewicz [Fri, 22 Jul 2016 15:42:40 +0000 (17:42 +0200)]
Add tsp/scripts/publish.py

This script requires jinja2 templating library.

Change-Id: Icd30ab726bc98a7e6556363c4a3bf8eccbdfa7a7
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd "tbuildnr" field to results.db3 36/81336/8
Aleksander Mistewicz [Fri, 22 Jul 2016 13:53:23 +0000 (15:53 +0200)]
Add "tbuildnr" field to results.db3

Previous database should be removed or updated as below:
    . tsp/common.sh
    sqlite3 "${DBPATH}" "ALTER TABLE test ADD COLUMN tbuildnr INTEGER;"

View must be dropped and redefined:
    sqlite3 "${DBPATH}" "DROP VIEW currentstatus;"
    sqlite3 "${DBPATH}" -batch < tsp/results-schema.sql

Change-Id: Ic04a2c050468064ed3c9b8ac0ab3db4af075cbc1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoPublish database content in WWW_PUBLISH file 35/81335/8
Aleksander Mistewicz [Fri, 22 Jul 2016 10:02:57 +0000 (12:02 +0200)]
Publish database content in WWW_PUBLISH file

Change-Id: Ic8f05d856b5001eb4ffe83f76c9f6a30ae79da11
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoStore results in sqlite3 database 34/81334/8
Aleksander Mistewicz [Fri, 22 Jul 2016 09:45:22 +0000 (11:45 +0200)]
Store results in sqlite3 database

Additional argument, $TARGET, is required for tsp/jobs/publish.sh

Change-Id: Iab5728c40e4786425c26dd48e7a70d6221dc90ae
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd schema and initial values for sqlite3 db 33/81333/7
Aleksander Mistewicz [Fri, 22 Jul 2016 09:43:26 +0000 (11:43 +0200)]
Add schema and initial values for sqlite3 db

tsp/results-schema.sql contains basic table definitions
of device, result, test and "currentstatus" view.

Change-Id: I53c5a7e5d744aba07500ef5492c490368692cb44
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoCompare result with snapshot and assign proper tag 32/81332/7
Aleksander Mistewicz [Thu, 21 Jul 2016 10:00:24 +0000 (12:00 +0200)]
Compare result with snapshot and assign proper tag

Tag is from set: OK, Identical, Snapshot, Unclear, Fail

Change-Id: Ieac636e4b4d00aa21ec86253beb4e7cc38694ec3
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoDump variable name and value to sysctl.result file 31/81331/7
Aleksander Mistewicz [Thu, 21 Jul 2016 08:49:18 +0000 (10:49 +0200)]
Dump variable name and value to sysctl.result file

tct/run/smoke_tests.sh produces some numerical output. This patch makes
it easy to store and retreive values as in line below:
    awk -v KEY="${KEY}" '$1 == KEY {print $2}' $DICT
where $KEY is variable name and $DICT is sysctl.result file.

Change-Id: I3eee61152a189ad443fa641f5160f516567506f1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoSet TS_SLOTS for every queue 30/81330/5
Aleksander Mistewicz [Thu, 21 Jul 2016 07:27:50 +0000 (09:27 +0200)]
Set TS_SLOTS for every queue

Change-Id: I4e1a7e5964985957e34ad151c031c982cd814219
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoUpdate md5sums logic in tsp/scripts/crawler.py 15/79915/5
Aleksander Mistewicz [Wed, 13 Jul 2016 10:05:20 +0000 (12:05 +0200)]
Update md5sums logic in tsp/scripts/crawler.py

If any of the md5sums_url is missing (http error code 404 was returned)
from md5sums_urls list then it will be skipped and not dispatched.
It saves http requests so that it won't timeout if the server is busy.

For url to be added to dispatched_urls it must:
 * have every md5sums_url from md5sums_urls list available
   (no 404 error returned)
 * have any of the md5sums_urls modified since last timestamp

Change-Id: Ie790f1039e91003b0da85c19d7db11ac160007da
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoFix missing mountpoint directory in mount_image() 93/79693/8
Aleksander Mistewicz [Tue, 12 Jul 2016 09:50:57 +0000 (11:50 +0200)]
Fix missing mountpoint directory in mount_image()

Remove redundant mkdirs from tct/odroid_prepare_flash_conf.sh

Change-Id: I6da51ef4b7e82debf66eea88570b7e997bf7855a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoLog every finished job to /tmp/testlab.log 88/79688/8
Aleksander Mistewicz [Fri, 8 Jul 2016 12:52:09 +0000 (14:52 +0200)]
Log every finished job to /tmp/testlab.log

Add quiet param to wget in tsp/scripts/download_image.py
Add tsp/scripts/log.sh which writes all its params to /tmp/testlab.log
Add env variable in tsp/common.sh: TS_ONFINISH if TSP_DIR is set

Change-Id: I87510f3fe73dc20d1842075cdf77186b8d298581
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoUse TMPDIR instead of TS_SOCKET in tsp/common.sh 87/79687/7
Aleksander Mistewicz [Fri, 8 Jul 2016 10:14:37 +0000 (12:14 +0200)]
Use TMPDIR instead of TS_SOCKET in tsp/common.sh

Usage of patched version of tsp is advised, but not necessary.

In unpatched version output file is stored in "/tmp" directory
regardless of TMPDIR value.

Change-Id: If03cff1b83c3e4762efc82ff93a439e8b52e09f2
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoWrite new timestamp at the end in crawl.py 15/79015/10
Aleksander Mistewicz [Thu, 7 Jul 2016 12:18:51 +0000 (14:18 +0200)]
Write new timestamp at the end in crawl.py

If a timeout occurs during a crawl an old timestamp will be preserved.

Change-Id: Ibae158baa1a8c8fbe09397225b312d29d44e715c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoUse logging in tsp/scripts/crawler.py 14/79014/10
Aleksander Mistewicz [Thu, 7 Jul 2016 12:09:06 +0000 (14:09 +0200)]
Use logging in tsp/scripts/crawler.py

Change-Id: Ie18cfe89cc4c7149ba0f53b6227d1e0d1dd818bc
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoReplace env variable with argparse in crawler.py 13/79013/10
Aleksander Mistewicz [Thu, 7 Jul 2016 11:51:40 +0000 (13:51 +0200)]
Replace env variable with argparse in crawler.py

Change-Id: I4a299d124df4692670d46726177073980aefdc88
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd timeout to remote script run and watcher 12/79012/10
Aleksander Mistewicz [Thu, 7 Jul 2016 09:41:38 +0000 (11:41 +0200)]
Add timeout to remote script run and watcher

Change-Id: I6713f6bbfba3aecf6108e01f21de709f3eadd0be
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd timeout to copy_ssh and run_smoke_ssh 11/79011/10
Aleksander Mistewicz [Thu, 7 Jul 2016 09:36:31 +0000 (11:36 +0200)]
Add timeout to copy_ssh and run_smoke_ssh

Change-Id: I64e6f8643cda4e89b5b35b0d472fb548ec3320c8
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoRemove magic HOLDOFF number in resource_locking.py 64/91464/1
Aleksander Mistewicz [Fri, 7 Oct 2016 15:26:24 +0000 (17:26 +0200)]
Remove magic HOLDOFF number in resource_locking.py

Change-Id: I56cf4cadb695bc12b5494f4fab404ab8905af733
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoRemove magic INC number in resource_locking.py 63/91463/1
Aleksander Mistewicz [Fri, 7 Oct 2016 15:21:21 +0000 (17:21 +0200)]
Remove magic INC number in resource_locking.py

Change-Id: I25ada81e4f2224f8ec23d43c960ff435ad201397
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoCheck for UUID files in tct/resource_locking.py 65/79765/7
Aleksander Mistewicz [Tue, 12 Jul 2016 16:17:03 +0000 (18:17 +0200)]
Check for UUID files in tct/resource_locking.py

Change-Id: Ib593cf3958392807d05d6c07cecb27c93024f581
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoUse new version of tct/resource_locking script 64/79764/7
Aleksander Mistewicz [Tue, 12 Jul 2016 16:09:35 +0000 (18:09 +0200)]
Use new version of tct/resource_locking script

Change-Id: Ie684ba0aecf2f6ab76da3a9a95560d29c6c4c549
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd "--unlockfailed" to tct/resource_locking.py 63/79763/6
Aleksander Mistewicz [Tue, 12 Jul 2016 16:04:49 +0000 (18:04 +0200)]
Add "--unlockfailed" to tct/resource_locking.py

Change-Id: I6c00f39d69fcf617c0dcbfb266335c5b44a29604
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>