-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fail if directory passed from cmd line doesn't exist #210
Conversation
mint.sh
Outdated
fi | ||
(( i++ )) | ||
done | ||
|
||
echo "Finished running all tests." |
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.
@nitisht , your changes are good - but noticed that we echo "Finished running all tests" even if one of the sdk runs failed. You could check whether your counter i matches the total # of sdks in the run_list and print accurate message of how many sdks passed.
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.
Updated the PR @poornas
93b4e92
to
f01fd29
Compare
mint.sh
Outdated
echo -n "($i/$count) Running $sdk_name tests ... " | ||
if ! run_test "$sdk_dir"; then | ||
break | ||
if [ -d "$sdk_dir" ]; then |
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.
You could do for minimal diff
if [ ! -d "$sdk_dir" ]; then
echo Test directory "$sdk_name" not found. Exiting Mint.
exit 1
fi
mint.sh
Outdated
fi | ||
(( i++ )) | ||
else | ||
echo Test directory "$sdk_name" not found. Exiting Mint. |
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.
Quote the entire string. You should say "Test $sdk_name not found"
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.
sure
mint.sh
Outdated
done | ||
|
||
echo "Finished running all tests." | ||
## Report when all tests in run_list are run | ||
if [ $i -eq $((count + 1)) ]; then |
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.
IMO you would need to do this as separate PR
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.
sure, will do @balamurugana
f01fd29
to
ad64a4c
Compare
Updated PR @balamurugana |
mint.sh
Outdated
@@ -125,6 +125,10 @@ function main() | |||
i=1 | |||
for sdk_dir in "${run_list[@]}"; do | |||
sdk_name=$(basename "$sdk_dir") | |||
if [ ! -d "$sdk_dir" ]; then | |||
echo "Test directory $sdk_name not found. Exiting Mint." | |||
exit 1 |
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.
Test directory is not useful to the user. You could print test not found
ad64a4c
to
29701c2
Compare
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.
LGTM tested.
Mint accepts command line args to run specific tests. This PR adds a check to make sure the test directory exists before attempting to run tests.