mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02:00
ci: fix incorrect paths in the build system test
The working directory when the test runs is not $IDF_PATH, it is the directory of the template project.
This commit is contained in:
@@ -854,25 +854,24 @@ endmenu\n" >> ${IDF_PATH}/Kconfig
|
|||||||
print_status "Create project using idf.py and build it"
|
print_status "Create project using idf.py and build it"
|
||||||
echo "Trying to create project."
|
echo "Trying to create project."
|
||||||
(idf.py -C projects create-project temp_test_project) || failure "Failed to create the project."
|
(idf.py -C projects create-project temp_test_project) || failure "Failed to create the project."
|
||||||
cd "$IDF_PATH/projects/temp_test_project"
|
pushd "$PWD/projects/temp_test_project"
|
||||||
echo "Building the project temp_test_project . . ."
|
echo "Building the project temp_test_project . . ."
|
||||||
idf.py build || failure "Failed to build the project."
|
idf.py build || failure "Failed to build the project."
|
||||||
cd "$IDF_PATH"
|
popd
|
||||||
rm -rf "$IDF_PATH/projects/temp_test_project"
|
rm -rf "$PWD/projects/temp_test_project"
|
||||||
|
|
||||||
print_status "Create component using idf.py, create project using idf.py."
|
print_status "Create component using idf.py, create project using idf.py."
|
||||||
print_status "Add the component to the created project and build the project."
|
print_status "Add the component to the created project and build the project."
|
||||||
echo "Trying to create project . . ."
|
echo "Trying to create project . . ."
|
||||||
(idf.py -C projects create-project temp_test_project) || failure "Failed to create the project."
|
(idf.py -C projects create-project temp_test_project) || failure "Failed to create the project."
|
||||||
|
pushd "$PWD/projects/temp_test_project"
|
||||||
echo "Trying to create component . . ."
|
echo "Trying to create component . . ."
|
||||||
(idf.py -C components create-component temp_test_component) || failure "Failed to create the component."
|
(idf.py -C components create-component temp_test_component) || failure "Failed to create the component."
|
||||||
${SED} -i '5i\\tfunc();' "$IDF_PATH/projects/temp_test_project/main/temp_test_project.c"
|
${SED} -i '5i\\tfunc();' "main/temp_test_project.c"
|
||||||
${SED} -i '5i#include "temp_test_component.h"' "$IDF_PATH/projects/temp_test_project/main/temp_test_project.c"
|
${SED} -i '5i#include "temp_test_component.h"' "main/temp_test_project.c"
|
||||||
cd "$IDF_PATH/projects/temp_test_project"
|
|
||||||
idf.py build || failure "Failed to build the project."
|
idf.py build || failure "Failed to build the project."
|
||||||
cd "$IDF_PATH"
|
popd
|
||||||
rm -rf "$IDF_PATH/projects/temp_test_project"
|
rm -rf "$PWD/projects/temp_test_project"
|
||||||
rm -rf "$IDF_PATH/components/temp_test_component"
|
|
||||||
|
|
||||||
print_status "Check that command for creating new project will fail if the target folder is not empty."
|
print_status "Check that command for creating new project will fail if the target folder is not empty."
|
||||||
mkdir "$IDF_PATH/example_proj/"
|
mkdir "$IDF_PATH/example_proj/"
|
||||||
|
Reference in New Issue
Block a user