Skip to content
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

platformio test command fails #743

Closed
ohhorob opened this issue Aug 8, 2016 · 3 comments
Closed

platformio test command fails #743

ohhorob opened this issue Aug 8, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@ohhorob
Copy link

ohhorob commented Aug 8, 2016

[ ] Bug report. If you’ve found a bug, please provide information below.

Operating system: Mac OS X 10.11.5

PlatformIO Version (platformio --version): PlatformIO, version 3.0.0a1

Description of problem

Running the test command fails with this backtrace:

$ platformio test
Error: Traceback (most recent call last):
  File "/Users/home/pio3dev/lib/python2.7/site-packages/platformio/__main__.py", line 105, in main
    cli(None, None, None)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/core.py", line 680, in main
    rv = self.invoke(cox)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/click/decorators.py", line 16, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/platformio/commands/test.py", line 48, in cli
    assert check_project_envs(project_dir, environment)
  File "/Users/home/pio3dev/lib/python2.7/site-packages/platformio/commands/run.py", line 299, in check_project_envs
    if not config.sections():
AttributeError: 'str' object has no attribute 'sections'

The content of platformio.ini:

#
# Project Configuration File
#
# A detailed documentation with the EXAMPLES is located here:
# http://docs.platformio.org/en/latest/projectconf.html
#

# A sign `#` at the beginning of the line indicates a comment
# Comment lines are ignored.
#[platformio]
#

# Simple and base environment
# [env:mybaseenv]
# platform = %INSTALLED_PLATFORM_NAME_HERE%
# framework =
# board =
#
# Automatic targets - enable auto-uploading
# targets = upload

[env:teensy31]
platform = teensy
framework = arduino
board = teensy31
test_dir = digihead_tests

# Pull in the PlatformIO registered libraries
#   12 => Adafruit-ST7735
#   13 => Adafruit-GFX
#  129 => Encoder
#  291 => ClickEncoder ? not sure if I actually need this yet
#1106 => Bounce2
#  416 => TinyGPS
lib_install = 12, 13, 129, 291, 1106, 416
#lib_extra_dirs = /Users/home/.platformio/lib
#lib_deep_search = true

Source file to reproduce issue:

Insert here...

Additional info

This error occurs with and without the test_dir = digihead_tests property. And it doesn't seem to matter where I put it. I've tried under a top-level [platformio] stanza, and under the [env:teensy31] one.

@ivankravets ivankravets added this to the 3.0.0 milestone Aug 8, 2016
@ivankravets ivankravets added the bug label Aug 8, 2016
@ivankravets ivankravets self-assigned this Aug 8, 2016
@ivankravets
Copy link
Member

Thanks a lot for the report and that help us to test PIO3.

@ohhorob
Copy link
Author

ohhorob commented Aug 8, 2016

Cheers.

I pulled the update from develop, and platformio test compiles cleanly with

[platformio]
test_dir = digihead_tests

I don't have a teensy with me to verify running the tests yet.

@ivankravets
Copy link
Member

I pulled the update from develop

Next time please try pio upgrade command, it should upgrade current develop to the "latest" develop automatically.

ivankravets added a commit that referenced this issue Sep 9, 2016
* develop:
  Fix incorrect line order when converting from INO to CPP and pointer is used
  Fix unit test
  Notify about `version` field when creating library
  Add support for SparkFun Blynk Board
  Return valid exit code from ``plaformio test`` command
  Disable SSL Server-Name-Indication for Python < 2.7.9
  Version bump to 3.0.1 (issue #772)
  Disable temporary SSL for PlatformIO services // Resolve #772
  Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510)
  Fix menu height for  docs
  Fix issue with multiple archives when linking firmware
  Add migration guide for PIO2 to PIO3
  Search libraries by headers/includes with ``platformio lib search --header`` option
  Update pio run command examples
  Add Unit Testing Demo
  Update PIO Plus badge title and link
  Add PlatformIO Plus badge
  Add links to PlatformIO Plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants