tools/testlab/major.git
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agoAdd count files to tct/resource_locking.py 62/79762/6
Aleksander Mistewicz [Tue, 12 Jul 2016 15:59:56 +0000 (17:59 +0200)]
Add count files to tct/resource_locking.py

Change-Id: Ie06d890490a66616d909f7953c04e3c86df62a95
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd "--retrylock" to tct/resource_locking.py 61/79761/6
Aleksander Mistewicz [Tue, 12 Jul 2016 14:56:28 +0000 (16:56 +0200)]
Add "--retrylock" to tct/resource_locking.py

Change-Id: I9445f87d19db642c14487c8bde11b48764f1656e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd "--unlock" to tct/resource_locking.py 60/79760/6
Aleksander Mistewicz [Tue, 12 Jul 2016 14:36:20 +0000 (16:36 +0200)]
Add "--unlock" to tct/resource_locking.py

Change-Id: Ib7f21dab314eca65a7ee4a0c85a66f0cce02af05
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd "--lock" to tct/resource_locking.py 50/90150/2
Aleksander Mistewicz [Mon, 26 Sep 2016 12:36:31 +0000 (14:36 +0200)]
Add "--lock" to tct/resource_locking.py

"target" argument is now mandatory.

Change-Id: I6dbcd586da1320ee1ee20f131e8290c4e06fdb13
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tct/resource_locking.py 59/79759/4
Aleksander Mistewicz [Tue, 12 Jul 2016 14:26:19 +0000 (16:26 +0200)]
Add tct/resource_locking.py

Change-Id: I8420edfdc606544bbc41bee93cd314d39e8048b1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoSwitch off a DUT after running smoke tests 57/76357/8
Aleksander Mistewicz [Thu, 23 Jun 2016 11:36:55 +0000 (13:36 +0200)]
Switch off a DUT after running smoke tests

Running Tizen images dramatically reduces sdcard lifetime.

Change-Id: I01ba0d05cce99800bb769d52fa823f39bbe4b9bc
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoClean workspace before use 77/75777/9
Aleksander Mistewicz [Tue, 21 Jun 2016 09:40:12 +0000 (11:40 +0200)]
Clean workspace before use

Change-Id: I736434bdf5ea48a0daa8b730f2610181e501efbe
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd error handling to change_uuid() 76/75776/9
Aleksander Mistewicz [Wed, 15 Jun 2016 09:24:50 +0000 (11:24 +0200)]
Add error handling to change_uuid()

Change-Id: I51f06e0a797018e230861421b5aa16d8740a3f21
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoExit script on flash_dd or bmaptool fail 99/74699/10
Aleksander Mistewicz [Tue, 14 Jun 2016 15:48:06 +0000 (17:48 +0200)]
Exit script on flash_dd or bmaptool fail

Change-Id: I4c7d230df8719c708b5600266acad8c9c1bcf6cc
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd information about image number and date 07/74307/13
Aleksander Mistewicz [Thu, 9 Jun 2016 12:59:26 +0000 (14:59 +0200)]
Add information about image number and date

Change-Id: I5924d839f6d291cc9d47e0b289731d6ddfe76ae3
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoChange target naming convention, remove symlinks 06/74306/13
Aleksander Mistewicz [Thu, 9 Jun 2016 12:46:44 +0000 (14:46 +0200)]
Change target naming convention, remove symlinks

Move information from filename (argument $0) to a line parameter.
With introduction of testing path of 64-bit images for Minnowboards it
was easier to use single name for all operations (downloading, testing).

Currently supported target configurations:
 * odroid: arm-wayland (common-boot-armv7l-odroidu3,
   common-wayland-3parts-armv7l-odroidu3)
 * minnow32: ia32-wayland (common-wayland-efi-i586)
 * minnow64: x86_64-wayland (common-wayland-efi-x86_64)

Change-Id: I5c882a14d0ff4345376a477fd363ca0b6451f708
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoModify tsp behaviour to comply with OBS changes 83/73783/14
Aleksander Mistewicz [Thu, 9 Jun 2016 09:44:57 +0000 (11:44 +0200)]
Modify tsp behaviour to comply with OBS changes

Use filenames that won't confuse future developer

Change-Id: I3c0928045ab169b20333c94f762d6be64f58a17c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoMove all workspaces' paths to tsp/common.sh 96/72596/13
Aleksander Mistewicz [Wed, 1 Jun 2016 17:00:16 +0000 (19:00 +0200)]
Move all workspaces' paths to tsp/common.sh

