Skip to content

Commit

Permalink
Enabling pipeline E2E tests for dual stack (#2491)
Browse files Browse the repository at this point in the history
* Dual Stack pipeline addition

* Addressing comments, testing ubuntu 22

* Testing new pool

* Updating c-utility test

* Addressing comments, updating utility, revert tests

* Updating other submodules

* Bugfix for local sockets

* Updating other submodules 2
  • Loading branch information
RLeclair authored Jun 13, 2023
1 parent 4c4db6f commit 3deff73
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 6 deletions.
88 changes: 88 additions & 0 deletions build/.vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,94 @@ jobs:
mergeTestResults: true
testRunTitle: 'ubuntuRIOT'
condition: succeededOrFailed()
- job: ubuntu2004dualipstack
container: linux-c-ubuntu-2004
pool:
name: 'sdk-c--ubuntu-18'
displayName: 'Ubuntu 20.04 with Dual IP Stack'
steps:
- script: |
export OPENSSL_ia32cap=0x00000000
sudo chmod -R 755 .
sudo -E ./jenkins/ubuntu_c_ipv6_dual_stack.sh
displayName: 'Build'
- script: |
cd cmake && sudo -E ../build_all/linux/run_tests.sh
displayName: "Run Tests"
env:
IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING)
IOTHUB_EVENTHUB_CONNECTION_STRING: $(IOTHUB-EVENTHUB-CONNECTION-STRING)
IOTHUB_E2E_X509_CERT_BASE64: $(IOTHUB-E2E-X509-CERT-BASE64)
IOTHUB_E2E_X509_PRIVATE_KEY_BASE64: $(IOTHUB-E2E-X509-PRIVATE-KEY-BASE64)
IOTHUB_E2E_X509_THUMBPRINT: $(IOTHUB-E2E-X509-THUMBPRINT)
IOTHUB_POLICY_KEY: $(IOTHUB-POLICY-KEY)
STORAGE_ACCOUNT_CONNECTION_STRING: $(STORAGE-ACCOUNT-CONNECTION-STRING)
IOT_DPS_CONNECTION_STRING: $(IOT-DPS-CONNECTION-STRING)
IOT_DPS_ID_SCOPE: $(IOT-DPS-ID-SCOPE)
IOTHUB_CA_ROOT_CERT: $(IOTHUB-CA-ROOT-CERT)
IOTHUB_CA_ROOT_CERT_KEY: $(IOTHUB-CA-ROOT-CERT-KEY)
IOT_DPS_GLOBAL_ENDPOINT: $(IOT-DPS-GLOBAL-ENDPOINT)
IOTHUB_DEVICE_CONN_STRING_INVALIDCERT: $(IOTHUB-DEVICE-CONN-STRING-INVALIDCERT)
IOTHUB_CONN_STRING_INVALIDCERT: $(IOTHUB-CONN-STRING-INVALIDCERT)
DPS_GLOBALDEVICEENDPOINT_INVALIDCERT: $(DPS-GLOBALDEVICEENDPOINT-INVALIDCERT)
PROVISIONING_CONNECTION_STRING_INVALIDCERT: $(PROVISIONING-CONNECTION-STRING-INVALIDCERT)
IOT_DPS_INDIVIDUAL_X509_CERTIFICATE: $(IOTHUB-E2E-X509-ECC-CERT-BASE64)
IOT_DPS_INDIVIDUAL_X509_KEY: $(IOTHUB-E2E-X509-ECC-PRIVATE-KEY-BASE64)
IOT_DPS_INDIVIDUAL_REGISTRATION_ID: $(IOT-DPS-INDIVIDUAL-REGISTRATION-ID)
- task: PublishTestResults@2
displayName: 'Publish Ubuntu 20.04 with Dual IP Stack Results'
inputs:
testRunner: CTest
testResultsFiles: '**/Test.xml'
mergeTestResults: true
testRunTitle: 'ubuntu2004dualipstack'
condition: succeededOrFailed()
- job: ubuntu2204dualipstack
container: linux-c-ubuntu-2204
pool:
name: 'sdk-c--ubuntu-18'
displayName: 'Ubuntu 22.04 with Dual IP Stack'
steps:
- script: |
cat /etc/*release | grep VERSION*
gcc --version
openssl version
curl --version
sudo -E env PATH="$PATH" ./build_all/linux/build.sh --run-unittests --run-e2e-tests --provisioning --use-hsmsymmkey --use-hsmsas --use-hsmx509 --use-edge-modules --use-ipv6-dualstack --config Debug
displayName: 'Build'
- script: |
export OPENSSL_ia32cap=0x00000000
sudo chmod -R 755 .
cd cmake && sudo -E ../build_all/linux/run_tests.sh
displayName: "Run Tests"
env:
IOTHUB_CONNECTION_STRING: $(IOTHUB-CONNECTION-STRING)
IOTHUB_EVENTHUB_CONNECTION_STRING: $(IOTHUB-EVENTHUB-CONNECTION-STRING)
IOTHUB_E2E_X509_CERT_BASE64: $(IOTHUB-E2E-X509-CERT-BASE64)
IOTHUB_E2E_X509_PRIVATE_KEY_BASE64: $(IOTHUB-E2E-X509-PRIVATE-KEY-BASE64)
IOTHUB_E2E_X509_THUMBPRINT: $(IOTHUB-E2E-X509-THUMBPRINT)
IOTHUB_POLICY_KEY: $(IOTHUB-POLICY-KEY)
STORAGE_ACCOUNT_CONNECTION_STRING: $(STORAGE-ACCOUNT-CONNECTION-STRING)
IOT_DPS_CONNECTION_STRING: $(IOT-DPS-CONNECTION-STRING)
IOT_DPS_ID_SCOPE: $(IOT-DPS-ID-SCOPE)
IOTHUB_CA_ROOT_CERT: $(IOTHUB-CA-ROOT-CERT)
IOTHUB_CA_ROOT_CERT_KEY: $(IOTHUB-CA-ROOT-CERT-KEY)
IOT_DPS_GLOBAL_ENDPOINT: $(IOT-DPS-GLOBAL-ENDPOINT)
IOTHUB_DEVICE_CONN_STRING_INVALIDCERT: $(IOTHUB-DEVICE-CONN-STRING-INVALIDCERT)
IOTHUB_CONN_STRING_INVALIDCERT: $(IOTHUB-CONN-STRING-INVALIDCERT)
DPS_GLOBALDEVICEENDPOINT_INVALIDCERT: $(DPS-GLOBALDEVICEENDPOINT-INVALIDCERT)
PROVISIONING_CONNECTION_STRING_INVALIDCERT: $(PROVISIONING-CONNECTION-STRING-INVALIDCERT)
IOT_DPS_INDIVIDUAL_X509_CERTIFICATE: $(IOTHUB-E2E-X509-ECC-CERT-BASE64)
IOT_DPS_INDIVIDUAL_X509_KEY: $(IOTHUB-E2E-X509-ECC-PRIVATE-KEY-BASE64)
IOT_DPS_INDIVIDUAL_REGISTRATION_ID: $(IOT-DPS-INDIVIDUAL-REGISTRATION-ID)
- task: PublishTestResults@2
displayName: 'Publish Ubuntu 22.04 with Dual IP Stack Results'
inputs:
testRunner: CTest
testResultsFiles: '**/Test.xml'
mergeTestResults: true
testRunTitle: 'ubuntu2204dualipstack'
condition: succeededOrFailed()
- job: debian
container: linux-c-debian
pool:
Expand Down
5 changes: 4 additions & 1 deletion build_all/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ hsm_type_sastoken=OFF
hsm_type_symm_key=OFF
hsm_type_x509=OFF
hsm_type_riot=OFF
enable_ipv6=OFF
build_config=Debug

