ceedling 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -85,3 +85,34 @@ desc "Update versions"
85
85
  task :update_revs do
86
86
  update_revisions
87
87
  end
88
+
89
+ def test_project(name, ceedling_command, tasks)
90
+ cd('stage/') do
91
+ rm_rf(name)
92
+ puts "=" * 40
93
+ puts "Testing #{name}"
94
+ puts "=" * 40
95
+ rm_rf(name)
96
+ sh "ceedling #{ceedling_command}"
97
+ cd(name){sh("rake #{tasks.join(' ')}")}
98
+ puts ""
99
+ puts "Testing of #{name} successful!"
100
+ puts "=" * 40
101
+ end
102
+ end
103
+
104
+ desc "Test bundled projects"
105
+ task :test_projects => [:install] do
106
+ rm_rf("stage/")
107
+ mkdir('stage/')
108
+
109
+ # test the skeleton project
110
+ test_project('skeleton', 'new skeleton', ['version', 'test:all'])
111
+
112
+ # test all of the bundled examples
113
+ examples = nil
114
+ cd("examples/"){examples = Dir['*/']}
115
+ examples.each do |ex_name|
116
+ test_project(ex_name, "example #{ex_name}", ['version', 'default'])
117
+ end
118
+ end
Binary file
@@ -3,6 +3,4 @@
3
3
 
4
4
  void BlinkTask(void);
5
5
 
6
-
7
-
8
- #endif
6
+ #endif
@@ -1,13 +1,11 @@
1
1
  #include "Configure.h"
2
2
  #include "main.h"
3
3
  #ifdef TEST
4
- #define LOOP
5
4
  #include "stub_io.h"
6
5
  #include "stub_interrupt.h"
7
6
  #else
8
7
  #include <avr/interrupt.h>
9
8
  #include <avr/io.h>
10
- #define LOOP while(1)
11
9
  #endif // TEST
12
10
 
13
11
  /* setup timer 0 to divide bus clock by 64.
@@ -55,7 +55,6 @@
55
55
  */
56
56
 
57
57
  // #if defined(__DOXYGEN__)
58
- #if 1
59
58
  /** \def sei()
60
59
  \ingroup avr_interrupts
61
60
 
@@ -64,13 +63,13 @@
64
63
  Enables interrupts by setting the global interrupt mask. This function
65
64
  actually compiles into a single line of assembly, so there is no function
66
65
  call overhead. */
67
- #define sei()
68
- #else /* !DOXYGEN */
69
- # define sei() __asm__ __volatile__ ("sei" ::)
70
- #endif /* DOXYGEN */
66
+ // #define sei()
67
+ void sei(void); // Redefine the macro as a function so that it can be mocked by CMock
68
+ // #else /* !DOXYGEN */
69
+ // # define sei() __asm__ __volatile__ ("sei" ::)
70
+ // #endif /* DOXYGEN */
71
71
 
72
72
  // #if defined(__DOXYGEN__)
73
- #if 1
74
73
  /** \def cli()
75
74
  \ingroup avr_interrupts
76
75
 
@@ -79,17 +78,17 @@
79
78
  Disables all interrupts by clearing the global interrupt mask. This function
80
79
  actually compiles into a single line of assembly, so there is no function
81
80
  call overhead. */
82
- #define cli()
83
- #else /* !DOXYGEN */
84
- # define cli() __asm__ __volatile__ ("cli" ::)
85
- #endif /* DOXYGEN */
81
+ // #define cli()
82
+ void cli(void); // Redefine the macro as a function so that it can be mocked by CMock
83
+ // #else /* !DOXYGEN */
84
+ // # define cli() __asm__ __volatile__ ("cli" ::)
85
+ // #endif /* DOXYGEN */
86
86
 
87
87
 
88
88
  /** \name Macros for writing interrupt handler functions */
89
89
 
90
90
 
91
91
  // #if defined(__DOXYGEN__)
92
- #if 1
93
92
  /** \def ISR(vector [, attributes])
94
93
  \ingroup avr_interrupts
95
94
 
@@ -112,25 +111,25 @@
112
111
  */
113
112
  // # define ISR(vector, [attributes])
114
113
  #define ISR void ISR
115
- #else /* real code */
116
-
117
- #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
118
- # define __INTR_ATTRS used, externally_visible
119
- #else /* GCC < 4.1 */
120
- # define __INTR_ATTRS used
121
- #endif
122
-
123
- #ifdef __cplusplus
124
- # define ISR(vector, ...) \
125
- extern "C" void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
126
- void vector (void)
127
- #else
128
- # define ISR(vector, ...) \
129
- void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
130
- void vector (void)
131
- #endif
132
-
133
- #endif /* DOXYGEN */
114
+ // #else /* real code */
115
+
116
+ // #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
117
+ // # define __INTR_ATTRS used, externally_visible
118
+ // #else /* GCC < 4.1 */
119
+ // # define __INTR_ATTRS used
120
+ // #endif
121
+
122
+ // #ifdef __cplusplus
123
+ // # define ISR(vector, ...) \
124
+ // extern "C" void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
125
+ // void vector (void)
126
+ // #else
127
+ // # define ISR(vector, ...) \
128
+ // void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
129
+ // void vector (void)
130
+ // #endif
131
+
132
+ // #endif /* DOXYGEN */
134
133
 
135
134
  #if defined(__DOXYGEN__)
