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
Fix the Python RPC tests on Big Endian architectures #1687
Merged
peternewman
merged 47 commits into
OpenLightingProject:0.10
from
peternewman:0.10-clang-latest
Nov 12, 2022
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
7661546
New placeholder for NEWS
peternewman 95434e3
Fix a typo
peternewman 6aa504d
Merge branch '0.10' into 0.10-clang-latest
peternewman 0ca7d87
Skip updating for now as it seems to be breaking the build
peternewman 1bbbf78
Uninstall some homebrew packages we don't need
peternewman 3a87017
Add more packages and uninstall in one go
peternewman f5887ff
Remove another package that isn't required
peternewman f907b4c
Add a missing semicolon
peternewman b3e216c
Keep sqlite as ccache needs it too
peternewman 91cb697
Fix the Python protocol regression tests on Big Endian platforms
peternewman 3e7a46e
Fix a comment
peternewman ead457c
Add the count to the last line of the codespell info run
peternewman e923646
Merge branch '0.10-clang-latest' of https://github.com/peternewman/ol…
peternewman eb1f26a
Ensure we handle both directions of mock data on BE architectures
peternewman c402fcb
Add register and fetch DMX tests to Python
peternewman 355d6c2
Try and fix the OS X build and switch to python 3.9.0
peternewman 93820c6
Install python 3.9.0 on Ubuntu. All OS X build are currently broken
peternewman 489de7c
List available pyenv
peternewman 77c5225
Switch back to the working python 3.7.1
peternewman 9bd8856
Merge branch '0.10' into 0.10-clang-latest
peternewman 9244ebd
Don't try and build most of the broken OS X builds
peternewman 7458463
Merge branch '0.10' into 0.10-clang-latest
peternewman baee181
Fix a typo
peternewman 252a94d
Merge branch '0.10-clang-latest' of https://github.com/peternewman/ol…
peternewman b7bcba3
Improve a test file comment
peternewman 3cf0a5a
Merge branch '0.10' into 0.10-clang-latest
peternewman ac3f97d
Change to more descriptive asserts for the ClientWrapper test
peternewman 81e5bf7
Merge branch '0.10-clang-latest' of https://github.com/peternewman/ol…
peternewman 74234c3
Drop the testRegisterUniverse as it's probably a bit flaky as it supp…
peternewman a02570f
Merge branch '0.10' into 0.10-clang-latest
peternewman cd49b3f
Merge branch '0.10' of https://github.com/openlightingproject/ola int…
peternewman f7464f1
Merge branch '0.10-clang-latest' of https://github.com/peternewman/ol…
peternewman 11031e7
Fix a broken merge
peternewman 5e3a650
Fix flake8
peternewman 916c1b4
Increase the acceptable delta for the Python ClientWrapper tests
peternewman b011b76
Fix a flake8 issue
peternewman 90f8983
Merge branch '0.10' into 0.10-clang-latest
peternewman 28c0826
Merge branch '0.10' into 0.10-clang-latest
peternewman af7519c
Merge branch '0.10' into 0.10-clang-latest
peternewman df5b416
Merge branch '0.10' into 0.10-clang-latest
peternewman d26d041
Update a comment to a ToDo
peternewman 3e7ad75
Merge branch '0.10' into 0.10-clang-latest
peternewman 4357bbd
Merge branch '0.10' into 0.10-clang-latest
peternewman 67de220
Merge branch '0.10-clang-latest' of https://github.com/peternewman/ol…
peternewman a8250ae
Add the ola_fetch_dmx Python example
peternewman e39e14e
Fix the flake8 warning
peternewman 5290edd
Validate the universe data too in the fetch DMX test
peternewman File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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,78 @@ | ||
#!/usr/bin/env python | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Library General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# ola_fetch_dmx.py | ||
# Copyright (C) 2020 Peter Newman | ||
|
||
"""Gets a current frame of DMX for a universe.""" | ||
|
||
from __future__ import print_function | ||
from ola.ClientWrapper import ClientWrapper | ||
import getopt | ||
import textwrap | ||
import sys | ||
|
||
__author__ = 'nomis52@gmail.com (Simon Newton)' | ||
|
||
wrapper = None | ||
|
||
|
||
def DMXData(status, universe, data): | ||
if status.Succeeded(): | ||
print(data) | ||
|
||
else: | ||
print('Error: %s' % status.message, file=sys.stderr) | ||
|
||
global wrapper | ||
if wrapper: | ||
wrapper.Stop() | ||
|
||
|
||
def Usage(): | ||
print(textwrap.dedent(""" | ||
Usage: ola_fetch_dmx.py --universe <universe> | ||
|
||
Fetch the current DXM512 data for the universe and exit. | ||
|
||
-h, --help Display this help message and exit. | ||
-u, --universe <universe> Universe number.""")) | ||
|
||
|
||
def main(): | ||
try: | ||
opts, args = getopt.getopt(sys.argv[1:], "hu:", ["help", "universe="]) | ||
except getopt.GetoptError as err: | ||
print(str(err)) | ||
Usage() | ||
sys.exit(2) | ||
|
||
universe = 1 | ||
for o, a in opts: | ||
if o in ("-h", "--help"): | ||
Usage() | ||
sys.exit() | ||
elif o in ("-u", "--universe"): | ||
universe = int(a) | ||
|
||
global wrapper | ||
wrapper = ClientWrapper() | ||
client = wrapper.Client() | ||
client.FetchDmx(universe, DMXData) | ||
wrapper.Run() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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
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
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
Oops, something went wrong.
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.
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.
Technically we could just run it all of the time, as it wouldn't change the order on an LE machine, but that seemed a bit unnecessary