Skip to content

Commit 7ae62ae

Browse files
committed
Fix unit tests for source directory exclusion
1 parent acf84ee commit 7ae62ae

File tree

12 files changed

+95
-33
lines changed

12 files changed

+95
-33
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
unittest:
2+
exclude_dirs:
3+
- src/excludeThis
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ExcludeSomething
2+
3+
This example exists to test directory-exclusion code of ArduinoCI
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=TestSomething
2+
version=0.1.0
3+
author=Ian Katz <[email protected]>
4+
maintainer=Ian Katz <[email protected]>
5+
sentence=Arduino CI unit test example
6+
paragraph=A skeleton library demonstrating file exclusion
7+
category=Other
8+
url=https://github.com/Arduino-CI/arduino_ci/SampleProjects/ExcludeSomething
9+
architectures=avr,esp8266
10+
includes=do-something.h
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#include "exclude-something.h"
2+
int excludeSomething(void) {
3+
return -1;
4+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#pragma once
2+
#include <Arduino.h>
3+
int excludeSomething(void);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This file intentionally contains syntactically incorrect code
2+
to break unit test compilation. If arduino_ci is working
3+
properly, it should exclude this file (as per .arduino-ci.yml
4+
configuration) and unit test compilation should succeed.
5+
6+
~!@#$%^&*()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This file intentionally contains syntactically incorrect code
2+
to break unit test compilation. If arduino_ci is working
3+
properly, it should exclude this file (as per .arduino-ci.yml
4+
configuration) and unit test compilation should succeed.
5+
6+
~!@#$%^&*()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <ArduinoUnitTests.h>
2+
3+
unittest(nothing)
4+
{
5+
}
6+
7+
unittest_main()

SampleProjects/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Because of this, these projects include some intentional quirks that differ from
1212
* "OnePointFiveMalformed" is a non-functional library meant to test file inclusion logic on libraries that attempt to conform to the ["1.5" specfication](https://arduino.github.io/arduino-cli/latest/library-specification/) but fail to include a `src` directory
1313
* "OnePointFiveDummy" is a non-functional library meant to test file inclusion logic on libraries conforming to the ["1.5" specfication](https://arduino.github.io/arduino-cli/latest/library-specification/)
1414
* "DependOnSomething" is a non-functional library meant to test file inclusion logic with dependencies
15+
* "ExcludeSomething" is a non-functional library meant to test directory exclusion logic

SampleProjects/TestSomething/.arduino-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
unittest:
2-
exclude_dirs:
3-
- src/excludeThis
42
platforms:
53
- uno
64
- due

0 commit comments

Comments
 (0)