-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add travis steps to remove Python 3+ tests
The Redfish tests are Python 3 only. With this change we remove the tests if running in anything less than Python 3.6.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 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,16 @@ | ||
#!/bin/bash | ||
|
||
BLACKLISTED_TEST_FILES=test_redfish.py | ||
|
||
PYTHON_VERSION=$(python -c 'import sys ; print("%d%d"%sys.version_info[0:2])') | ||
|
||
echo "Python at version $PYTHON_VERSION" | ||
if (( "$PYTHON_VERSION" < "36" )) | ||
then | ||
echo "Blacklisting files that require at least Python 3.6" | ||
for F in $BLACKLISTED_TEST_FILES | ||
do | ||
echo "tests/$F" | ||
[[ -f "tests/$F" ]] && mv "tests/$F" "tests/$F.disable" | ||
done | ||
fi |