tests: make generic kernel tests unified

Tests that do not use any of the legacy kernel APIs can be moved to unified
kernel to avoid double testing.

Change-Id: Ic2353feb23ee20d9d93f5459432d3b3739df8e03
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2016-10-29 21:32:20 -04:00
parent be4fe7f4e5
commit 90937df6e9
47 changed files with 36 additions and 244 deletions

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
include $(ZEPHYR_BASE)/Makefile.inc

View file

@ -1,3 +1,3 @@
[test]
tags = core unified_capable
kernel = nano
tags = core
kernel = unified

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
include $(ZEPHYR_BASE)/Makefile.inc

View file

@ -1,5 +1,5 @@
[test]
tags = core bat_commit unified_capable
tags = core bat_commit
# FIXME not implemented
arch_exclude = arm
kernel = nano
kernel = unified

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE ?= debug.conf
SOURCE_DIR = $(ZEPHYR_BASE)/samples/synchronization/nanokernel/src/

View file

@ -1,5 +1,4 @@
BOARD ?= qemu_x86
MDEF_FILE = prj.mdef
KERNEL_TYPE ?= unified
CONF_FILE = prj.conf

View file

@ -1,5 +0,0 @@
% Application : Byteorder helper test
% TASK NAME PRIO ENTRY STACK GROUPS
% ===================================================
TASK MAIN 7 main 2048 [EXE]

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_nios2
CONF_FILE = prj.conf

View file

@ -1,4 +1,3 @@
[test]
tags = core unified_capable
kernel = nano
arch_whitelist = nios2
tags = core
kernel = unified

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,3 +1,3 @@
[test]
tags = core unified_capable
kernel = nano
tags = core
kernel = unified

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
include $(ZEPHYR_BASE)/Makefile.inc

View file

@ -1,3 +1,3 @@
[test]
tags = core unified_capable
kernel = nano
tags = core
kernel = unified

View file

@ -15,8 +15,7 @@
# limitations under the License.
#
MDEF_FILE = prj.mdef
KERNEL_TYPE = micro
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,6 +0,0 @@
% Application : test random number APIs
% TASK NAME PRIO ENTRY STACK GROUPS
% =======================================================
TASK tTestTask 5 RegressionTaskEntry 2048 [EXE]

View file

