Commit graph

570 commits

Author SHA1 Message Date
Anas Nashif e8cdbe03d2 twister: remove usage of deprecated gccarmemb variant
gccarmemb was deprecated 2 years ago, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-04 11:14:44 -05:00
Eugeniy Paltsev afb34e3d5c twister: check if output is connected to tty before 'stty sane' call
As of today we unconditionally call 'stty sane' that leads to
lots of error messages
'stty: standard input: Inappropriate ioctl for device'
when output isn't connected to tty (for example when we launch
twister in Jenkins)

Fix that by check if output is really connected to tty before
'stty sane' call.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-02-02 18:41:12 -05:00
Jingru Wang 99b0720303 twister: rename variable p to log_root
The variable p represents the name of a platform, it shouldn't be
reassigned

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2021-01-29 10:20:10 -05:00
Anas Nashif ec47912292 twister: generate json report on demand
Do not generate json report by default. Use --json-report to generate
the file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-25 09:56:53 -05:00
Anas Nashif b1080ea036 twister: remove test type from json
This is always the same, so we might as well just remove it for now and
save some space since it is the default anyways. Type can be added later
when it provides more value.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-18 08:30:49 -05:00
Anas Nashif cd1dccf9bc twister: fix json report
Fix JSON report generation and simplify it a bit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-18 08:30:49 -05:00
Anas Nashif 211ef41125 twister: debug which coverage tool is being used
Add more debug messages about coverage tool being used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-18 08:30:49 -05:00
Anas Nashif 827ecb7bd0 twister: fix build_on_all configuration
Logic for scope of platforms to be checked was changed and this options
now only applies to limited scope, fix this and reset scope when a
testcase declares it needs to build on available platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-14 13:59:42 -05:00
Eugeniy Paltsev 79b3a50772 twister: BinaryHandler: call try_kill_process_by_pid in a 'with' scope
The commit
531fe89e80 (sanitycheck: use multiprcoessing instead of threads)
introduce regression for ARC nsim_hs_smp platform.

The regression is that verification on nsim_hs_smp hangs. That
happens because now we don't call try_kill_process_by_pid()
in the 'with' scope of the 'subprocess.Popen' when we spawning
BinaryHandler thread. Previously it was called via `terminate`
method of `BinaryHandler` but it was changed in 531fe89e80.
So if we can't terminate the simulator in a normal way
(which is expected for 'mdb' which is used for nsim_hs_smp
simulation) we will hang forever - we will never return from
'with' scope of the 'subprocess.Popen' as we are waiting for
process termination but the try_kill_process_by_pid() is located
latter and we never reach it.

Fix that.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2021-01-10 15:42:48 -05:00
Jingru Wang b9c953c126 twister: add 12 hexadecimal digits to version
With the earlier version of Git, git describe command will
use the default 7 hexadecimal digits as the abbreviated
object name. But currently the Linux kernel project needs
11 to 12 hexdigits to stay unique.So it's necessary to add
--abbrev=12 to ensure twister always generate the same tags.

In https://testing.zephyrproject.org/daily_tests/versions.json,
all tags have 10 hexadecimal digits.

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2021-01-04 08:42:40 -05:00
Anas Nashif 4fa82c44af twister: fix hardware map load/save
Do not store shared memory variables into yaml and check for validity of
imported hardware map before attempting to modify it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-19 19:20:09 -05:00
Jingru Wang f20c15caaf sanitycheck: Add exception check
Add exception check for psutil when running CI with nSIM

Sometimes nSIM random failures may turn nsimdrv process into zombie
process, parent process can't terminate it by calling proc.wait(0.1)
and kill command doesn't apply to zombie process

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2020-12-17 09:18:00 -05:00
Anas Nashif 4594370b46 twister: remove some leftover sanitycheck mentions
Few leftover mentions of Sanitycheck.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-14 14:13:16 -05:00
Anas Nashif b517b1fc60 sanitycheck: add more logging
This will let us know what is going on, especially on operations that
take some time to complete.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 17:41:40 -05:00
Anas Nashif 2d4891725c sanitycheck: handle keyboard interrupts
Handle keyboard interrupts (Ctrl-C) and terminate gracefully.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 17:41:40 -05:00
Anas Nashif a5d16ab027 sanitycheck: add option to store platform reports
Now we create plaform reports for each enabled platform, this is time
consuming, especially if you are not using those reports for anything.

Make this an option and enable only if the generated reports are going
to be used.

Individual reports can also be generated from the JSON file if needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 17:41:40 -05:00
Anas Nashif 5725ed8dd1 twister: fixed pylint issues
Fixed import and unused variable warning.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Anas Nashif b18f311b3e twister: change all occurances of sanitycheck
mass search/replace for sanitycheck replacing it with the new name:
twiser.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Anas Nashif 2d351e7ffc sanitycheck: rename main script
We are now known as twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00
Anas Nashif e508babfed sanitycheck: move sanity_chk -> pylib/twister
Move the "module" classes used by sanitycheck into a new location under
pylib, where we can have other python libraries reside instead of having
them all over the place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-12-11 14:13:02 -05:00