Change-Id: I5539cd6852c9e051467e923bf8520ca49e1d4c42
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd ConnectTimeout to tct/conf/ssh_config 50/71250/14
Aleksander Mistewicz [Tue, 24 May 2016 14:50:36 +0000 (16:50 +0200)]
Add ConnectTimeout to tct/conf/ssh_config

Change-Id: Ic7b0b03b9cfe56fc5464696c421f42445ab44ffd
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUse logging library in download_image.py 51/71251/13
Aleksander Mistewicz [Tue, 24 May 2016 15:54:00 +0000 (17:54 +0200)]
Use logging library in download_image.py

Change-Id: Ia9f5bd323a8293a5b8ea2592cb7099c6e5c58bcb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd more tests to tct/run/smoke_tests.sh 49/71249/14
Aleksander Mistewicz [Mon, 23 May 2016 13:42:09 +0000 (15:42 +0200)]
Add more tests to tct/run/smoke_tests.sh

Change-Id: I19d994cdc074d39d830acf1032b0997749f62bb0
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoOmit snapshots in tsp/scripts/free_diskspace.sh 48/71248/14
Aleksander Mistewicz [Mon, 23 May 2016 12:34:21 +0000 (14:34 +0200)]
Omit snapshots in tsp/scripts/free_diskspace.sh

Change-Id: I896826e27b71b617c42bb8fc3a3cca30f40d7c4b
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd arch arg to download_image.py 25/69725/17
Aleksander Mistewicz [Fri, 13 May 2016 11:58:40 +0000 (13:58 +0200)]
Add arch arg to download_image.py

Change-Id: I4cf908205b9dcbd242d2df4405c3aaade6f120eb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoDownload and test snapshots 23/69723/17
Aleksander Mistewicz [Tue, 10 May 2016 14:24:25 +0000 (16:24 +0200)]
Download and test snapshots

Change-Id: I319dad8aef8432502b7d4ff009ee4af3abf01290
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix snapshot linking bug in tsp/scripts/publish.sh 24/69724/17
Aleksander Mistewicz [Thu, 12 May 2016 11:15:56 +0000 (13:15 +0200)]
Fix snapshot linking bug in tsp/scripts/publish.sh

If the results for a prerelease had been published before the results
for the snapshot were, then the page of the results wouldn't have been
linked to the main site.

Change-Id: Ie0d625a60ee283eed8783a4df46e8857ae921b33
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoUse ImageVersion class in download_image.py 95/76395/4
Aleksander Mistewicz [Thu, 23 Jun 2016 15:31:19 +0000 (17:31 +0200)]
Use ImageVersion class in download_image.py

It replaces ImageDownloader.extract_nr()

Change-Id: Ie7f0dd85dff387daf1774dcb067b3245b6ba21cf
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd version representation for downloaded images 78/76078/4
Pawel Wieczorek [Thu, 16 Jun 2016 11:41:46 +0000 (13:41 +0200)]
Add version representation for downloaded images

This patch introduces ImageVersion class. It can replace calls to
ImageDownloader.extract_nr() and is suitable for both prerelease and
snapshot images.

Change-Id: If6b32309c1b87d1ad2b7c62ca0246dcb0ff3dc47

7 years agoAdd tsp/jobs/watch_diskspace.sh 21/69721/13
Aleksander Mistewicz [Fri, 6 May 2016 09:29:57 +0000 (11:29 +0200)]
Add tsp/jobs/watch_diskspace.sh

Change-Id: Ifeaf25b5a4b06ef7ee19704ac42c682fb4fe96a3
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/scripts/free_diskspace.sh 20/69720/12
Aleksander Mistewicz [Fri, 6 May 2016 09:22:49 +0000 (11:22 +0200)]
Add tsp/scripts/free_diskspace.sh

Change-Id: Iae5463f09e9c20d118c456ee4c7b85fc6ae1da86
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/cronfile.example 17/69717/12
Aleksander Mistewicz [Thu, 5 May 2016 10:57:16 +0000 (12:57 +0200)]
Add tsp/cronfile.example

Change-Id: If6002345951db5b38e78dd54c14ca2e9c937419a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/jobs/img_test_common.sh 16/69716/12
Aleksander Mistewicz [Thu, 5 May 2016 10:00:17 +0000 (12:00 +0200)]
Add tsp/jobs/img_test_common.sh

