Skip to content

Commit

Permalink
Merge 1fdbfca into 5432cb8
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Apr 24, 2023
2 parents 5432cb8 + 1fdbfca commit 007a658
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 29 deletions.
20 changes: 12 additions & 8 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,31 @@ cirrus_use_lib_task:
depends_on:
- cirrus_gcc_test

cirrus_osx_14_test_task: &osx_task
cirrus_osx_17_test_task: &osx_task
only_if: *default-condition
auto_cancellation: true
osx_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
- STDFLAG: -std=c++14
- STDFLAG: -std=c++17
version_script: make -C test showcxxversion
build_script: make -C test -j$((`getconf _NPROCESSORS_ONLN`))
test_script : make -C test test
report_script: make -C test report

cirrus_osx_17_test_task:
cirrus_osx_14_test_task:
<<: *osx_task
env:
- STDFLAG: -std=c++17
# https://stackoverflow.com/questions/56924853/why-xcode-11-beta-cant-use-c17s-filesystem-header
# ** Comment out because the image is mojave **
# CXXFLAGS: -mmacosx-version-min=10.15
- STDFLAG: -std=c++14
depends_on:
- cirrus_osx_17_test

cirrus_osx_20_test_task:
<<: *osx_task
env:
- STDFLAG: -std=c++20
depends_on:
- cirrus_osx_14_test
- cirrus_osx_17_test

# cirrus_worker_info_task:
# container:
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/ci-services-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ assignees: ''
* [ ] CircleCI
* [ ] Cirrus CI
* [ ] Codefresh
* [ ] Codeship
* [ ] Drone
* [ ] GitHub Actions
* [ ] GitLab CI
* [ ] JFrog Pipelines
* [ ] Peakflow
* [ ] Razorops
* [ ] Scrutinizer
* [ ] Semaphore
* [ ] TeamCity Cloud
* [ ] Travis CI
2 changes: 1 addition & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: iutest
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
os_image: ubuntu2004