@ -35,7 +35,7 @@
* @return N/A
*/
void RegressionTaskEntry(void)
void main(void)
{
int tc_result; /* test result code */
uint32_t rnd_values[N_VALUES];

View file

@ -1,3 +1,3 @@
[test]
tags = core bat_commit unified_capable
kernel = micro
tags = core bat_commit
kernel = unified

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,4 +1,4 @@
[test]
tags = core unified_capable
tags = core
# On ARC, it needs more time
timeout = 180

View file

@ -1,4 +1,4 @@
KERNEL_TYPE = nano
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,2 +1,2 @@
[test]
tags = core unified_capable
tags = core

View file

@ -1,5 +1,4 @@
MDEF_FILE = prj.mdef
KERNEL_TYPE = micro
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,5 +0,0 @@
% Application : test microkernel task APIs
% TASK NAME PRIO ENTRY STACK GROUPS
% =================================================
TASK RT_TASKID 10 RegressionTask 2048 [EXE]

View file

@ -1,5 +0,0 @@
[test]
tags = core unified_capable
kernel = micro
filter = not CONFIG_CPU_MINUTEIA

View file

@ -706,7 +706,7 @@ int sprintfStringTest(void)
* @return N/A
*/
void RegressionTask(void)
void main(void)
{
int status = TC_PASS;

View file

@ -0,0 +1,5 @@
[test]
tags = core
kernel = unified
filter = not CONFIG_CPU_MINUTEIA

View file

@ -1,5 +1,4 @@
MDEF_FILE = prj.mdef
KERNEL_TYPE = micro
KERNEL_TYPE = unified
BOARD ?= qemu_x86
CONF_FILE = prj.conf

View file

@ -1,5 +0,0 @@
% Application : test XIP
% TASK NAME PRIO ENTRY STACK GROUPS
% =====================================================
TASK tStartTask 5 RegressionTaskEntry 1024 [EXE]

View file

@ -1,3 +0,0 @@
[test]
tags = core bat_commit unified_capable
kernel = micro

View file

@ -1,5 +0,0 @@
KERNEL_TYPE = nano
BOARD ?= qemu_x86
CONF_FILE = prj.conf
include $(ZEPHYR_BASE)/Makefile.inc

View file

@ -1,37 +0,0 @@
Title: Execute in Place (XIP) Support
Description:
This test verifies XIP is working in the nanokernel.
--------------------------------------------------------------------------------
Building and Running Project:
This nanokernel project outputs to the console. It can be built and executed
on QEMU as follows:
make qemu
--------------------------------------------------------------------------------
Troubleshooting:
Problems caused by out-dated project information can be addressed by
issuing one of the following commands then rebuilding the project:
make clean # discard results of previous builds
# but keep existing configuration info
or
make pristine # discard results of previous builds
# and restore pre-defined configuration info
--------------------------------------------------------------------------------
Sample Output:
Starting XIP tests
===================================================================
Test globals
===================================================================
PROJECT EXECUTION SUCCESSFUL

View file

@ -1 +0,0 @@
CONFIG_XIP=y

View file

@ -1,3 +0,0 @@
ccflags-y += -I${ZEPHYR_BASE}/tests/include
obj-y = test_xip.o test_xip_helper.o

View file

@ -1,35 +0,0 @@
/* test.h - XIP test header */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
DESCRIPTION
This header contains defines, externs etc. for the XIP
regression test.
*/
/* This test relies on these values being one larger than the one before */
#define TEST_VAL_1 0x1
#define TEST_VAL_2 0x2
#define TEST_VAL_3 0x3
#define TEST_VAL_4 0x4
#define XIP_TEST_ARRAY_SZ 4
extern uint32_t xip_array[XIP_TEST_ARRAY_SZ];

View file

@ -1,65 +0,0 @@
/* test_xip.c - test XIP */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
DESCRIPTION
This module tests that XIP performs as expected. If the first
task is even activated that is a good indication that XIP is
working. However, the test does do some some testing on
global variables for completeness sake.
*/
#include <zephyr.h>
#include <tc_util.h>
#include "test.h"
/**
*
* @brief Main task entry point
*
* Entry point for nanokernel only builds.
*
* @return N/A
*/
void main(void)
{
int tcRC = TC_PASS;
int i;
PRINT_DATA("Starting XIP tests\n");
PRINT_LINE;
/* Test globals are correct */
TC_PRINT("Test globals\n");
/* Array should be filled with monotomically incrementing values */
for (i = 0; i < XIP_TEST_ARRAY_SZ; i++) {
if (xip_array[i] != (i+1)) {
TC_PRINT("xip_array[%d] != %d\n", i, i+1);
tcRC = TC_FAIL;
goto exitRtn;
}
}
exitRtn:
TC_END_RESULT(tcRC);
TC_END_REPORT(tcRC);
}

View file

@ -1,33 +0,0 @@
/* test_xip_helper.c - XIP helper module */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
DESCRIPTION
This module contains support code for the XIP regression
test.
*/
#include <zephyr.h>
#include "test.h"
/*
* This array is deliberately defined outside of the scope of the main test
* module to avoid optimization issues.
*/
uint32_t xip_array[XIP_TEST_ARRAY_SZ] = {
TEST_VAL_1, TEST_VAL_2, TEST_VAL_3, TEST_VAL_4};

View file

@ -1,3 +0,0 @@
[test]
tags = core unified_capable

View file

@ -36,7 +36,7 @@ global variables for completeness sake.
* @return N/A
*/
void RegressionTaskEntry(void)
void main(void)
{
int tcRC = TC_PASS;
int i;

View file

@ -0,0 +1,3 @@
[test]
tags = core bat_commit
kernel = unified