Change-Id: Id01f48f4135e5fddf64a2ef873a2cfc2949438fc
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/jobs/common_prep_flash_conf.sh 46/71246/9
Aleksander Mistewicz [Thu, 5 May 2016 09:59:37 +0000 (11:59 +0200)]
Add tsp/jobs/common_prep_flash_conf.sh

Change-Id: I3f50c72a8f5b4ea2943828109fd6defa5114f3ca
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoFix sdb/ssh DUT detection after naming change 84/73784/7
Aleksander Mistewicz [Thu, 9 Jun 2016 09:55:11 +0000 (11:55 +0200)]
Fix sdb/ssh DUT detection after naming change

Change-Id: I3ce4063f8cb4e66ee733d483998488ea5088c8b6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/scripts/common_prep_flash_conf.sh 47/71247/9
Aleksander Mistewicz [Thu, 5 May 2016 09:40:51 +0000 (11:40 +0200)]
Add tsp/scripts/common_prep_flash_conf.sh

Change-Id: I3ea52b256b8b1017ba0cc0b9bea2bd8d5a519815
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/jobs/publish.sh 13/69713/8
Aleksander Mistewicz [Thu, 5 May 2016 09:30:21 +0000 (11:30 +0200)]
Add tsp/jobs/publish.sh

Change-Id: I2ac06a687340fc32ff3f6b17686fbdd0fffe13ec
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd pywikibot publisher script 12/69712/8
Pawel Wieczorek [Mon, 13 Jun 2016 10:02:36 +0000 (12:02 +0200)]
Add pywikibot publisher script

Change-Id: I375328341813199ea15db86a8cef33a97da05a12

7 years agoAdd tsp/jobs/trigger_downloads.sh 11/69711/7
Aleksander Mistewicz [Wed, 4 May 2016 14:52:34 +0000 (16:52 +0200)]
Add tsp/jobs/trigger_downloads.sh

Change-Id: Ib00404de0231d67f6dba4c1fb6b06014b3bca8c6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd function to create project.conf 10/69710/7
Aleksander Mistewicz [Wed, 4 May 2016 14:27:18 +0000 (16:27 +0200)]
Add function to create project.conf

Change-Id: I783eb585cf9cc593237c8c4c747ffa4072668fa9
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/scripts/download_image.py 09/69709/5
Aleksander Mistewicz [Fri, 29 Apr 2016 17:03:32 +0000 (19:03 +0200)]
Add tsp/scripts/download_image.py

Change-Id: I6dabcf96d84eb5bc01ae653d963af7a78023d44f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd tsp/jobs/prerelease_watcher.sh 08/69708/5
Aleksander Mistewicz [Thu, 28 Apr 2016 16:23:41 +0000 (18:23 +0200)]
Add tsp/jobs/prerelease_watcher.sh

Add entry for tspoll to common.sh file.

Change-Id: Ia9b92a8935db5cd08e1f81a2baab9dcde3ab0840
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
7 years agoAdd prerelease crawler script 07/69707/4
Pawel Wieczorek [Mon, 13 Jun 2016 09:46:38 +0000 (11:46 +0200)]
Add prerelease crawler script

This patch introduces script for obtaining information about new
prerelease projects. Root for crawling is taken from 'ROOT'
environment variable. If it is not set, script will fallback to:
"http://download.tizen.org/prerelease/tizen/common/".

Change-Id: I363332fcf3f24cc81ac81d56af0f0204788653ab

8 years agoCopy common.sh from tct directory to tsp 06/69706/3
Aleksander Mistewicz [Thu, 28 Apr 2016 15:59:26 +0000 (17:59 +0200)]
Copy common.sh from tct directory to tsp

Change-Id: I7c5fd416fd985398b2eb66339bfbcad02a31d72c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd simple smoke tests to tct/run/smoke_tests.sh 96/69696/3
Aleksander Mistewicz [Mon, 16 May 2016 10:38:02 +0000 (12:38 +0200)]
Add simple smoke tests to tct/run/smoke_tests.sh

Change-Id: Ia9faee61bd1c3c574a668a4ec02ca584f819b2af
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoMove smoke tests to separate file 62/69662/4
Aleksander Mistewicz [Mon, 16 May 2016 09:20:32 +0000 (11:20 +0200)]
Move smoke tests to separate file

