Skip to content

Return errors from examples/run_examples.sh correctly #311

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 1 commit into from
Jun 9, 2019

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Jun 9, 2019

The PR fixes an error in .travis.yml that was not checking for errors in examples/run_examples.sh correctly, so any errors in the examples files were not being caught.

Details: the original code used a command of the form

if [condition]
    cd examples; bash run_examples.sh; cd ..
fi

The if command returns the status of the last command, which in this case is cd .., which is always true. The fix uses the construct

if [condition]
    (cd examples; bash run_examples.sh);
fi

which still leaves the script in the main directory but returns the exit status of the bash command.

@murrayrm murrayrm merged commit cda33a2 into python-control:master Jun 9, 2019
@murrayrm murrayrm deleted the fix_travis_run_examples branch June 9, 2019 03:31
@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.936% when pulling 30dc6d9 on murrayrm:fix_travis_run_examples into c99f72f on python-control:master.

@murrayrm murrayrm added this to the 0.8.3 milestone Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants