[SAI PTF] SAI PTF docker support sai-ptf v2 (#12719)
* [SAI PTF] SAI PTF docker support sai-ptf v2 Publish the sai-ptf docker. Take part of the change from previous PR #11610 (already reverted as some cache issue) Cause in #11610, added two new target in it, one is sai-ptf another one is syncd-rpc with sai-ptf v2, to make the upgrade with more clear target, use this one take the sai-ptf one. Test one: NOSTRETCH=y NOJESSIE=y make configure PLATFORM=vs NOSTRETCH=y NOJESSIE=y NOBULLSEYE=y SAITHRIFT_V2=y make target/docker-ptf-sai.gz Signed-off-by: richardyu-ms <richard.yu@microsoft.com> * remove useless change Signed-off-by: richardyu-ms <richard.yu@microsoft.com> * remove useless parameters Signed-off-by: richardyu-ms <richard.yu@microsoft.com> * remove useless change Signed-off-by: richardyu-ms <richard.yu@microsoft.com> * Update azure-pipelines-build.yml remove a useless option Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
This commit is contained in:
parent
7e525d96b3
commit
47d63bcd06
@ -121,6 +121,7 @@ jobs:
|
|||||||
mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz
|
mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz
|
||||||
fi
|
fi
|
||||||
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
|
make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
|
||||||
|
make $BUILD_OPTIONS target/docker-ptf-sai.gz
|
||||||
if [ $(Build.Reason) != 'PullRequest' ];then
|
if [ $(Build.Reason) != 'PullRequest' ];then
|
||||||
gzip -kd target/sonic-vs.img.gz
|
gzip -kd target/sonic-vs.img.gz
|
||||||
SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make sonic-slave-run
|
SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make sonic-slave-run
|
||||||
|
@ -92,6 +92,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
|
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz
|
||||||
|
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/docker-ptf-sai.gz
|
||||||
else
|
else
|
||||||
if [ ${{ parameters.dbg_image }} == true ]; then
|
if [ ${{ parameters.dbg_image }} == true ]; then
|
||||||
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) INSTALL_DEBUG_TOOLS=y target/sonic-${{ parameters.platform }}.bin && \
|
make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) INSTALL_DEBUG_TOOLS=y target/sonic-${{ parameters.platform }}.bin && \
|
||||||
|
@ -16,7 +16,6 @@ RUN pip3 install crc16 \
|
|||||||
getmac \
|
getmac \
|
||||||
packet_helper \
|
packet_helper \
|
||||||
psutil \
|
psutil \
|
||||||
scapy==2.4.4 \
|
|
||||||
scapy_helper \
|
scapy_helper \
|
||||||
pysubnettree \
|
pysubnettree \
|
||||||
xmlrunner
|
xmlrunner
|
||||||
@ -39,3 +38,8 @@ RUN dpkg -r python-ptf
|
|||||||
RUN git clone https://github.com/p4lang/ptf.git \
|
RUN git clone https://github.com/p4lang/ptf.git \
|
||||||
&& cd ptf \
|
&& cd ptf \
|
||||||
&& python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt
|
&& python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt
|
||||||
|
|
||||||
|
run echo "declare -x LANG=\"C.UTF-8\"" >> /root/.bashrc
|
||||||
|
run echo "declare -x LC_ALL=\"C.UTF-8\"" >> /root/.bashrc
|
||||||
|
run echo "declare -x PYTHONIOENCODING=\"UTF-8\"" >> /root/.bashrc
|
||||||
|
run echo "declare -x VIRTUAL_ENV=\"/root/env-python3\"" >> /root/.bashrc
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
DOCKER_PTF_SAI = docker-ptf-sai.gz
|
DOCKER_PTF_SAI = docker-ptf-sai.gz
|
||||||
DOCKER_PTF_BASE = docker-ptf.gz
|
DOCKER_PTF_BASE = docker-ptf.gz
|
||||||
$(DOCKER_PTF_SAI)_PATH = $(DOCKERS_PATH)/docker-ptf-sai
|
$(DOCKER_PTF_SAI)_PATH = $(DOCKERS_PATH)/docker-ptf-sai
|
||||||
$(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_2) $(PYTHON3_THRIFT_2)
|
$(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_0_14_1) $(PYTHON3_THRIFT_0_14_1)
|
||||||
$(DOCKER_PTF_SAI)_LOAD_DOCKERS += $(DOCKER_PTF_BASE)
|
$(DOCKER_PTF_SAI)_LOAD_DOCKERS += $(DOCKER_PTF_BASE)
|
||||||
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_SAI)
|
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_SAI)
|
||||||
SONIC_BUSTER_DOCKERS += $(DOCKER_PTF_SAI)
|
SONIC_BUSTER_DOCKERS += $(DOCKER_PTF_SAI)
|
||||||
|
Loading…
Reference in New Issue
Block a user