From cfed344ddaaa4f3c17e4e9a7b1ce94166fd4b56d Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Sat, 24 Oct 2015 00:59:38 +0100 Subject: [PATCH] utest - fix backslash in the utest paths --- .../utest/source/case.cpp | 0 .../utest/source/default_handlers.cpp | 0 .../utest/source/greentea_handlers.cpp | 0 .../utest/source/harness.cpp | 0 .../utest/source/types.cpp | 0 .../utest/source/unity_handler.cpp | 0 .../case.h" => frameworks/utest/utest/case.h | 0 .../utest/utest/default_handlers.h | 0 .../utest/utest/harness.h | 0 .../utest/utest/scheduler.h | 0 .../shim.h" => frameworks/utest/utest/shim.h | 0 .../utest/utest/specification.h | 0 .../utest/utest/types.h | 0 .../utest/utest/unity_handler.h | 0 .../utest/utest/utest.h | 0 "frameworks\\utest/source/shim.cpp" | 138 ------------------ 16 files changed, 138 deletions(-) rename "frameworks\\utest/source/case.cpp" => frameworks/utest/source/case.cpp (100%) rename "frameworks\\utest/source/default_handlers.cpp" => frameworks/utest/source/default_handlers.cpp (100%) rename "frameworks\\utest/source/greentea_handlers.cpp" => frameworks/utest/source/greentea_handlers.cpp (100%) rename "frameworks\\utest/source/harness.cpp" => frameworks/utest/source/harness.cpp (100%) rename "frameworks\\utest/source/types.cpp" => frameworks/utest/source/types.cpp (100%) rename "frameworks\\utest/source/unity_handler.cpp" => frameworks/utest/source/unity_handler.cpp (100%) rename "frameworks\\utest/utest/case.h" => frameworks/utest/utest/case.h (100%) rename "frameworks\\utest/utest/default_handlers.h" => frameworks/utest/utest/default_handlers.h (100%) rename "frameworks\\utest/utest/harness.h" => frameworks/utest/utest/harness.h (100%) rename "frameworks\\utest/utest/scheduler.h" => frameworks/utest/utest/scheduler.h (100%) rename "frameworks\\utest/utest/shim.h" => frameworks/utest/utest/shim.h (100%) rename "frameworks\\utest/utest/specification.h" => frameworks/utest/utest/specification.h (100%) rename "frameworks\\utest/utest/types.h" => frameworks/utest/utest/types.h (100%) rename "frameworks\\utest/utest/unity_handler.h" => frameworks/utest/utest/unity_handler.h (100%) rename "frameworks\\utest/utest/utest.h" => frameworks/utest/utest/utest.h (100%) delete mode 100644 "frameworks\\utest/source/shim.cpp" diff --git "a/frameworks\\utest/source/case.cpp" b/frameworks/utest/source/case.cpp similarity index 100% rename from "frameworks\\utest/source/case.cpp" rename to frameworks/utest/source/case.cpp diff --git "a/frameworks\\utest/source/default_handlers.cpp" b/frameworks/utest/source/default_handlers.cpp similarity index 100% rename from "frameworks\\utest/source/default_handlers.cpp" rename to frameworks/utest/source/default_handlers.cpp diff --git "a/frameworks\\utest/source/greentea_handlers.cpp" b/frameworks/utest/source/greentea_handlers.cpp similarity index 100% rename from "frameworks\\utest/source/greentea_handlers.cpp" rename to frameworks/utest/source/greentea_handlers.cpp diff --git "a/frameworks\\utest/source/harness.cpp" b/frameworks/utest/source/harness.cpp similarity index 100% rename from "frameworks\\utest/source/harness.cpp" rename to frameworks/utest/source/harness.cpp diff --git "a/frameworks\\utest/source/types.cpp" b/frameworks/utest/source/types.cpp similarity index 100% rename from "frameworks\\utest/source/types.cpp" rename to frameworks/utest/source/types.cpp diff --git "a/frameworks\\utest/source/unity_handler.cpp" b/frameworks/utest/source/unity_handler.cpp similarity index 100% rename from "frameworks\\utest/source/unity_handler.cpp" rename to frameworks/utest/source/unity_handler.cpp diff --git "a/frameworks\\utest/utest/case.h" b/frameworks/utest/utest/case.h similarity index 100% rename from "frameworks\\utest/utest/case.h" rename to frameworks/utest/utest/case.h diff --git "a/frameworks\\utest/utest/default_handlers.h" b/frameworks/utest/utest/default_handlers.h similarity index 100% rename from "frameworks\\utest/utest/default_handlers.h" rename to frameworks/utest/utest/default_handlers.h diff --git "a/frameworks\\utest/utest/harness.h" b/frameworks/utest/utest/harness.h similarity index 100% rename from "frameworks\\utest/utest/harness.h" rename to frameworks/utest/utest/harness.h diff --git "a/frameworks\\utest/utest/scheduler.h" b/frameworks/utest/utest/scheduler.h similarity index 100% rename from "frameworks\\utest/utest/scheduler.h" rename to frameworks/utest/utest/scheduler.h diff --git "a/frameworks\\utest/utest/shim.h" b/frameworks/utest/utest/shim.h similarity index 100% rename from "frameworks\\utest/utest/shim.h" rename to frameworks/utest/utest/shim.h diff --git "a/frameworks\\utest/utest/specification.h" b/frameworks/utest/utest/specification.h similarity index 100% rename from "frameworks\\utest/utest/specification.h" rename to frameworks/utest/utest/specification.h diff --git "a/frameworks\\utest/utest/types.h" b/frameworks/utest/utest/types.h similarity index 100% rename from "frameworks\\utest/utest/types.h" rename to frameworks/utest/utest/types.h diff --git "a/frameworks\\utest/utest/unity_handler.h" b/frameworks/utest/utest/unity_handler.h similarity index 100% rename from "frameworks\\utest/utest/unity_handler.h" rename to frameworks/utest/utest/unity_handler.h diff --git "a/frameworks\\utest/utest/utest.h" b/frameworks/utest/utest/utest.h similarity index 100% rename from "frameworks\\utest/utest/utest.h" rename to frameworks/utest/utest/utest.h diff --git "a/frameworks\\utest/source/shim.cpp" "b/frameworks\\utest/source/shim.cpp" deleted file mode 100644 index bb66fff80f..0000000000 --- "a/frameworks\\utest/source/shim.cpp" +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * 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. - **************************************************************************** - */ - -#include "utest/shim.h" - -#if UTEST_SHIM_SCHEDULER_USE_MINAR -#include "minar/minar.h" - -static int32_t utest_minar_init() -{ - return 0; -} -static void *utest_minar_post(const utest_v1_harness_callback_t callback, const uint32_t delay_ms) -{ - void *handle = minar::Scheduler::postCallback(callback).delay(minar::milliseconds(delay_ms)).getHandle(); - return handle; -} -static int32_t utest_minar_cancel(void *handle) -{ - int32_t ret = minar::Scheduler::cancelCallback(handle); - return ret; -} -static int32_t utest_minar_run() -{ - return 0; -} -extern "C" { -static const utest_v1_scheduler_t utest_v1_scheduler = -{ - utest_minar_init, - utest_minar_post, - utest_minar_cancel, - utest_minar_run -}; -utest_v1_scheduler_t utest_v1_get_scheduler() -{ - return utest_v1_scheduler; -} -} - -#elif UTEST_SHIM_SCHEDULER_USE_US_TICKER -#ifdef YOTTA_MBED_HAL_VERSION_STRING -# include "mbed-hal/us_ticker.h" -#else -# include "us_ticker.h" -#endif -// only one callback is active at any given time -static volatile utest_v1_harness_callback_t minimal_callback; -static volatile utest_v1_harness_callback_t ticker_callback; -static const ticker_data_t *ticker_data; -static ticker_event_t ticker_event; - -static void ticker_handler(uint32_t) -{ - // printf("\t\t>>> Ticker callback fired for %p.\n", ticker_callback); - minimal_callback = ticker_callback; -} - -static int32_t utest_us_ticker_init() -{ - ticker_data = get_us_ticker_data(); - ticker_set_handler(ticker_data, ticker_handler); - return 0; -} -static void *utest_us_ticker_post(const utest_v1_harness_callback_t callback, const uint32_t delay_ms) -{ - // printf("\t\t>>> Schedule %p with %ums delay => %p.\n", callback, (unsigned int)delay_ms, (void*)1); - if (delay_ms) { - ticker_callback = callback; - // fire the interrupt in 1000us * delay_ms - ticker_insert_event(ticker_data, &ticker_event, ticker_read(ticker_data) + delay_ms * 1000, 0); - } else { - minimal_callback = callback; - } - - // return a bogus handle - return (void*)1; -} -static int32_t utest_us_ticker_cancel(void *handle) -{ - // printf("\t\t>>> Cancel %p => %u\n", handle, (unsigned int)0); - (void) handle; - ticker_remove_event(ticker_data, &ticker_event); - return 0; -} -static int32_t utest_us_ticker_run() -{ - while(1) - { - // check if a new callback has been set - if (minimal_callback) - { - // printf("\t\t>>> Firing callback %p\n", minimal_callback); - // copy the callback - utest_v1_harness_callback_t callback = minimal_callback; - // reset the shared callback - minimal_callback = NULL; - // execute the copied callback - callback(); - } - } - return 0; -} -extern "C" { -static const utest_v1_scheduler_t utest_v1_scheduler = -{ - utest_us_ticker_init, - utest_us_ticker_post, - utest_us_ticker_cancel, - utest_us_ticker_run -}; -utest_v1_scheduler_t utest_v1_get_scheduler() -{ - return utest_v1_scheduler; -} -} -#endif - -#ifdef YOTTA_CORE_UTIL_VERSION_STRING -// their functionality is implemented using the CriticalSectionLock class -void utest_v1_enter_critical_section(void) {} -void utest_v1_leave_critical_section(void) {} -#endif