-
Notifications
You must be signed in to change notification settings - Fork 13
update readme #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
update readme #268
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fb5d4c3
update readme
bbiiggppiigg a607543
Update README.md
bbiiggppiigg f5d81e3
Update README.md
bbiiggppiigg ee884df
Update README.md
bbiiggppiigg f875ce8
Update README.md
bbiiggppiigg 55f22c3
Update README.md
bbiiggppiigg ab6291f
Update README.md
bbiiggppiigg 5b55df1
Update README.md
bbiiggppiigg f6bb10b
Update README.md
bbiiggppiigg f4fe5e9
Update README.md
bbiiggppiigg ec12c1e
Update README.md
bbiiggppiigg 6b00b4b
Update README.md
bbiiggppiigg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,57 @@ | ||
| # Testsuite for the Dyninst tool for binary instrumentation, analysis, and modification | ||
|
|
||
| ## Usage | ||
| ## Building Testsuite | ||
|
|
||
| Because Dyninst and its testsuite are tightly integrated, it is highly recommended to use the build script located in `scripts/build/build.pl`. | ||
| To build testsuite, please first have the Dyninst version you want to test installed. | ||
| Then one can build the testsuite using cmake by specifying the path of dyninst installation using Dyninst\_ROOT. | ||
|
|
||
| Example usage on Linux: | ||
| ``` | ||
| mkdir build | ||
|
|
||
| > export PERL5LIB=testsuite/scripts/build | ||
| > perl testsuite/scripts/build/build.pl --njobs=4 | ||
|
|
||
| The build script has several options for configuring library locations. See `build.pl --help` for details. | ||
| cd build | ||
|
|
||
| ### Running tests for pull requests | ||
| cmake .. -DDyninst_ROOT=/path/to/your/dyninst/installation -DCMAKE_INSTALL_PREFIX=/path/to/your/testsuite/intallation | ||
|
bbiiggppiigg marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| By default, the build script uses the current state of the repositories contained in the directories specified by `--dyninst-src` and `--test-src`. The test script comes with the ability to fetch and update pull requests directly from the Dyninst Github repository. These are controlled through the `--dyninst-pr` and `--testsuite-pr` switches for dyninst and the testsuite, respectively. Note, however, that if the current git tree has any outstanding changes, the script will raise an error accordingly. | ||
| ## Running Testsuite | ||
|
|
||
| The format of the input is *remote/id* where *remote* is the name given to the remote repository (this is usually "origin") and *id* is the pull request id from Github. In the case that the remote's name is 'origin', it can be omitted. Hence, `--dyninst-pr=origin/123` is the same as `--dyninst-pr=123`; the same for `--testsuite-pr`. | ||
| To run the testsuite, three paths need to be set through the enviromental variable: | ||
|
|
||
| The build script will also update the pull request (via a squashed merge commit) to the current HEAD of the remote's `master` branch the first time the PR is tested locally. As such, this feature should only be used to test PRs against the official Dyninst repository. This process creates a local branch name `PR<ID>` where `<ID>` is the *id* of the PR specified on the command line. If this local branch already exists, then a `pull` is issued and no merge commit against the remote's master is performed. This can cause trouble if a local branch with that name already exists. | ||
| * DYNINSTAPI\_RT\_LIB should point to the libdyninstAPI\_RT.so under the Dyninst installation path. | ||
|
|
||
| NOTE: It is best not to have any local branches with names of the form 'PR<ID>' when using the build script | ||
| * LD\_LIBRARY\_PATH should include both the path of tht Dyninst installation and the path of the testsuite installation. | ||
|
bbiiggppiigg marked this conversation as resolved.
Outdated
|
||
|
|
||
| To enable debugging, one can run the testsuite with the following arguments | ||
|
|
||
| ``` | ||
| -v -log logfilename -debugPrint | ||
| ``` | ||
|
|
||
| The testsuite can be run two modes: The full run mode and a one-test mode. | ||
|
|
||
| ## runTests | ||
|
|
||
| The runTests executable will run all tests the comes with the testsuite. | ||
|
|
||
| Example usage: | ||
|
|
||
| ``` | ||
| DYNINSTAPI_RT_LIB=dyninst-install/lib/libdyninstAPI_RT.so LD_LIBRARY_PATH=dyninst-install/lib/:./:$LD_LIBRARY_PATH ./runTests -v -log output.log -debugPrint | ||
|
bbiiggppiigg marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ## test\_driver | ||
|
|
||
| The test\_driver allows you to specify which test you want to run by passing hte following argument | ||
|
bbiiggppiigg marked this conversation as resolved.
Outdated
|
||
|
|
||
| ` | ||
| -test test-name | ||
| ` | ||
|
|
||
| Example usage: | ||
|
|
||
| ``` | ||
| DYNINSTAPI_RT_LIB=dyninst-install/lib/libdyninstAPI_RT.so LD_LIBRARY_PATH=dyninst-install/lib/:./:$LD_LIBRARY_PATH ./test_driver -v -log output.log -debugPrint -test pc_irpc | ||
| ``` | ||
|
|
||
| ### Documentation for additional control(WIP) | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.