Merge branch 'gw/testing' into gateway
- move all tests into native
This commit is contained in:
commit
50b0762604
@ -26,15 +26,6 @@ steps:
|
||||
exclude:
|
||||
- production
|
||||
|
||||
- name: embedded tests
|
||||
commands:
|
||||
- cd gateway
|
||||
- LD_LIBRARY_PATH=~/.platformio/packages/tool-simavr/lib/ pio test -e embedded --without-uploading
|
||||
when:
|
||||
target:
|
||||
exclude:
|
||||
- production
|
||||
|
||||
- name: upload firmware
|
||||
commands:
|
||||
- cd gateway
|
||||
|
||||
@ -32,12 +32,17 @@ check_severity = medium, high
|
||||
|
||||
[env:native]
|
||||
platform = native
|
||||
test_filter = test_native
|
||||
test_filter = native/*
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
bblanchon/ArduinoJson@6.19.4
|
||||
build_flags = -std=c++11
|
||||
|
||||
[env:embedded]
|
||||
platform = atmelavr
|
||||
framework = arduino
|
||||
board = miniatmega328
|
||||
board = pro16MHzatmega328
|
||||
lib_extra_dirs =
|
||||
../libraries
|
||||
lib_deps =
|
||||
@ -54,4 +59,4 @@ test_testing_command =
|
||||
-f
|
||||
16000000L
|
||||
${platformio.build_dir}/${this.__env__}/firmware.elf
|
||||
test_filter = test_embedded
|
||||
test_filter = embedded/*
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#define RECEIVE_PIN 2
|
||||
|
||||
|
||||
RCSwitch mySwitch = RCSwitch();
|
||||
RCSwitch mySwitch;
|
||||
SerialReader<200> serialReader;
|
||||
|
||||
void setup() {
|
||||
|
||||
18
gateway/test/embedded/test_dummy/dummy.cpp
Normal file
18
gateway/test/embedded/test_dummy/dummy.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <Arduino.h>
|
||||
#include <unity.h>
|
||||
|
||||
void setUp(void) {
|
||||
// set stuff up here
|
||||
}
|
||||
|
||||
void tearDown(void) {
|
||||
// clean stuff up here
|
||||
}
|
||||
|
||||
void setup() {
|
||||
UNITY_BEGIN();
|
||||
UNITY_END();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
||||
@ -1,4 +1,3 @@
|
||||
#include <Arduino.h>
|
||||
#include <unity.h>
|
||||
#include "TinyComponent.h"
|
||||
|
||||
@ -98,7 +97,7 @@ void test_oil_sensor_with_voltage(void) {
|
||||
TEST_ASSERT_EQUAL(2.847, diagnostic["voltage"]);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
int main(int argc, char **argv) {
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(test_unknown_sensor_type);
|
||||
RUN_TEST(test_max_temp);
|
||||
@ -110,7 +109,6 @@ void setup() {
|
||||
RUN_TEST(test_oil_sensor);
|
||||
RUN_TEST(test_oil_sensor_with_voltage);
|
||||
UNITY_END();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
return 0;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user