From ab5deaa705985a972dbefa606b2dbac3e8df6329 Mon Sep 17 00:00:00 2001 From: Abhishek Prasad Date: Tue, 1 Dec 2020 15:07:50 +0530 Subject: [PATCH] ci: wlan feature tests addition for below test suites (e1e57aa6) 1. PMF 2. WPA3 3. ASSOC 4. MEMLEAK 5. EAP 6. SCAN 7. AUTHMODE_DOWNGRADE 8. ESPNOW 9. EAPTLS --- .gitlab-ci.yml | 2 +- tools/ci/build_app.sh | 30 ++++++++++++++++++++---------- tools/ci/config/build.yml | 11 ++++++----- tools/ci/config/feature_test.yml | 29 ++++------------------------- 4 files changed, 31 insertions(+), 41 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c54ef47ec..2274d683f 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: variables: IDF_PATH: "$CI_PROJECT_DIR/esp-idf" MAKEFLAGS: "-j8" - ESPSIGMA_BRANCH: "master" + SSC_BRANCH: "master" IDF_BRANCH: "master" board: "esp32" diff --git a/tools/ci/build_app.sh b/tools/ci/build_app.sh index b2bdbe8d4..7793f63b0 100644 --- a/tools/ci/build_app.sh +++ b/tools/ci/build_app.sh @@ -1,7 +1,6 @@ #!/bin/bash # This file is sourced in to the CI environment # in .gitlab-ci.yml file -# set -x @@ -12,13 +11,23 @@ die() { [ -z ${IDF_PATH} ] && die "IDF_PATH is not set." -# Tool chain -export PATH=/wifi_ci/xtensa-esp32-elf/bin:${PATH} +# Set Env +cd ${CI_PROJECT_DIR}/esp-idf +./install.sh || { echo "Install Failure"; exit 1; } +. ./export.sh || { echo "Export Failure"; exit 1; } -# Sigma DUT -echo Running make for espsigma dut app... -cd ${CI_PROJECT_DIR}/espsigma/esp_sigma_dut -make ${MAKEFLAGS} +# Set Env +cd ${CI_PROJECT_DIR}/SSC + +# SSC Dut +echo Running cmake for ssc app... +if test -f "gen_misc_ng.sh"; then + ./gen_misc_ng.sh SSC +fi + +if test -f "gen_misc_idf.sh"; then + ./gen_misc_idf.sh ESP32 SSC +fi # Copying binaries to create build tar ball cd $CI_PROJECT_DIR @@ -26,9 +35,10 @@ rm -rf ${board}-${CI_PIPELINE_ID}.debug mkdir -p ${board}-${CI_PIPELINE_ID}.debug/ echo Creating ${board}-${VERSION} app binaries debug directory... -cp ${CI_PROJECT_DIR}/espsigma/esp_sigma_dut/build/*.bin $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } -cp ${CI_PROJECT_DIR}/espsigma/esp_sigma_dut/build/*.elf $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } -cp ${CI_PROJECT_DIR}/espsigma/esp_sigma_dut/build/bootloader/bootloader.bin $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } +cp ${CI_PROJECT_DIR}/SSC/build/ssc.bin $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } +cp ${CI_PROJECT_DIR}/SSC/build/ssc.elf $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } +cp ${CI_PROJECT_DIR}/SSC/build/bootloader/bootloader.bin $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } +cp ${CI_PROJECT_DIR}/SSC/build/partition_table/partition-table.bin $board-${CI_PIPELINE_ID}.debug/ || { echo "Copy file Status: Failure"; exit 1; } # Creating tar file (debug) tar -zcvf $board-${CI_PIPELINE_ID}.debug.tar.gz $board-${CI_PIPELINE_ID}.debug || { echo "Create tar Status: Failure"; exit 1; } diff --git a/tools/ci/config/build.yml b/tools/ci/config/build.yml index 79df8105a..746a67226 100644 --- a/tools/ci/config/build.yml +++ b/tools/ci/config/build.yml @@ -1,4 +1,4 @@ -build_espsigma: +build_ssc_esp32: stage: build image: $CI_DOCKER_REGISTRY/esp32-ci-env tags: @@ -26,7 +26,8 @@ build_espsigma: - cd $CI_PROJECT_DIR - rm -rf esp-idf/$wlan_lib_path/* - cp -rf /tmp/esp_wifi_lib/* esp-idf/$wlan_lib_path/. - - if [[ "${BOT_CUSTOMIZED_REVISION}" ]] && [[ "$BOT_CUSTOMIZED_REVISION" == *"espsigma"* ]]; then ESPSIGMA_BRANCH=$(python -c 'import os;print eval(os.environ["BOT_CUSTOMIZED_REVISION"])["espsigma"]') ; fi - - echo Cloning espsigma - ${ESPSIGMA_BRANCH} ... - - git clone --recursive --single-branch -b $ESPSIGMA_BRANCH --dissociate ${GITLAB_SSH_SERVER}/espressif/espsigma.git - - sh tools/ci/build_app.sh + - if [[ "${BOT_CUSTOMIZED_REVISION}" ]] && [[ "$BOT_CUSTOMIZED_REVISION" == *"ssc"* ]]; then SSC_BRANCH=$(python -c 'import os;print eval(os.environ["BOT_CUSTOMIZED_REVISION"])["ssc"]') ; fi + - echo Cloning SSC - ${SSC_BRANCH} ... + - git clone --recursive --single-branch -b $SSC_BRANCH --dissociate ${GITLAB_SSH_SERVER}/yinling/SSC.git + - chmod +x tools/ci/build_app.sh + - ./tools/ci/build_app.sh diff --git a/tools/ci/config/feature_test.yml b/tools/ci/config/feature_test.yml index 16c69521c..98b4acbba 100644 --- a/tools/ci/config/feature_test.yml +++ b/tools/ci/config/feature_test.yml @@ -1,25 +1,4 @@ -PMF: - stage: feature_test - image: $CI_DOCKER_REGISTRY/esp32-ci-env - parallel: 5 - tags: - - wlan_feature - - artifacts: - paths: - - gitlabCI-${CI_PROJECT_NAME}-${CI_BUILD_ID}.tar.gz - - expire_in: 1 week - when: always - - only: - refs: - - triggers - - script: - - git clone ${GITLAB_SSH_SERVER}/app-frameworks/devops.git - - tar -xzvf $board-${CI_PIPELINE_ID}.debug.tar.gz - - python -u devops/automation/Runner.py wifi_pmf --id WIFI_PMF_${CI_NODE_INDEX} --build "$board-${CI_PIPELINE_ID}.debug" - - tar -zcvf gitlabCI-${CI_PROJECT_NAME}-${CI_BUILD_ID}.tar.gz gitlabCI-${CI_PROJECT_NAME}-${CI_BUILD_ID} - - exit "$(cat /tmp/gitlabCI-${CI_PROJECT_NAME}-${CI_BUILD_ID})" - +include: + - project: 'espressif/wlan_ci' + ref: master + file: '/ci/templates/wifi_lib_pipeline_tests.yaml'