From d3a1b19c5fb76682789dca7fe1c9e56076229d16 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Fri, 10 Feb 2017 09:53:01 +0000 Subject: [PATCH] Ensure TestPlatformAbstraction cannot be copied - Fixes an SVACE issue. - Also synchronized automated tests with other repos. Change-Id: Ib8cc53264d74aacfcf147706d302f57bb6b822e5 --- .../dali/dali-test-suite-utils/dali-test-suite-utils.cpp | 2 +- .../src/dali/dali-test-suite-utils/dali-test-suite-utils.h | 2 +- .../src/dali/dali-test-suite-utils/test-application.cpp | 14 +++++++++++++- .../src/dali/dali-test-suite-utils/test-application.h | 5 ++++- .../src/dali/dali-test-suite-utils/test-harness.cpp | 7 ++++--- .../src/dali/dali-test-suite-utils/test-native-image.cpp | 2 +- .../src/dali/dali-test-suite-utils/test-native-image.h | 2 +- .../dali-test-suite-utils/test-platform-abstraction.cpp | 2 +- .../dali/dali-test-suite-utils/test-platform-abstraction.h | 7 ++++++- .../dali/dali-test-suite-utils/test-trace-call-stack.cpp | 2 +- 10 files changed, 33 insertions(+), 12 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp index 61562bf..8877a50 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h index 72e663b..79d422b 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h @@ -2,7 +2,7 @@ #define __DALI_TEST_SUITE_UTILS_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp index e8d9be4..6636676 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -221,5 +221,17 @@ void TestApplication::ResetContext() mCore->ContextCreated(); } +unsigned int TestApplication::Wait( unsigned int durationToWait ) +{ + int time = 0; + + for(unsigned int i = 0; i <= ( durationToWait / RENDER_FRAME_INTERVAL); i++) + { + SendNotification(); + Render(RENDER_FRAME_INTERVAL); + time += RENDER_FRAME_INTERVAL; + } + return time; +} } // Namespace dali diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-application.h b/automated-tests/src/dali/dali-test-suite-utils/test-application.h index 49a7f51..5c94252 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-application.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-application.h @@ -2,7 +2,7 @@ #define __DALI_TEST_APPLICATION_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,8 @@ public: static const unsigned int DEFAULT_RENDER_INTERVAL = 1; + static const unsigned int RENDER_FRAME_INTERVAL = 16; + TestApplication( size_t surfaceWidth = DEFAULT_SURFACE_WIDTH, size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, float horizontalDpi = DEFAULT_HORIZONTAL_DPI, @@ -80,6 +82,7 @@ public: bool RenderOnly( ); void ResetContext(); bool GetRenderNeedsUpdate(); + unsigned int Wait( unsigned int durationToWait ); private: void DoUpdate( unsigned int intervalMilliseconds, const char* location=NULL ); diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-harness.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-harness.cpp index 332ddaa..840ef0d 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-harness.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-harness.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -329,8 +329,9 @@ void Usage(const char* program) printf("Usage: \n" " %s \t\t Execute a test case\n" " %s \t\t Execute all test cases in parallel\n" - " %s -r\t\t Execute all test cases in parallel, rerunning failed test cases\n", - program, program, program); + " %s -r\t\t Execute all test cases in parallel, rerunning failed test cases\n" + " %s -s\t\t Execute all test cases serially\n", + program, program, program, program); } } // namespace diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp index 3afe935..da4e7e8 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-native-image.h b/automated-tests/src/dali/dali-test-suite-utils/test-native-image.h index 1242974..896ce52 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-native-image.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-native-image.h @@ -2,7 +2,7 @@ #define __TEST_NATIVE_IMAGE_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.cpp index 63def8d..86b5430 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.h b/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.h index 6d2cb3f..42e2d98 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.h +++ b/automated-tests/src/dali/dali-test-suite-utils/test-platform-abstraction.h @@ -2,7 +2,7 @@ #define __DALI_TEST_PLATFORM_ABSTRACTION_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -272,6 +272,11 @@ public: // TEST FUNCTIONS private: + TestPlatformAbstraction( const TestPlatformAbstraction& ); ///< Undefined + TestPlatformAbstraction& operator=( const TestPlatformAbstraction& ); ///< Undefined + +private: + struct LoadedResource { Integration::ResourceId id; diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-trace-call-stack.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-trace-call-stack.cpp index 9b6e9a5..f57dc50 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-trace-call-stack.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-trace-call-stack.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. -- 2.7.4