-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VM: Add comparison testing between branchs for State Test Runner (#1634)
* Add diff tester and performance * update script * Simplify script * Readme updates * move start * Update stashing logic in script
- Loading branch information
Showing
4 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
usage() { | ||
echo 'Usage: ./diffTester.sh [-b branch] [-t "path/to/my/test.json"] [-r 5] [-f London]' | ||
} | ||
|
||
FORK="London" | ||
STASH="f" | ||
while getopts "b:t:r:f::" c | ||
do | ||
case $c in | ||
b) BRANCH=$OPTARG ;; | ||
t) TEST=$OPTARG ;; | ||
r) REPS=$OPTARG ;; | ||
f) FORK=$OPTARG ;; | ||
h|?) usage ;; | ||
esac | ||
done | ||
|
||
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if ! git status | grep -q "nothing to commit" | ||
then | ||
git stash | ||
STASH="t" | ||
fi | ||
|
||
git checkout $BRANCH | ||
|
||
npm run tester -- --state --fork=$FORK --customStateTest=$TEST --reps=$REPS | ||
|
||
git checkout $CURRENT_BRANCH | ||
|
||
npm run tester -- --state --fork=$FORK --customStateTest=$TEST --reps=$REPS | ||
|
||
echo "stash" $STASH | ||
if [ "$STASH" = "t" ] | ||
then | ||
git stash pop | ||
fi |
This file contains 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
This file contains 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