Change-Id: I5d6e7d58ffa444cb8b0d5202afeb1e4b72fe1c69
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd README with basic structure of testlab-major
Aleksander Mistewicz [Thu, 24 Mar 2016 11:50:04 +0000 (12:50 +0100)]
Add README with basic structure of testlab-major

Change-Id: Ib305a781c22c2d1fef7a6e2113095b980ca95a94
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/build_tct.sh script to build Native TCT
Aleksander Mistewicz [Wed, 13 Jan 2016 16:25:50 +0000 (17:25 +0100)]
Add tct/build_tct.sh script to build Native TCT

Change-Id: Ic37573ec68a408a0d3e9272dfe664dfb8e006e45
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd gen_list() to tct/build/build.sh
Aleksander Mistewicz [Wed, 13 Jan 2016 16:19:12 +0000 (17:19 +0100)]
Add gen_list() to tct/build/build.sh

Change-Id: Ied16c8acd61af35689fa66f3fc1b2818ce43dd83
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/run_tct_chroot.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 14:29:14 +0000 (15:29 +0100)]
Add tct/run_tct_chroot.sh

Syntax is: run_tct_chroot.sh $ID $TEST_REPO $RESULT_DIR

Change-Id: Id3d76f1ae8e4c2ab92ccc1363c1067e26e564c6f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/run/run_tct.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 14:28:04 +0000 (15:28 +0100)]
Add tct/run/run_tct.sh

Syntax is: run_tct.sh $ID

Change-Id: I56e7b2cb28f2cc64075ccabe06ca7c7e10efc9cb
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd chroot functions to tct/run/run.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 13:32:12 +0000 (14:32 +0100)]
Add chroot functions to tct/run/run.sh

Syntax is:
    create_chroot $ID
    delete_chroot $ID
    run_in_chroot $ID $CMD

Change-Id: Iddde4562d1897a918fe155efb91d8fe1a47a492f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd testplan functions to tct/run/run.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 11:10:55 +0000 (12:10 +0100)]
Add testplan functions to tct/run/run.sh

Syntax is:
    create_testplan $TEST_PLAN $TEST_REPO
    run_testplan $TEST_PLAN $ID

Change-Id: I96b31754cc237da66ba9e6dbbaed112e8c346ea7
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd conf_device() to tct/conf/conf.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 10:18:25 +0000 (11:18 +0100)]
Add conf_device() to tct/conf/conf.sh

It runs install script from native TCT repo and copies files required
by TCT to the image. Modified tct/odroid_prepare_flash_conf.sh to use it
if 4th (NATIVE_TCT_REPO) parameter is specified.

Syntax is: conf_device $ID $NATIVE_TCT_REPO

This patch also adds all files required to configure device:
    * tct/conf/capability.xml.example (used if tct/conf/capability.xml
        is unavailable)
    * tct/conf/buildinfo.xml.example (used if tct/conf/buildinfo.xml
        is unavailable)
    * tct/conf/configure_env.sh
        environment variables used by tests

Change-Id: Icf643a0406f67de5e1a256c0f21c9a51a07d1e4d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/minnow_prepare_flash_conf.sh
Aleksander Mistewicz [Tue, 29 Mar 2016 13:21:15 +0000 (15:21 +0200)]
Add tct/minnow_prepare_flash_conf.sh

And required configuration file:
    tct/conf/ssh_config

Another configuration file in /etc/opt/testlab-major/ip_addr should be
created on testlab setup. Format is specified in the file header.

More information is available in tct/minnow_prepare_flash_conf.sh file
header and testlab-handbook.

Change-Id: Icae893512636ea8206b12bba7b6898cbf280f8ba
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/resource_locking.sh
Aleksander Mistewicz [Fri, 18 Mar 2016 15:07:03 +0000 (16:07 +0100)]
Add tct/resource_locking.sh

Change-Id: I9526afee6ca0776fe32960dba9fa2ee522742909
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/odroid_prepare_flash_conf.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 12:12:29 +0000 (13:12 +0100)]
Add tct/odroid_prepare_flash_conf.sh

GNU version of sed is required to remove colouring from the output.
tee is required to print systemctl --state=failed output to stdout
and result file.

Syntax is: odroid_prepare_flash_conf.sh $CUM $BOOT_IMAGE $IMAGE

