mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Generate "test" directory per project
This commit is contained in:
@ -8,7 +8,8 @@ PlatformIO 3.0
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Generate an `include <http://docs.platformio.org/page/projectconf/section_platformio.html#include-dir>`__
|
||||
directory with a README file when initializing a new project
|
||||
and `test <http://docs.platformio.org/page/projectconf/section_platformio.html#test-dir>`__
|
||||
directories with a README file when initializing a new project
|
||||
* Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `“platformio.ini” (Project Configuration File) <https://docs.platformio.org/page/projectconf.html>`__
|
||||
* Improved `PIO Unified Debugger <https://docs.platformio.org/en/page/plus/debugging.html>`__
|
||||
for "mbed" framework and fixed issue with missed local variables
|
||||
|
2
docs
2
docs
Submodule docs updated: 66c067cab8...3c9ceca1df
@ -290,8 +290,7 @@ def ProcessDebug(env):
|
||||
env.Replace(PIODEBUGFLAGS=["-Og", "-g3", "-ggdb3"])
|
||||
env.Append(
|
||||
PIODEBUGFLAGS=["-D__PLATFORMIO_DEBUG__"],
|
||||
BUILD_FLAGS=env.get("PIODEBUGFLAGS", [])
|
||||
)
|
||||
BUILD_FLAGS=env.get("PIODEBUGFLAGS", []))
|
||||
unflags = ["-Os"]
|
||||
for level in [0, 1, 2]:
|
||||
for flag in ("O", "g", "ggdb"):
|
||||
|
@ -78,12 +78,12 @@ def cli(
|
||||
|
||||
click.echo("The next files/directories have been created in %s" %
|
||||
click.style(project_dir, fg="cyan"))
|
||||
click.echo("%s - Put your header files here" % click.style(
|
||||
click.echo("%s - Put project header files here" % click.style(
|
||||
"include", fg="cyan"))
|
||||
click.echo("%s - Put here project specific (private) libraries" %
|
||||
click.style("lib", fg="cyan"))
|
||||
click.echo(
|
||||
"%s - Put your source files here" % click.style("src", fg="cyan"))
|
||||
click.echo("%s - Put project source files here" % click.style(
|
||||
"src", fg="cyan"))
|
||||
click.echo("%s - Project Configuration File" % click.style(
|
||||
"platformio.ini", fg="cyan"))
|
||||
|
||||
@ -156,6 +156,7 @@ def init_base_project(project_dir):
|
||||
(util.get_projectsrc_dir(), None),
|
||||
(util.get_projectinclude_dir(), init_include_readme),
|
||||
(util.get_projectlib_dir(), init_lib_readme),
|
||||
(util.get_projecttest_dir(), init_test_readme),
|
||||
]
|
||||
for (path, cb) in dir_to_readme:
|
||||
if isdir(path):
|
||||
@ -260,6 +261,22 @@ More information about PlatformIO Library Dependency Finder
|
||||
""")
|
||||
|
||||
|
||||
def init_test_readme(test_dir):
|
||||
with open(join(test_dir, "README"), "w") as f:
|
||||
f.write("""
|
||||
This directory is intended for PIO Unit Testing and project tests.
|
||||
|
||||
Unit Testing is a software testing method by which individual units of
|
||||
source code, sets of one or more MCU program modules together with associated
|
||||
control data, usage procedures, and operating procedures, are tested to
|
||||
determine whether they are fit for use. Unit testing finds problems early
|
||||
in the development cycle.
|
||||
|
||||
More information about PIO Unit Testing:
|
||||
- https://docs.platformio.org/page/plus/unit-testing.html
|
||||
""")
|
||||
|
||||
|
||||
def init_ci_conf(project_dir):
|
||||
with open(join(project_dir, ".travis.yml"), "w") as f:
|
||||
f.write("""# Continuous Integration (CI) is the practice, in software
|
||||
|
Reference in New Issue
Block a user