136
135
  /** \def SIGNAL(vector)
@@ -2,14 +2,20 @@
2
2
  #include "BlinkTask.h"
3
3
  #include "stub_io.h"
4
4
 
5
- void setUp(void) {
5
+ // every test file requires this function
6
+ // setUp() is called by the generated runner before each test case function
7
+ void setUp(void)
8
+ {
6
9
  PORTB = 0;
7
- } // every test file requires this function;
8
- // setUp() is called by the generated runner before each test case function
9
- void tearDown(void) {} // every test file requires this function;
10
- // tearDown() is called by the generated runner before each test case function
10
+ }
11
+
12
+ // every test file requires this function
13
+ // tearDown() is called by the generated runner before each test case function
14
+ void tearDown(void)
15
+ {
16
+ }
11
17
 
12
- void test_BlinkTask_should_toggle_led(void) //Reqs:
18
+ void test_BlinkTask_should_toggle_led(void)
13
19
  {
14
20
  /* Ensure known test state */
15
21
 
@@ -21,7 +27,7 @@ void test_BlinkTask_should_toggle_led(void) //Reqs:
21
27
  /* Verify test results */
22
28
  TEST_ASSERT_EQUAL(0x20, PORTB);
23
29
  }
24
- void test_BlinkTask_should_toggle_led_LOW(void) //Reqs:
30
+ void test_BlinkTask_should_toggle_led_LOW(void)
25
31
  {
26
32
  /* Ensure known test state */
27
33
  PORTB = 0x20;
@@ -1,6 +1,7 @@
1
1
  #include "unity.h"
2
2
  #include "Configure.h"
3
3
  #include "stub_io.h"
4
+ #include "mock_stub_interrupt.h"
4
5
 
5
6
  void setUp(void)
6
7
  {
@@ -10,14 +11,14 @@ void tearDown(void)
10
11
  {
11
12
  }
12
13
 
13
- void test_Configure_should_setup_timer_and_port(void) //Reqs:
14
- {
14
+ void test_Configure_should_setup_timer_and_port(void)
15
+ {
15
16
  /* Ensure known test state */
16
17
 
17
18
  /* Setup expected call chain */
18
19
  //these are defined into assembly instructions.
19
- // cli_Expect();
20
- // sei_Expect();
20
+ cli_Expect();
21
+ sei_Expect();
21
22
  /* Call function under test */
22
23
  Configure();
23
24
 
@@ -8,7 +8,7 @@ void setUp(void) {} // every test file requires this function;
8
8
  void tearDown(void) {} // every test file requires this function;
9
9
  // tearDown() is called by the generated runner before each test case function
10
10
 
11
- void test_AppMain_should_call_configure(void) //Reqs:
11
+ void test_AppMain_should_call_configure(void)
12
12
  {
13
13
  /* Ensure known test state */
14
14
  BlinkTaskReady=0;
@@ -20,7 +20,7 @@ void test_AppMain_should_call_configure(void) //Reqs:
20
20
  /* Verify test results */
21
21
  TEST_ASSERT_EQUAL(0, BlinkTaskReady);
22
22
  }
23
- void test_AppMain_should_call_configure_and_BlinkTask(void) //Reqs:
23
+ void test_AppMain_should_call_configure_and_BlinkTask(void)
24
24
  {
25
25
  /* Ensure known test state */
26
26
  BlinkTaskReady=1;
@@ -33,7 +33,7 @@ void test_AppMain_should_call_configure_and_BlinkTask(void) //Reqs:
33
33
  /* Verify test results */
34
34
  TEST_ASSERT_EQUAL(0, BlinkTaskReady);
35
35
  }
36
- void test_ISR_should_increment_tick(void) //Reqs:
36
+ void test_ISR_should_increment_tick(void)
37
37
  {
38
38
  /* Ensure known test state */
39
39
  tick = 0;
@@ -45,7 +45,7 @@ void test_ISR_should_increment_tick(void) //Reqs:
45
45
  /* Verify test results */
46
46
  TEST_ASSERT_EQUAL(1, tick);
47
47
  }
48
- void test_ISR_should_set_blinkReady_increment_tick(void) //Reqs:
48
+ void test_ISR_should_set_blinkReady_increment_tick(void)
49
49
  {
50
50
  /* Ensure known test state */
51
51
  tick = 1000;
@@ -1,4 +1,6 @@
1
1
  PROJECT_ROOT = File.expand_path(File.dirname(__FILE__))
2
2
  PROJECT_TOOLS = 'vendor'
3
3
 
4
- load 'vendor/ceedling/lib/rakefile.rb'
4
+ load 'vendor/ceedling/lib/rakefile.rb'
5
+
6
+ task :default => ['test:all']
@@ -2,7 +2,7 @@
2
2
  module Ceedling
3
3
  module Version
4
4
  # @private
5
- GEM = "0.12.0"
5
+ GEM = "0.12.1"
6
6
 
7
7
  # @private
8
8
  CEEDLING = "0.10.226"
@@ -2,7 +2,7 @@
2
2
  module Ceedling
3
3
  module Version
4
4
  # @private
5
- GEM = "0.12.0"
5
+ GEM = "0.12.1"
6
6
 
7
7
  # @private
8
8
  CEEDLING = "<%= versions["CEEDLING"] %>"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 12
8
- - 0
9
- version: 0.12.0
8
+ - 1
9
+ version: 0.12.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Karlesky, Mark VanderVoord
@@ -67,6 +67,7 @@ files:
67
67
  - bin/ceedling
68
68
  - ceedling-gem.sublime-project
69
69
  - ceedling.gemspec
70
+ - examples/blinky/.DS_Store
70
71
  - examples/blinky/project.yml
71
72
  - examples/blinky/rakefile.rb
72
73
  - examples/blinky/src/BlinkTask.c