Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PMF testcases to WIFI CI (4234f656)
- Loading branch information
Abhishek Prasad
committed
Apr 7, 2020
1 parent
1b4c0c4
commit c844ccb
Showing
4 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# This file is sourced in to the CI environment | ||
# in .gitlab-ci.yml file | ||
# | ||
|
||
set -x | ||
|
||
die() { | ||
echo "${1:-"Unknown Error"}" 1>&2 | ||
exit 1 | ||
} | ||
|
||
[ -z ${IDF_PATH} ] && die "IDF_PATH is not set." | ||
|
||
# Tool chain | ||
export PATH=/wifi_ci/xtensa-esp32-elf/bin:${PATH} | ||
|
||
# Sigma DUT | ||
echo Running make for espsigma dut app... | ||
cd ${CI_PROJECT_DIR}/espsigma/esp_sigma_dut | ||
make ${MAKEFLAGS} | ||
|
||
# Copying binaries to create build tar ball | ||
cd $CI_PROJECT_DIR | ||
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; } | ||
|
||
# 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; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
build_espsigma: | ||
stage: build | ||
image: $CI_DOCKER_REGISTRY/esp32-ci-env | ||
tags: | ||
- wlan_feature | ||
|
||
artifacts: | ||
paths: | ||
- ${board}-${CI_PIPELINE_ID}.debug.tar.gz | ||
expire_in: 1 week | ||
|
||
only: | ||
refs: | ||
- triggers | ||
|
||
script: | ||
- rm -rf /tmp/esp_wifi_lib | ||
- mkdir /tmp/esp_wifi_lib | ||
- cp -rf * /tmp/esp_wifi_lib | ||
- if git ls-remote ${GITLAB_SSH_SERVER}/idf/esp-idf.git | grep -sw ${CI_BUILD_REF_NAME} 2>&1>/dev/null; then IDF_BRANCH=${CI_BUILD_REF_NAME} ; fi | ||
- if [[ "${BOT_CUSTOMIZED_REVISION}" ]] && [[ "$BOT_CUSTOMIZED_REVISION" == *"esp-idf"* ]]; then IDF_BRANCH=$(python -c 'import os;print eval(os.environ["BOT_CUSTOMIZED_REVISION"])["esp-idf"]') ; fi | ||
- echo Cloning esp-idf - ${IDF_BRANCH} ... | ||
- git clone --recursive --single-branch -b $IDF_BRANCH --dissociate ${GITLAB_SSH_SERVER}/idf/esp-idf.git | ||
- cd esp-idf | ||
- wlan_lib_path=`grep -B 1 esp32-wifi-lib .gitmodules | grep path | cut -d' ' -f3` | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
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})" | ||
|