mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #1252 from Kijewski/travis-x86
tests/Travis: run unittests on qemu-i386, too
This commit is contained in:
commit
2093df60cd
@ -17,10 +17,12 @@ install:
|
|||||||
- sudo apt-get install gcc-arm-none-eabi
|
- sudo apt-get install gcc-arm-none-eabi
|
||||||
- sudo apt-get install gcc-msp430
|
- sudo apt-get install gcc-msp430
|
||||||
- sudo apt-get install pcregrep libpcre3
|
- sudo apt-get install pcregrep libpcre3
|
||||||
|
- sudo apt-get install qemu-system-x86 python3
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./dist/tools/compile_test/compile_test.py
|
- ./dist/tools/compile_test/compile_test.py
|
||||||
- make -C ./tests/unittests term
|
- make -C ./tests/unittests test BOARD=native
|
||||||
|
- make -C ./tests/unittests test BOARD=qemu-i386
|
||||||
- ./dist/tools/licenses/check.sh master
|
- ./dist/tools/licenses/check.sh master
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
@ -21,23 +21,27 @@
|
|||||||
* @{
|
* @{
|
||||||
*
|
*
|
||||||
* @file
|
* @file
|
||||||
* @brief Placeholder if someone uses x86-multiboot as a board.
|
* @brief Low-power mode emulation for qemu-i386.
|
||||||
*
|
*
|
||||||
* @author René Kijewski <rene.kijewski@fu-berlin.de>
|
* @author René Kijewski <rene.kijewski@fu-berlin.de>
|
||||||
*
|
*
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <lpm.h>
|
#include "lpm.h"
|
||||||
|
#include "x86_reboot.h"
|
||||||
|
|
||||||
void lpm_init(void)
|
void lpm_init(void)
|
||||||
{
|
{
|
||||||
// void
|
/* void */
|
||||||
}
|
}
|
||||||
|
|
||||||
enum lpm_mode lpm_set(enum lpm_mode target)
|
enum lpm_mode lpm_set(enum lpm_mode target)
|
||||||
{
|
{
|
||||||
if (target != LPM_ON) {
|
if (target != LPM_ON) {
|
||||||
|
if (target == LPM_POWERDOWN) {
|
||||||
|
x86_shutdown();
|
||||||
|
}
|
||||||
asm volatile ("hlt");
|
asm volatile ("hlt");
|
||||||
}
|
}
|
||||||
return LPM_UNKNOWN;
|
return LPM_UNKNOWN;
|
||||||
@ -45,15 +49,15 @@ enum lpm_mode lpm_set(enum lpm_mode target)
|
|||||||
|
|
||||||
void lpm_awake(void)
|
void lpm_awake(void)
|
||||||
{
|
{
|
||||||
// void
|
/* void */
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpm_begin_awake(void)
|
void lpm_begin_awake(void)
|
||||||
{
|
{
|
||||||
// void
|
/* void */
|
||||||
}
|
}
|
||||||
|
|
||||||
void lpm_end_awake(void)
|
void lpm_end_awake(void)
|
||||||
{
|
{
|
||||||
// void
|
/* void */
|
||||||
}
|
}
|
||||||
|
@ -40,3 +40,9 @@ ifeq (, $(UNIT_TESTS))
|
|||||||
else
|
else
|
||||||
CFLAGS += -DTEST_SUITES='$(subst $() $(),$(charCOMMA),$(UNIT_TESTS:tests-%=%))'
|
CFLAGS += -DTEST_SUITES='$(subst $() $(),$(charCOMMA),$(UNIT_TESTS:tests-%=%))'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
test: SHELL=bash
|
||||||
|
test:
|
||||||
|
@exec 5>&1 && \
|
||||||
|
LOG=$$("$(MAKE)" -s term | tee >(cat - >&5)) && \
|
||||||
|
grep 'OK ([1-9][0-9]* tests)' <<< $${LOG} > /dev/null
|
||||||
|
@ -31,11 +31,6 @@ int main(void)
|
|||||||
#endif
|
#endif
|
||||||
TESTS_END();
|
TESTS_END();
|
||||||
|
|
||||||
#if defined (BOARD_NATIVE) && !defined (OUTPUT)
|
|
||||||
void _exit(int);
|
|
||||||
_exit(TestRunnerHadErrors);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lpm_set(LPM_POWERDOWN);
|
lpm_set(LPM_POWERDOWN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user