usage ()
Expand Down Expand Up @@ -58,6 +59,7 @@ usage ()
echo " --use-hsmsas Build with HSM for TPM"
echo " --use-hsmx509 Build with HSM for X509 Client Authentication"
echo " --use-hsmriot Build with HSM for RIoT/DICE"
echo " --use-ipv6-dualstack Build with IPv6 dual stack support"
echo " --config <value> [Debug] build configuration (e.g. Debug, Release)"
exit 1
}
Expand Down Expand Up @@ -112,6 +114,7 @@ process_args ()
"--use-hsmsas") hsm_type_sastoken=ON;;
"--use-hsmx509") hsm_type_riot=OFF; hsm_type_x509=ON;;
"--use-hsmriot") hsm_type_riot=ON; hsm_type_x509=OFF;;
"--use-ipv6-dualstack") enable_ipv6=ON;;
"--config") save_next_arg=4;;
* ) usage;;
esac
Expand All @@ -136,7 +139,7 @@ rm -r -f $build_folder
mkdir -m777 -p $build_folder
pushd $build_folder
echo "Generating Build Files"
cmake $toolchainfile $cmake_install_prefix $build_root -Drun_valgrind:BOOL=$run_valgrind -DcompileOption_C:STRING="$extracloptions" -Drun_e2e_tests:BOOL=$run_e2e_tests -Drun_sfc_tests:BOOL=$run_sfc_tests -Drun_longhaul_tests=$run_longhaul_tests -Duse_amqp:BOOL=$build_amqp -Duse_http:BOOL=$build_http -Duse_mqtt:BOOL=$build_mqtt -Ddont_use_uploadtoblob:BOOL=$no_blob -Drun_unittests:BOOL=$run_unittests -Dno_logging:BOOL=$no_logging -Duse_prov_client:BOOL=$prov_auth -Duse_tpm_simulator:BOOL=$prov_use_tpm_simulator -Duse_edge_modules=$use_edge_modules -Dhsm_type_riot=$hsm_type_riot -Dhsm_type_x509=$hsm_type_x509 -Dhsm_type_symm_key=$hsm_type_symm_key -Dhsm_type_sastoken=$hsm_type_sastoken -DCMAKE_BUILD_TYPE=$build_config
cmake $toolchainfile $cmake_install_prefix $build_root -Drun_valgrind:BOOL=$run_valgrind -DcompileOption_C:STRING="$extracloptions" -Drun_e2e_tests:BOOL=$run_e2e_tests -Drun_sfc_tests:BOOL=$run_sfc_tests -Drun_longhaul_tests=$run_longhaul_tests -Duse_amqp:BOOL=$build_amqp -Duse_http:BOOL=$build_http -Duse_mqtt:BOOL=$build_mqtt -Ddont_use_uploadtoblob:BOOL=$no_blob -Drun_unittests:BOOL=$run_unittests -Dno_logging:BOOL=$no_logging -Duse_prov_client:BOOL=$prov_auth -Duse_tpm_simulator:BOOL=$prov_use_tpm_simulator -Duse_edge_modules=$use_edge_modules -Dhsm_type_riot=$hsm_type_riot -Dhsm_type_x509=$hsm_type_x509 -Dhsm_type_symm_key=$hsm_type_symm_key -Dhsm_type_sastoken=$hsm_type_sastoken -Denable_ipv6=$enable_ipv6 -DCMAKE_BUILD_TYPE=$build_config
chmod --recursive ugo+rw ../cmake

