Skip to content

Commit 28b0525

Browse files
author
James Foster
committed
WIP: runs unit tests.
1 parent 5351b02 commit 28b0525

File tree

17 files changed

+163
-12
lines changed

17 files changed

+163
-12
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
unittest:
2+
platforms:
3+
- mega2560
4+
# libraries:
5+
# - "Ethernet"
6+
7+
compile:
8+
platforms:
9+
- mega2560
10+
# libraries:
11+
# - "Ethernet"

SampleProjects/NetworkLib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.bundle

SampleProjects/NetworkLib/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source 'https://rubygems.org'
2+
gem 'arduino_ci', path: '../../'

SampleProjects/NetworkLib/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# NetworkLib
2+
3+
This is an example of a library that depends on Ethernet.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Ethernet
2+
version=0.1.0
3+
author=James Foster <[email protected]>
4+
maintainer=James Foster <[email protected]>
5+
sentence=Sample Ethernet library to validate Client/Server mocks
6+
paragraph=Sample Ethernet library to validate Client/Server mocks
7+
category=Other
8+
url=https://github.com/Arduino-CI/arduino_ci/SampleProjects/Ethernet
9+
architectures=avr,esp8266
10+
includes=NetworkLib.h
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
cd "$( dirname "${BASH_SOURCE[0]}" )"
4+
cd ../src
5+
rm -rf Ethernet > /dev/null 2>&1
6+
# get Ethernet library
7+
git clone https://github.com/arduino-libraries/Ethernet.git
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "Ethernet.h"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#pragma once
2+
3+
#include <Arduino.h>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
cd SampleProjects/Ethernet
3+
bundle config --local path vendor/bundle
4+
bundle install
5+
bundle exec arduino_ci_remote.rb --skip-compilation
6+
# bundle exec arduino_ci_remote.rb --skip-examples-compilation
7+
*/
8+
9+
#include <ArduinoUnitTests.h>
10+
#include <Arduino.h>
11+
12+
unittest(test) {
13+
assertTrue(true);
14+
}
15+
16+
unittest_main()

cpp/arduino/Arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Where possible, variable names from the Arduino library are used to avoid confli
99

1010
#include "ArduinoDefines.h"
1111

12+
#include "IPAddress.h"
1213
#include "WCharacter.h"
1314
#include "WString.h"
1415
#include "Print.h"

0 commit comments

Comments
 (0)