Change-Id: Icdda5a2367a69977ba38f9158074f0b052e8879f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd mounting functions to tct/prepare/prepare.sh
Aleksander Mistewicz [Mon, 28 Dec 2015 10:53:14 +0000 (11:53 +0100)]
Add mounting functions to tct/prepare/prepare.sh

Syntax is:
    mount_image $IMAGE $MOUNTPOINT
    unmount_image $MOUNTPOINT

Change-Id: I3d4c6f251d2c1bfa73cfee19dc6bb1cf5ecb8f1e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoRestart sdmux on card reader failure in uuid2dev
Aleksander Mistewicz [Wed, 27 Apr 2016 14:25:46 +0000 (16:25 +0200)]
Restart sdmux on card reader failure in uuid2dev

When card reader fails to communicate with a testserver sdmux must be
restarted. It is done by switching its state to device and then intializing
what should cut the power off the card reader.

Change-Id: Ibcdfc8c651b294fa0d97218372a5676bde4c25b6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd sd-mux-ctrl functions to tct/flash/flash.sh
Aleksander Mistewicz [Thu, 17 Dec 2015 10:40:01 +0000 (11:40 +0100)]
Add sd-mux-ctrl functions to tct/flash/flash.sh

Syntax is:
    switch2device $SDMUX
    switch2testserver $SDMUX
    restart_device $SDMUX
    change_id $SDMUX $NEWID
    sdmux_init $SDMUX

Change-Id: I57f9d94ac81fb4b6eca00c257c308d84c0a6940b
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd unpack_image() to tct/prepare/prepare.sh
Aleksander Mistewicz [Tue, 15 Dec 2015 11:20:53 +0000 (12:20 +0100)]
Add unpack_image() to tct/prepare/prepare.sh

Change-Id: Ic738cc7ec486a4d565d26feeead6c419e424cac5
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd install_iserial() to tct/prepare/prepare.sh
Aleksander Mistewicz [Tue, 15 Dec 2015 10:51:21 +0000 (11:51 +0100)]
Add install_iserial() to tct/prepare/prepare.sh

More information available in tct/prepare/iserial.sh file header.

This patch also adds all files required to set up iSerial:
    * tct/prepare/iserial.sh
    * tct/prepare/iserial.service

Change-Id: I36ba999b0d576ae93a060c09b92e78e8ab42a06f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd UUID functions to tct/flash/flash.sh
Aleksander Mistewicz [Tue, 15 Dec 2015 10:17:13 +0000 (11:17 +0100)]
Add UUID functions to tct/flash/flash.sh

Function uuid2dev() converts UUID stored in $FILE
to corresponding /dev/sd*.

Syntax is:
    * uuid2dev $FILE
    * change_uuid $FILE $DEV_SDCARD

Change-Id: I5257c5ce888c441ba882fc65dd84a83d6c9e0317
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd tct/flash/flash_dd.sh script
Aleksander Mistewicz [Mon, 14 Dec 2015 14:07:43 +0000 (15:07 +0100)]
Add tct/flash/flash_dd.sh script

It flashes SD card with images available in a directory it is
invoked in using dd. For more information read file header.

SD card should be prepared using script mkpart.sh available at:
https://wiki.tizen.org/wiki/Quick_guide_for_odroid#Fuse_bootloader_image

Example: ./flash_dd.sh /dev/sdb
Flashes as follows:
    * boot.img to /dev/sdb1
    * rootfs.img to /dev/sdb2
    * system-data.img to /dev/sdb3
    * user.img to /dev/sdb5
    * modules.img to /dev/sdb6

Change-Id: I2d5b72cf4d2079632cbd700dd5749260782868b8
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd die() to tct/common.sh
Aleksander Mistewicz [Mon, 14 Dec 2015 13:59:11 +0000 (14:59 +0100)]
Add die() to tct/common.sh

This function takes up to two arguments:
    1. error message
    2. exit code (default: 1)

Example: test -n "$1" || die "No arguments!" 5
If variable $1 is not set, "No arguments!" will be printed on stderr
and script in which it was invoked will exit with exit code equal to 5.

Change-Id: I7993d1ab3be9025853f50d86c7dc5bc120ecec7e
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
8 years agoAdd LICENSE file
Aleksander Mistewicz [Fri, 13 May 2016 12:05:42 +0000 (14:05 +0200)]
Add LICENSE file

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