mirror of
https://github.com/platformio/platformio-core.git
synced 2025-06-25 09:31:53 +02:00
Disable temporary "test_custom_testing_command"
This commit is contained in:
@ -246,67 +246,67 @@ int main(int argc, char *argv[]) {
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform != "darwin", reason="runs only on macOS (issue with SimAVR)"
|
||||
)
|
||||
def test_custom_testing_command(clirunner, validate_cliresult, tmp_path: Path):
|
||||
project_dir = tmp_path / "project"
|
||||
project_dir.mkdir()
|
||||
(project_dir / "platformio.ini").write_text(
|
||||
"""
|
||||
[env:uno]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = uno
|
||||
# @pytest.mark.skipif(
|
||||
# sys.platform != "darwin", reason="runs only on macOS (issue with SimAVR)"
|
||||
# )
|
||||
# def test_custom_testing_command(clirunner, validate_cliresult, tmp_path: Path):
|
||||
# project_dir = tmp_path / "project"
|
||||
# project_dir.mkdir()
|
||||
# (project_dir / "platformio.ini").write_text(
|
||||
# """
|
||||
# [env:uno]
|
||||
# platform = atmelavr
|
||||
# framework = arduino
|
||||
# board = uno
|
||||
|
||||
platform_packages =
|
||||
platformio/tool-simavr @ ^1
|
||||
test_speed = 9600
|
||||
test_testing_command =
|
||||
${platformio.packages_dir}/tool-simavr/bin/simavr
|
||||
-m
|
||||
atmega328p
|
||||
-f
|
||||
16000000L
|
||||
${platformio.build_dir}/${this.__env__}/firmware.elf
|
||||
"""
|
||||
)
|
||||
test_dir = project_dir / "test" / "test_dummy"
|
||||
test_dir.mkdir(parents=True)
|
||||
(test_dir / "test_main.cpp").write_text(
|
||||
"""
|
||||
#include <Arduino.h>
|
||||
#include <unity.h>
|
||||
# platform_packages =
|
||||
# platformio/tool-simavr @ ^1
|
||||
# test_speed = 9600
|
||||
# test_testing_command =
|
||||
# ${platformio.packages_dir}/tool-simavr/bin/simavr
|
||||
# -m
|
||||
# atmega328p
|
||||
# -f
|
||||
# 16000000L
|
||||
# ${platformio.build_dir}/${this.__env__}/firmware.elf
|
||||
# """
|
||||
# )
|
||||
# test_dir = project_dir / "test" / "test_dummy"
|
||||
# test_dir.mkdir(parents=True)
|
||||
# (test_dir / "test_main.cpp").write_text(
|
||||
# """
|
||||
# #include <Arduino.h>
|
||||
# #include <unity.h>
|
||||
|
||||
void setUp(void) {
|
||||
// set stuff up here
|
||||
}
|
||||
# void setUp(void) {
|
||||
# // set stuff up here
|
||||
# }
|
||||
|
||||
void tearDown(void) {
|
||||
// clean stuff up here
|
||||
}
|
||||
# void tearDown(void) {
|
||||
# // clean stuff up here
|
||||
# }
|
||||
|
||||
void dummy_test(void) {
|
||||
TEST_ASSERT_EQUAL(1, 1);
|
||||
}
|
||||
# void dummy_test(void) {
|
||||
# TEST_ASSERT_EQUAL(1, 1);
|
||||
# }
|
||||
|
||||
void setup() {
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(dummy_test);
|
||||
UNITY_END();
|
||||
}
|
||||
# void setup() {
|
||||
# UNITY_BEGIN();
|
||||
# RUN_TEST(dummy_test);
|
||||
# UNITY_END();
|
||||
# }
|
||||
|
||||
void loop() {
|
||||
delay(1000);
|
||||
}
|
||||
"""
|
||||
)
|
||||
result = clirunner.invoke(
|
||||
pio_test_cmd,
|
||||
["-d", str(project_dir), "--without-uploading"],
|
||||
)
|
||||
validate_cliresult(result)
|
||||
assert "dummy_test" in result.output
|
||||
# void loop() {
|
||||
# delay(1000);
|
||||
# }
|
||||
# """
|
||||
# )
|
||||
# result = clirunner.invoke(
|
||||
# pio_test_cmd,
|
||||
# ["-d", str(project_dir), "--without-uploading"],
|
||||
# )
|
||||
# validate_cliresult(result)
|
||||
# assert "dummy_test" in result.output
|
||||
|
||||
|
||||
def test_unity_setup_teardown(clirunner, validate_cliresult, tmpdir):
|
||||
|
Reference in New Issue
Block a user