Граф коммитов

2516 Коммитов

Автор SHA1 Сообщение Дата
Chi Song 9ffefdc866 limit eol of files to LF, and fix platform bug 2020-08-26 14:10:23 +08:00
Chi Song 145877ff63 use strong type schema, init azure platform code
1. use dataclasses as base schema, dataclasses_json for serialization,
   and marshmallow for validation.
2. remove yaml format schema, add python schema.
3. use strong type to replace dict based code.
4. add platform schema and node schema for platform extension.
5. add _initialize for platform
6. init azure platform code.
7. other small improvements.
2020-08-26 14:10:23 +08:00
Chi Song 18b0f902c2 rename package tool to tools 2020-08-26 14:10:23 +08:00
Chi Song 9816770e88 * use UserDict prevent strange behavior in future. As not all built-in
operators of Dict depends on __set/getitem__.
* other minor improvements.
2020-08-26 14:10:23 +08:00
Andy Schwartzmeyer 79dbeb574a
Merge pull request #991 from LIS/andschwa/codeowners
Add CODEOWNERS file to setup default PR reviewers
2020-08-25 13:24:34 -07:00
Andrew Schwartzmeyer a0bcac7895 Add CODEOWNERS file to setup default PR reviewers
This adds support for GitHub’s CODEOWNERS, which is a file indicating
which GitHub users should be automatically added as reviewers to new
Pull Requests. It’s per-branch, meaning it applies only for changes made
in a branch which includes this file, so this will not affect ‘master’.
It is setup currently to add Chi, Leandro, and myself to all PRs to
‘main’ for LISAv3.
2020-08-22 12:32:39 -07:00
Simon Xiao bc75c56f09
Update README with small changes (#986) 2020-08-21 22:37:15 -07:00
Chi Song 33e9e30445 refactor: use dict for collections
1. add environments, nodes, platforms classes like a collection.
2. add tools to use a tool like [ToolType], and move related code to
    executable.
3. other minor improvements.
2020-08-19 11:58:03 +08:00
Chi Song ecef2c9ffb Implement test case selector
1. add testselector to deal with criteria and apply settings
2. improve logging to support ut.
3. remove TestSuiteData class, as it doesn't need.
4. add ut in github action.
5. other minor improvements.
2020-08-19 11:58:03 +08:00
Chi Song db1170f433 Add schema validation
1. add cerberus to validate schema.
2. remove full.yml, and add schema.yml as schema
3. fix schema due to new schema
2020-08-19 11:58:03 +08:00
Chi Song b8dc17dddc Improve logger to use customized Logger class. 2020-08-19 11:58:03 +08:00
Chi Song 51f442479a split code of local and ssh session 2020-08-19 11:58:03 +08:00
Chi Song 5c2668566c remove factory patterns from code
Use pythonic function to replace factory.
2020-08-19 11:58:03 +08:00
Chi Song 846f139afa merge files to be pythonic
Python file is a module, which is not used to put only one thing.
All related things should be put in same module.

platform.py causes error in uuid.py, so change name to platform_.py
2020-08-19 11:58:03 +08:00
Chi Song efd52b62a1 replace singleton to global object
1. global object is more pythonic implementation, so change it.
2. Config is not used widely, so remove singleton.
2020-08-19 11:58:03 +08:00
Chi Song 7b49a50df7 provide a simple way to use tool
1. add LightTool to support oneline call to script
2. add default function for tool class
2020-08-19 11:58:03 +08:00
Chi Song f633db1d91 refine log to output meaningful prefix 2020-08-19 11:58:03 +08:00
Chi Song bc8c5ffc16 add statistics and test result for test progress
1. add statistics and test result for test case progress
2. inherit from unittest to get all assert methods
3. add perf_timer for profiling, and improve current profiling
4. add document for tool.py
5. add init.py for mypy checking
6. other minor improvements
2020-08-19 11:58:03 +08:00
Andy Schwartzmeyer cd20d12bcf
Merge pull request #974 from LIS/andschwa/contributing
Write initial Contributing Guidelines draft
2020-08-17 15:53:29 -07:00
Andrew Schwartzmeyer d6e2a7e6d6 Don’t skip CI on doc updates
This gets around the problem of the branch protection rules requiring
these to run, which I can’t adjust because I’m not an admin.
Fortunately, these tests run really fast.
2020-08-17 15:46:56 -07:00
Andrew Schwartzmeyer dc56980773 Write initial Contributing Guidelines draft 2020-08-17 15:46:56 -07:00
Chi Song 7f6f6be987
Implement custom script (#965)
* Implement custom script

1. Implement custom script. As it's same type with different data, so it's different with tools. CustomScriptBuilder to create an instance of script on Node.
2. rename method and variables to follow pep8 guidaline.
3. rename [Suite/Case]Metadata to [TestSuite/TestCase]Metadata
4. create LisaException to all internal exceptions
5. other minor improvements
2020-08-13 15:33:58 +08:00
Andy Schwartzmeyer ac1bf3e79e
Merge pull request #969 from LIS/andschwa/shellcheck
Add ShellCheck to CI
2020-08-12 19:45:22 -07:00
Andrew Schwartzmeyer 9c5dd671ca Add ShellCheck to CI 2020-08-12 19:40:55 -07:00
Chi Song e88ab5168a
Merge pull request #962 from LIS/andschwa/type-checking
Fix types and add type checking to CI
2020-08-11 08:54:59 +08:00
Andrew Schwartzmeyer 5abcd7716b Fix types and add type checking to CI 2020-08-10 17:50:10 -07:00
Andy Schwartzmeyer 56718c9a77
Merge pull request #959 from LIS/chisong/v3_8010
implement tool installation
2020-08-10 15:54:18 -07:00
Chi Song 3b8ff9b06d Support skip run on unfit environment 2020-08-10 18:03:57 +08:00
Chi Song 0c7a5a5dbe fix Windows failure without WSL 2020-08-10 17:48:12 +08:00
Chi Song 2d62443079 implement tool installation
1. support remote file operations with shell
2. add shell to deal with different between local and remote
3. add git and ntttcp tools, ntttcp is a complex tool example
4. support remote file operations with shell
5. support shell execution on command
2020-08-10 17:31:48 +08:00
Chi Song 09e060b84b refactoring code for process
1. use spurplus to get unique interface for local and remote processes
2. rename executable to tool
3. other minor changes
2020-08-10 11:54:31 +08:00
Chi Song 191e2af054
Merge pull request #955 from LIS/chisong/v3_0806
Implement start local and remote processes in Node
2020-08-08 09:37:05 +08:00
Andrew Schwartzmeyer 4724390908 Remove `Optional` from `config.py` to simplify types
And note our hack which indicates we need a structured object.
2020-08-07 17:32:30 -07:00
Andrew Schwartzmeyer 897b925e50 Use `dataclass` for `ExecutableResult`
Also clean the stdout/stderr at its source, not when saving. Use
`strip()` with its default arguments (which strips surrounding
whitespace, not just carriage returns and newlines).
2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer 578dd252af Fix misspelling of `executableResult`
I couldn’t find the file.
2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer a0f2d04c29 Rename `cleanup` to `close`
Which is Python’s canonical term for this logic. We ought to make as
many of these into context managers as possible, but for now let’s at
least use the expected names.
2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer 51d98e0f46 Hide class and IDs of `ActionStatus` enum
Using the Enum module’s functional API we can hide the implementation
details that it is technically a class and that the members are
internally represented as integers, providing a clearer abstraction.
2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer 2a2990064d Simplify `warn_as_error` 2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer 1fddf7a9f2 Simplify `_load_extends` 2020-08-07 17:22:28 -07:00
Andrew Schwartzmeyer bfac54c7dd Fix type errors 2020-08-07 16:39:25 -07:00
Andrew Schwartzmeyer 3b59c8b62f Fix bug in process.py
While the documentation recommends that the `subprocess` module is used
via the `run()` interface, we are currently using the underlying `Popen`
interface. The documentation further recommends that if
`shell=True` (which is currently the case in our code), that the command
is passed directly as a string, not a split argument sequence. Using
this recommendation fixed the existing bug where the arguments were
being ignored on Linux (causing `uname` to print “Linux” and not the
kernel version, release, and hardware info). However, we need to revisit
our wrapping of `subprocess` because it is difficult to get right.
2020-08-07 15:54:41 -07:00
Chi Song e83bd25842 implement simple tools: echo, uname 2020-08-07 16:49:53 +08:00
Chi Song ad38d346cb fix by review comments. 2020-08-07 14:00:14 +08:00
Chi Song 5f5fa310a7 remove useless 'if' and use pathlib 2020-08-07 11:26:09 +08:00
Chi Song 079e61c21d use f format to replace %
1. rename test suite methods for better intuition.
2. add description for suite and case.
3. other minor changes
2020-08-07 10:27:15 +08:00
Chi Song 39458d1a9d fix flake8 2020-08-06 18:18:23 +08:00
Chi Song 3fa24d2ef0 implement local and remote processes on node
remove common folder
add some cleanup code
2020-08-06 18:14:41 +08:00
Chi Song 9300e145bd use base path from config file
it's easier to put all things together.
2020-08-06 15:14:17 +08:00
Chi Song b824e63d7b change to a better singleton pattern. 2020-08-06 15:00:39 +08:00
Chi Song 285fe681f5 fix most isort errors. 2020-08-06 14:27:09 +08:00