Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Commit

Permalink
[wip] Test all Python scripts with python2 and python3.
Browse files Browse the repository at this point in the history
  • Loading branch information
strongly-typed authored and mhthies committed Nov 19, 2017
1 parent e00c8e9 commit 07ef403
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 60 deletions.
30 changes: 30 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,34 @@ jobs:
command: |
scons check=devices
"scripts-python2.7":
docker:
- image: roboterclubaachen/xpcc-build:latest
environment:
- SCONS_LIB_DIR: "/usr/local/lib/python2.7/dist-packages/scons-2.5.1"
- SCONSFLAGS: "-j3"
steps:
- checkout
- run:
name: Check if tool scripts run with Python2
command: |
python2 tools/authors.py --handles --count --shoutout --since 2017-01-01
python2 tools/system_design/builder/system_layout.py examples/communication/xml/communication.xml -o /tmp
"scripts-python3":
docker:
- image: roboterclubaachen/xpcc-build:latest
environment:
- SCONS_LIB_DIR: "/usr/local/lib/python2.7/dist-packages/scons-2.5.1"
- SCONSFLAGS: "-j3"
steps:
- checkout
- run:
name: Check if tool scripts run with Python3
command: |
python3 tools/authors.py --handles --count --shoutout --since 2017-01-01
python3 tools/system_design/builder/system_layout.py examples/communication/xml/communication.xml -o /tmp
workflows:
version: 2
build:
Expand All @@ -229,3 +257,5 @@ workflows:
- "generic-examples"
- "linux-examples"
- "avr-examples"
- "scripts-python2.7"
- "scripts-python3"
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ addons:
- libgtkmm-2.4-dev
- g++-4.8
- libzmqpp-dev
- texlive-latex-base
- texlive-fonts-recommended

before_install:
- export CC=gcc-4.8
Expand All @@ -36,9 +38,12 @@ before_install:
- which arm-none-eabi-g++
- arm-none-eabi-g++ --version
- pip install --upgrade pip wheel
- pip install jinja2 lxml
- pip install jinja2 lxml numpy
- pip install scons==2.5.1
- pip install configparser future
- pip install pyx==0.12.1
- pip3 install wheel
- pip3 install jinja2 lxml numpy scons pyx

cache:
directories:
Expand All @@ -58,3 +63,13 @@ env:
- TEST_SUITE="unittest target=atmega"

script: "scons $TEST_SUITE"

jobs:
include:
- stage: deploy
script:
- "python2 tools/authors.py --handles --count --shoutout --since 2017-01-01"
- "python3 tools/authors.py --handles --count --shoutout --since 2017-01-01"
- "python2 tools/system_design/builder/system_layout.py examples/communication/xml/communication.xml -o /tmp"
- "python3 tools/system_design/builder/system_layout.py examples/communication/xml/communication.xml -o /tmp"
env: TEST_SUITE=""
6 changes: 3 additions & 3 deletions tools/authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def get_author_log(since = None, until = None, handles = True, count = False):
for (commits, author) in commit_tuples:
out = author
if handles and author in author_handles and author_handles[author] is not None:
out += " (@{})".format(author_handles[author])
out += u" (@{})".format(author_handles[author])
if count:
out = "{:4} {}".format(commits, out)
out = u"{:4} {}".format(commits, out)
output.append(out)
return output

Expand Down Expand Up @@ -98,6 +98,6 @@ def get_author_log(since = None, until = None, handles = True, count = False):
authors = []
for author in log_authors:
if any(a in author for a in new_authors):
author += " 🎉🎊"
author += "" # " 🎉🎊"
authors.append(author)
print("\n".join(authors))
56 changes: 0 additions & 56 deletions tools/bitmap/pbm2c.py

This file was deleted.

0 comments on commit 07ef403

Please sign in to comment.