This repository was archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Some Client Simulator reworks #145
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1b2913d to
bfee06e
Compare
tools/clientSimulator/README.md
Outdated
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the typo should be corrected : Framwork/Framework
bfee06e to
ffea2a7
Compare
Contributor
Author
|
@dpertuze the "ParameterFramworkPort" config item wasn't even used... So I removed it and pushed a new version. Thanks for catching it. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this actual version, if the user wants to get to the menu, no_exit option must be put on the command line, which does not seem natural for me...
ffea2a7 to
9910d67
Compare
Contributor
Author
|
@dpertuze done. |
Some paths were concatenated by inserting a "/" between the two components.
This is not portable and also makes it impossible to handle absolute paths.
Instead, os.path.join is both portable and "smart" about absolute paths:
os.path.join("foo/bar", "/spam") == "/spam"
Signed-off-by: David Wagner <david.wagner@intel.com>
9910d67 to
baa22cf
Compare
This simply was dead code. Signed-off-by: David Wagner <david.wagner@intel.com>
They were dead code. Signed-off-by: David Wagner <david.wagner@intel.com>
Such unecessarily wide blocks make the code harder to read. Signed-off-by: David Wagner <david.wagner@intel.com>
The sorted() function already returns a strict list (i.e. not a generator or
other such lazy iterable). Thus this identity list-comprehension:
[i for i in sorted(x)]
is useless and can be rewritten as:
sorted(x)
Signed-off-by: David Wagner <david.wagner@intel.com>
And avoid modifying UserInteractor.getMenu's input argument. Signed-off-by: David Wagner <david.wagner@intel.com>
A bare string statement at the beginning of a class or a function is evaluated as a docstring but it makes no sense at the beginning of an if-clause. Change it to a comment instead. Signed-off-by: David Wagner <david.wagner@intel.com>
remote-process and test-platform should simply be in the PATH and so, there is no need for their paths to be put in conf.json. This change is somewhat backward-compatible because these configuration items will simply be ignored. Another reason why it wasn't very useful for these paths to be in conf.json is that, even if their path is know, one still has to add their library's path to LD_LIBRARY_PATH. It is easier to install the Parameter Framework project, in order to have everything set. Signed-off-by: David Wagner <david.wagner@intel.com>
…dlers host The configuratio item "TestPlatformHost" is replaced by "TestPlatformPort" while "ParameterFramworkHost" is completely removed (it wasn't used). It made no sense to specify the host since it couldn't have been anything else than "localhost". This change isn't backward-compatible since configuration files need to be changed. Signed-off-by: David Wagner <david.wagner@intel.com>
Since this script is only run once in the entire lifetime of a Client Simulator instance ( before running the scenarios), it can simply be manually executed by the user. Signed-off-by: David Wagner <david.wagner@intel.com>
Now, all paths in conf.json must be absolute or relative to the test directory. This harmonizes all the paths and avoids describing special cases. Also, there was a mistake in documentation regarding how the "LogFile" path is evaluated. Signed-off-by: David Wagner <david.wagner@intel.com>
ScriptsFile, ActionGathererFile, LogFile, CoverageFile, CoverageDir and PfwDomainConfFile are now optional and can be left out of conf.json. Signed-off-by: David Wagner <david.wagner@intel.com>
Dicts had no added value over lists since menus are a) sorted and b) indexed by a number. Using lists instead simplifies the code a bit. Signed-off-by: David Wagner <david.wagner@intel.com>
Each menu entry used to say "<script name> scripts". There was a typo (plural) and it wasn't looking the same as other menus that were in the form "<verb> <noun>". Change the entries to "Execute <script name>". Signed-off-by: David Wagner <david.wagner@intel.com>
baa22cf to
abece42
Compare
Client Simulator only supports one scenario to be launched by command line option. For automation purpose, this patch adds an option allowing the user to specify several scenarios on command line. Also, the default behaviour used to be: "after a scenario has been executed, present the user with a menu in order to run more of them". The new behaviour is to exit the Client Simulator after the scenarios have been run; the old behaviour can be reproduced with the new "--no-exit" option. If neither --scenario nor --interactive nor --no-exit are passed, then the same behaviour as with --no-exit is applied. Change-Id: I0ea64a2576c390d0b80b825b9f3f320ce9e8da43 Signed-off-by: David Pertuze <davidx.pertuze@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com>
Contributor
|
👍 |
|
Tested-by: Sebastien Guiriec sebastien.guiriec@intel.com |
dawagner
added a commit
that referenced
this pull request
Jul 20, 2015
Some Client Simulator reworks - Remove some dead code and simplify some code portions. - Add a new feature: pass more than one '--scenario' option. - Remove the SetupScript config item (if you need a setup script, you need to run it by yourself) - The TestPlatformHost and ParameterFrameworkHost config items used to contain both the hosts and the ports; replace them with TestPlatformPort and ParameterFramworkPort that contain only the port. The host will always be localhost anyway - no need to define it. - Remove the RemoteProcessCommand and TestPlatformCommand config items and expect remote-process and test-platform to be in the PATH. - Make some config items optional. - Make all paths in conf.json relative to the test directory (but absolute paths will really be considered absolute). Tested-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SetupScriptconfig item (if you need a setup script, you need to run it by yourself)TestPlatformHostandParameterFrameworkHostconfig items used to contain both the hosts and the ports; replace them withTestPlatformPortandParameterFramworkPortthat contain only the port. The host wil always belocalhostanyway - no need to define it.RemoteProcessCommandandTestPlatformCommandconfig items and expectremote-processandtest-platformto be in the PATH.