ci: add TEST_CASE_CI_IGNORE macro to allow pytest test cases to be ignored in ci

pull/8755/head
songruojing 2022-03-14 17:01:29 +08:00 zatwierdzone przez songruo
rodzic 11e555d677
commit edcf44679d
3 zmienionych plików z 19 dodań i 15 usunięć

Wyświetl plik

@ -176,6 +176,8 @@ before_script:
scapy
google-api-python-client
- cd $IDF_PATH
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
default:
retry:

Wyświetl plik

@ -1,16 +1,8 @@
// Copyright 2016-2018 Espressif Systems (Shanghai) PTE LTD
//
// 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.
/*
* SPDX-FileCopyrightText: 2016-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
@ -131,7 +123,6 @@ void unity_testcase_register(test_desc_t* desc);
}
/*
* First argument is a free-form description,
* second argument is (by convention) a list of identifiers, each one in square brackets.
@ -157,6 +148,18 @@ void unity_testcase_register(test_desc_t* desc);
unity_testcase_register( & UNITY_TEST_UID(test_desc_) ); \
}
/*
Test case macro to be ignored in CI.
Tests will still be built (to check for compile error) but not linked if IDF_CI_BUILD.
*/
#if IDF_CI_BUILD
#define TEST_CASE_CI_IGNORE(name_, desc_) \
__attribute__((unused)) static void UNITY_TEST_UID(test_func_) (void)
#else
#define TEST_CASE_CI_IGNORE(name_, desc_) TEST_CASE(name_, desc_)
#endif
/**
* Note: initialization of test_desc_t fields above has to be done exactly
* in the same order as the fields are declared in the structure.

Wyświetl plik

@ -1684,7 +1684,6 @@ components/ulp/test/esp32/test_ulp_as.c
components/unity/include/priv/setjmp.h
components/unity/include/unity_config.h
components/unity/include/unity_fixture_extras.h
components/unity/include/unity_test_runner.h
components/unity/unity_runner.c
components/usb/test/hcd/test_hcd_ctrl.c
components/vfs/include/esp_vfs_common.h