tests: drivers: build_all: split xlnx pwm/counter test out
Move xlnx pwm/counter tests to their own directories. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
a6b1f6c618
commit
c8205c41ba
8
tests/drivers/build_all/counter/CMakeLists.txt
Normal file
8
tests/drivers/build_all/counter/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.1)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Henrik Brix Andersen <henrik@brixandersen.dk>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
counter0: counter@88888888 {
|
||||
compatible = "xlnx,xps-timer-1.00.a";
|
||||
reg = <0x88888888 0x10000>;
|
||||
interrupt-parent = <&nvic>;
|
||||
interrupts = <4 0>;
|
||||
clock-frequency = <100000000>;
|
||||
xlnx,count-width = <0x20>;
|
||||
xlnx,gen0-assert = <0x1>;
|
||||
xlnx,gen1-assert = <0x1>;
|
||||
xlnx,one-timer-only = <0x0>;
|
||||
xlnx,trig0-assert = <0x1>;
|
||||
xlnx,trig1-assert = <0x1>;
|
||||
label = "COUNTER_0";
|
||||
};
|
||||
};
|
3
tests/drivers/build_all/counter/prj.conf
Normal file
3
tests/drivers/build_all/counter/prj.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_COUNTER=y
|
29
tests/drivers/build_all/counter/src/main.c
Normal file
29
tests/drivers/build_all/counter/src/main.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <sys/printk.h>
|
||||
#include <device.h>
|
||||
|
||||
|
||||
/*
|
||||
* @file
|
||||
* @brief Hello World demo
|
||||
*/
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printk("Hello World!\n");
|
||||
}
|
||||
|
||||
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
|
||||
/* Fake GPIO device, needed for building drivers that use DEVICE_DT_GET()
|
||||
* to access GPIO controllers.
|
||||
*/
|
||||
DEVICE_DT_DEFINE(DT_INST(0, vnd_gpio), NULL, NULL, NULL, NULL,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
||||
#endif
|
8
tests/drivers/build_all/counter/testcase.yaml
Normal file
8
tests/drivers/build_all/counter/testcase.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
common:
|
||||
build_only: true
|
||||
tags: drivers
|
||||
tests:
|
||||
drivers.counter.build.xlnx:
|
||||
platform_allow: arty_a7_arm_designstart_m1
|
||||
extra_configs:
|
||||
- CONFIG_COUNTER_XLNX_AXI_TIMER=y
|
8
tests/drivers/build_all/pwm/CMakeLists.txt
Normal file
8
tests/drivers/build_all/pwm/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.1)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
|
@ -5,21 +5,6 @@
|
|||
*/
|
||||
|
||||
/ {
|
||||
counter0: counter@88888888 {
|
||||
compatible = "xlnx,xps-timer-1.00.a";
|
||||
reg = <0x88888888 0x10000>;
|
||||
interrupt-parent = <&nvic>;
|
||||
interrupts = <4 0>;
|
||||
clock-frequency = <100000000>;
|
||||
xlnx,count-width = <0x20>;
|
||||
xlnx,gen0-assert = <0x1>;
|
||||
xlnx,gen1-assert = <0x1>;
|
||||
xlnx,one-timer-only = <0x0>;
|
||||
xlnx,trig0-assert = <0x1>;
|
||||
xlnx,trig1-assert = <0x1>;
|
||||
label = "COUNTER_0";
|
||||
};
|
||||
|
||||
pwm0: pwm@99999999 {
|
||||
compatible = "xlnx,xps-timer-1.00.a-pwm";
|
||||
reg = <0x99999999 0x10000>;
|
3
tests/drivers/build_all/pwm/prj.conf
Normal file
3
tests/drivers/build_all/pwm/prj.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_PWM=y
|
29
tests/drivers/build_all/pwm/src/main.c
Normal file
29
tests/drivers/build_all/pwm/src/main.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <sys/printk.h>
|
||||
#include <device.h>
|
||||
|
||||
|
||||
/*
|
||||
* @file
|
||||
* @brief Hello World demo
|
||||
*/
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printk("Hello World!\n");
|
||||
}
|
||||
|
||||
#if DT_NODE_EXISTS(DT_INST(0, vnd_gpio))
|
||||
/* Fake GPIO device, needed for building drivers that use DEVICE_DT_GET()
|
||||
* to access GPIO controllers.
|
||||
*/
|
||||
DEVICE_DT_DEFINE(DT_INST(0, vnd_gpio), NULL, NULL, NULL, NULL,
|
||||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
||||
#endif
|
8
tests/drivers/build_all/pwm/testcase.yaml
Normal file
8
tests/drivers/build_all/pwm/testcase.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
common:
|
||||
build_only: true
|
||||
tags: drivers
|
||||
tests:
|
||||
drivers.pwm.build.xlnx:
|
||||
platform_allow: arty_a7_arm_designstart_m1
|
||||
extra_configs:
|
||||
- CONFIG_PWM_XLNX_AXI_TIMER=y
|
|
@ -1,8 +0,0 @@
|
|||
common:
|
||||
depends_on: gpio spi i2c
|
||||
tests:
|
||||
drivers.xlnx.build:
|
||||
build_only: true
|
||||
extra_args: CONF_FILE=xlnx.conf
|
||||
platform_allow: arty_a7_arm_designstart_m1
|
||||
tags: drivers
|
|
@ -1,5 +0,0 @@
|
|||
CONFIG_COUNTER=y
|
||||
CONFIG_COUNTER_XLNX_AXI_TIMER=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_XLNX_AXI_TIMER=y
|
||||
CONFIG_TEST_USERSPACE=y
|
Loading…
Reference in a new issue