# Set the default cores
Expand Down
2 changes: 1 addition & 1 deletion deps/uhttp
Submodule uhttp updated 1 files
+1 −1 deps/c-utility
21 changes: 21 additions & 0 deletions jenkins/ubuntu_c_ipv6_dual_stack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.

set -x # Set trace on
set -o errexit # Exit if command failed
set -o nounset # Exit if variable not set
set -o pipefail # Exit if pipe failed

# Print version
cat /etc/*release | grep VERSION*
gcc --version
openssl version
curl --version

build_root=$(cd "$(dirname "$0")/.." && pwd)
cd $build_root

# -- C --
./build_all/linux/build.sh --run-unittests --run_valgrind --run-e2e-tests --provisioning --use-hsmsymmkey --use-hsmsas --use-hsmx509 --use-edge-modules --use-ipv6-dualstack --config Debug "$@" #-x
[ $? -eq 0 ] || exit $?
2 changes: 1 addition & 1 deletion provisioning_client/deps/utpm
Submodule utpm updated 2 files
+5 −1 README.md
+1 −1 deps/c-utility
2 changes: 1 addition & 1 deletion uamqp
2 changes: 1 addition & 1 deletion umqtt
Submodule umqtt updated 1 files
+1 −1 deps/c-utility

0 comments on commit 3deff73

Please sign in to comment.