# branch filter: GUI Config

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[![CircleCI](https://circleci.com/gh/srz-zumix/iutest/tree/master.svg?style=svg)](https://circleci.com/gh/srz-zumix/iutest/tree/master)
[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=master)](https://cirrus-ci.com/github/srz-zumix/iutest/master)
[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/srz-zumix/iutest%2Fiutest_unittest?branch=master&type=cf-2)](https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest)
[![Codeship Status for srz-zumix/iutest](https://codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://codeship.com/projects/110695)
[![Drone Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=master)](https://cloud.drone.io/srz-zumix/iutest)
[![GitHub Actions Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg?branch=master)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions%22)
[![GitLab CI pipeline status](https://gitlab.com/srz-zumix/iutest-test/badges/master/pipeline.svg)](https://gitlab.com/srz-zumix/iutest-test/commits/master)
Expand Down Expand Up @@ -130,7 +129,6 @@ Tests
|[Cirrus CI](https://cirrus-ci.org/)|[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=master)](https://cirrus-ci.com/github/srz-zumix/iutest/master)|[![Cirrus Build Status](https://api.cirrus-ci.com/github/srz-zumix/iutest.svg?branch=develop)](https://cirrus-ci.com/github/srz-zumix/iutest/develop)|g++/clang std=c++14,17.. Basic tests, FreeBSD Basic tests|
|[Codacy](https://www.codacy.com/)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=master)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=srz-zumix/iutest&amp;utm_campaign=Badge_Grade)|[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e6407b63c9c844d080ed71c7707bded9?branch=develop)](https://www.codacy.com/app/srz-zumix/iutest?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=srz-zumix/iutest&amp;utm_campaign=Badge_Grade)|Shellcheck, Cppcheck, PyLint, etc...|
|[Codefresh](https://codefresh.io/)|[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/srz-zumix/iutest%2Fiutest_unittest?branch=master&type=cf-1)](https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest)|[![Codefresh build status](https://g.codefresh.io/api/badges/pipeline/srz-zumix/iutest%2Fiutest_unittest?branch=develop&type=cf-1)](https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:develop;pipeline:58a933be9d1bd40100495882~iutest_unittest)|Build tools/docker/Dockerfile, Benchmark test, Gcc 8/9 basic test|
|[Codeship](https://codeship.com/)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://app.codeship.com/projects/110695)|[![Codeship Status for srz-zumix/iutest](https://app.codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=develop)](https://app.codeship.com/projects/110695)|Check coding standard of the project|
|[Coverity Scan](https://scan.coverity.com)|[![Coverity Scan Build Status](https://scan.coverity.com/projects/1316/badge.svg)](https://scan.coverity.com/projects/srz-zumix-iutest)||Coverity Scan|
|[Drone Cloud](https://cloud.drone.io)|[![Drone Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=master)](https://cloud.drone.io/srz-zumix/iutest)|[![Build Status](https://cloud.drone.io/api/badges/srz-zumix/iutest/status.svg?branch=develop)](https://cloud.drone.io/srz-zumix/iutest)|gcc/clang each version Basic test|
|[GitHub Actions](https://github.com/srz-zumix/iutest/actions?query=workflow%3A"GitHub+Actions")|[![GitHub Actions Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg?branch=master)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions%22+branch%3Amaster)|[![GitHub Actions Status](https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg?branch=develop)](https://github.com/srz-zumix/iutest/actions?query=workflow%3A%22GitHub+Actions%22+branch%3Adevelop)|Basic test (Windows LLVM clang and mingw and [zapcc](https://github.com/yrnkrn/zapcc)), EditorConfig Lint, Include What You Use, arm-none-eabi-gcc build|
Expand Down
3 changes: 0 additions & 3 deletions docs/status/compiler_os_ci_status.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ OS
.. |Codefresh| image:: https://g.codefresh.io/api/badges/pipeline/srz-zumix/srz-zumix%2Fiutest%2Fiutest_unittest?branch=master&type=cf-1&.svg
:target: https://g.codefresh.io/pipelines/iutest_unittest/builds?repoOwner=srz-zumix&repoName=iutest&serviceName=srz-zumix%2Fiutest&filter=trigger:build~Build;branch:master;pipeline:58a933be9d1bd40100495882~iutest_unittest

.. |Codeship| image:: https://codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master&.svg
:target: https://codeship.com/projects/110695

.. |GitHubActions| image:: https://github.com/srz-zumix/iutest/workflows/GitHub%20Actions/badge.svg
:target: https://github.com/srz-zumix/iutest/actions

Expand Down
5 changes: 5 additions & 0 deletions include/internal/iutest_charcode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ ::std::string ShowAnyCString(const CharType* any_c_str)

#if IUTEST_HAS_CXX_HDR_CODECVT

IUTEST_PRAGMA_WARN_PUSH()
IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED()

template<typename In, typename Out, typename State>
struct codecvt : public ::std::codecvt<In, Out, State> { ~codecvt() {} };

Expand All @@ -171,6 +174,8 @@ ::std::basic_string<Out> CodeConvert(const In* str)
}
#endif

IUTEST_PRAGMA_WARN_POP()

#endif

//======================================================================
Expand Down
2 changes: 2 additions & 0 deletions include/internal/iutest_internal_defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
// https://www.cocoawithlove.com/2008/03/break-into-debugger.html
# if defined(__ppc64__) || defined(__ppc__)
# define IUTEST_BREAK() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" : : : "memory", "r0", "r3", "r4" )
# elif defined(__aarch64__)
# define IUTEST_BREAK() __asm__(".inst 0xd4200000")
# else
# define IUTEST_BREAK() __asm__("int $3\n" : : )
# endif
Expand Down
15 changes: 15 additions & 0 deletions include/internal/iutest_pragma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,21 @@
# define IUTEST_PRAGMA_WARN_DISABLE_NONNULL()
#endif


#if !defined(IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED)
# if defined(__clang__)
# define IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED() IUTEST_PRAGMA_CLANG_WARN_DISABLE("-Wdeprecated-declarations")
# elif defined(__GNUC__)
# define IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED() IUTEST_PRAGMA_GCC_WARN_DISABLE("-Wdeprecated-declarations")
# elif defined(_MSC_VER)
# define IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED()
# endif
#endif

#if !defined(IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED)
# define IUTEST_PRAGMA_WARN_DISABLE_DEPRECATED()
#endif

#if defined(__clang__)
# if IUTEST_CLANG_MAJOR > 10
# define IUTEST_PRAGMA_IUTEST_WARN_DISABLE_CLANG_11() IUTEST_PRAGMA_CLANG_WARN_DISABLE("-Wsuggest-destructor-override")
Expand Down
7 changes: 4 additions & 3 deletions include/internal/iutest_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2011-2021, Takazumi Shirayanagi\n
* Copyright (C) 2011-2023, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand Down Expand Up @@ -140,12 +140,13 @@ inline int iu_vsnprintf(char* dst, size_t size, const char* format, va_list va)
{
char buffer[4096] = {0};
char* write_buffer = dst != NULL && size >= 4096 ? dst : buffer;
const int ret = vsprintf(write_buffer, format, va);
const int ret = vsnprintf(write_buffer, size, format, va);
if( dst != NULL )
{
const size_t length = static_cast<size_t>(ret);
const size_t write = (size <= length) ? size - 1 : length;
if( write_buffer == buffer ) {
if( write_buffer == buffer )
{
strncpy(dst, buffer, write);
}
dst[write] = '\0';
Expand Down
5 changes: 2 additions & 3 deletions include/internal/iutest_string_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2011-2021, Takazumi Shirayanagi\n
* Copyright (C) 2011-2023, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand Down Expand Up @@ -230,8 +230,7 @@ IUTEST_PRAGMA_WARN_DISABLE_FORMAT_NONLITERAL()
static int vastring(E* dst, const E* fmt, va_list va);
static int vastring(char* dst, size_t len, const char* fmt, va_list va) IUTEST_ATTRIBUTE_FORMAT_PRINTF(3, 0)
{
(void)len;
return vsprintf(dst, fmt, va);
return vsnprintf(dst, len, fmt, va);
}
static int vastring(wchar_t* dst, size_t len, const wchar_t* fmt, va_list va)
{
Expand Down
4 changes: 2 additions & 2 deletions test/assertion_only_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2012-2022, Takazumi Shirayanagi\n
* Copyright (C) 2012-2023, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand Down Expand Up @@ -42,7 +42,7 @@ void test_vprintf(const char* fmt, va_list va)
{
IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN()
char buf[4096];
vsprintf(buf, fmt, va);
vsnprintf(buf, sizeof(buf), fmt, va);
s_outstream << buf;
IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_END()
}
Expand Down
2 changes: 0 additions & 2 deletions test/cpplint/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[ ![Codeship Status for srz-zumix/iutest](https://codeship.com/projects/5bc87030-5b41-0133-6000-4242aa07dce3/status?branch=master)](https://codeship.com/projects/110695)

iutest cpplint
==========

Expand Down
4 changes: 2 additions & 2 deletions test/logger_tests.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2014-2020, Takazumi Shirayanagi\n
* Copyright (C) 2014-2023, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
Expand All @@ -31,7 +31,7 @@ IUTEST_PRAGMA_CRT_SECURE_WARN_DISABLE_BEGIN()
char buf[4096] = { 0 };
va_list va2;
iu_va_copy(va2, va);
vsprintf(buf, fmt, va2);
vsnprintf(buf, sizeof(buf), fmt, va2);
va_end(va2);
m_log += buf;
::iutest::detail::iuConsole::nl_voutput(fmt, va);
Expand Down

0 comments on commit 007a658

Please sign in to comment.