Fix the CI build and unit test issue

pull/12425/head
Rajkumar Kanagaraj 2020-03-24 08:14:34 -07:00 committed by Kevin Bracey
parent 5601a207cc
commit c71c980ccd
8 changed files with 1 additions and 111 deletions

View File

@ -25,7 +25,6 @@
#include "mbed_poll_stub.h"
#include "CellularUtil_stub.h"
#include "Timer_stub.h"
using namespace mbed;
using namespace events;
@ -228,7 +227,6 @@ TEST_F(TestATHandler, test_ATHandler_process_oob)
at.process_oob();
at.clear_error();
timer_stub_value = 0;
filehandle_stub_table_pos = 0;
at.read_bytes(buf, 5);
@ -244,7 +242,6 @@ TEST_F(TestATHandler, test_ATHandler_process_oob)
filehandle_stub_table = table2;
at.clear_error();
timer_stub_value = 0;
filehandle_stub_table_pos = 0;
mbed_poll_stub::revents_value = POLLIN;
mbed_poll_stub::int_value = 1;

View File

@ -28,7 +28,6 @@ set(unittest-test-sources
stubs/SerialBase_stub.cpp
stubs/mbed_assert_stub.cpp
stubs/mbed_poll_stub.cpp
stubs/Timer_stub.cpp
stubs/equeue_stub.c
stubs/Kernel_stub.cpp
stubs/ThisThread_stub.cpp

View File

@ -23,7 +23,6 @@
#include <stdarg.h>
#include "FileHandle_stub.h"
#include "mbed_poll_stub.h"
#include "Timer_stub.h"
using namespace mbed;
@ -110,7 +109,6 @@ TEST_F(test_ATCmdParser, test_ATCmdParser_process_oob)
at.process_oob();
expected_oob_callback = false;
timer_stub_value = 0;
filehandle_stub_table_pos = 0;
at.read(buf, 5);
@ -127,7 +125,6 @@ TEST_F(test_ATCmdParser, test_ATCmdParser_process_oob)
table2[4] = 0;
filehandle_stub_table = table2;
timer_stub_value = 0;
filehandle_stub_table_pos = 0;
mbed_poll_stub::revents_value = POLLIN;
mbed_poll_stub::int_value = 1;

View File

@ -1,74 +0,0 @@
/*
* Copyright (c) , Arm Limited and affiliates.
* 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 "Timer.h"
#include "Timer_stub.h"
namespace mbed {
Timer::Timer()
{
}
Timer::Timer(const ticker_data_t *data)
{
}
Timer::~Timer()
{
}
void Timer::start()
{
}
void Timer::stop()
{
;
}
int Timer::read_us()
{
return 0;
}
float Timer::read()
{
return 0;
}
int Timer::read_ms()
{
timer_stub_value += timer_stub_step;
return timer_stub_value;
}
us_timestamp_t Timer::read_high_resolution_us()
{
return 0;
}
void Timer::reset()
{
}
Timer::operator float()
{
return 0;
}
} // namespace mbed

View File

@ -1,25 +0,0 @@
/*
* Copyright (c) , Arm Limited and affiliates.
* 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.
*/
#ifndef TIMER_STUB_H
#define TIMER_STUB_H
static uint16_t timer_stub_value = 0;
static uint16_t timer_stub_step = 20;
#endif

View File

@ -97,9 +97,6 @@ public:
/** Clock to use with attach_absolute, guaranteeing running only while attached or manually locked */
using clock = HighResClock;
/** Clock to use with attach_absolute, running always */
using steady_clock = SteadyHighResClock;
/** @copydoc TimeoutBase::scheduled_time() */
HighResClock::time_point scheduled_time() const
{

View File

@ -44,9 +44,7 @@ Timeout::Timeout() : TimeoutBase(get_us_ticker_data(), true)
* (In C++17 could avoid the need for this by making the members inline).
*/
const bool HighResClock::is_steady;
const bool SteadyHighResClock::is_steady;
const bool LowPowerClock::is_steady;
mstd::once_flag SteadyHighResClock::init;
const bool RealTimeClock::is_steady;
#if DEVICE_LPTICKER

View File

@ -28,6 +28,7 @@
#include "rtos/mbed_rtos_types.h"
#include "rtos/Mutex.h"
#include "rtos/Semaphore.h"
#include "rtos/Kernel.h"
#include "platform/NonCopyable.h"