Commit cdee7d07 authored by Claes's avatar Claes Committed by Esteban Blanc

Docker tests updated

parent 485901f1
ARG RELEASE=debian:10
FROM $RELEASE
ARG INSTALL_UPDATE
ARG INSTALL_PWRRT
ARG PKG_PWRRT
COPY ./test_pwrtest01a.sh ./$PKG_PWRRT ./pwrp_pkg_pwrtest01a_0001.tgz ./
RUN $INSTALL_UPDATE
RUN $INSTALL_PWRRT
RUN apt-get install -y iproute2
RUN dpkg -i $PKG_PWRRT
RUN mv ./pwrp_pkg_pwrtest01a_0001.tgz /home/pwrp/
CMD ./test_pwrtest01a.sh
ARG RELEASE=debian:10
FROM $RELEASE
ARG INSTALL_UPDATE
ARG INSTALL_PWRRT
ARG PKG_PWRRT
COPY ./test_pwrtest01b.sh ./$PKG_PWRRT ./pwrp_pkg_pwrtest01b_0001.tgz ./
RUN $INSTALL_UPDATE
RUN $INSTALL_PWRRT
RUN apt-get install -y iproute2
RUN dpkg -i $PKG_PWRRT
RUN mv ./pwrp_pkg_pwrtest01b_0001.tgz /home/pwrp/
CMD ./test_pwrtest01b.sh
ARG RELEASE=debian:10
FROM $RELEASE
ARG INSTALL_UPDATE
ARG INSTALL_PWRRT
ARG PKG_PWRRT
ENV DISPLAY :1
ENV DEBIAN_FRONTEND none_interactive
COPY ./pwrtest01c/test_pwrtest01c.sh ./$PKG_PWRRT ./pwrp_pkg_pwrtest01c_0001.tgz ./dummy_display_xorg.conf ./
RUN $INSTALL_UPDATE
RUN $INSTALL_PWRRT
RUN apt-get install -y xserver-xorg-video-dummy
RUN dpkg -i $PKG_PWRRT
RUN mv ./pwrp_pkg_pwrtest01c_0001.tgz /home/pwrp/
RUN ./test_pwrtest01c.sh
#!/bin/bash
echo "Here in test_pwrtest01b.sh"
Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config ./dummy_display_xorg.conf :99 &
sleep 20
su - pwrp
cd /home/pwrp
pwd
source .bashrc
export DISPLAY=:99
pwd
ls -l
export PWR_BUS_ID=999
export PYTHONPATH=$pwr_exe
pwr_pkg.sh -i /home/pwrp/pwrp_pkg_pwrtest01c_0001.tgz
# Rename boot, node and plcfiles
nname=`eval uname -n`
bootfile=`eval ls -1 $pwrp_load/ld_boot*.dat`
nodefile=`eval ls -1 $pwrp_load/ld_node*.dat`
plcfile=`eval ls -1 $pwrp_exe/plc_*_0999_plc`
echo "19-MAR-2020 17:06:54.32" > $pwrp_load/ld_boot_"$nname"_0999.dat
echo "pwrtest01" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "Common" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "plc_"$nname"_0999_plc" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "VolPwrTest01c 0.254.254.203" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "$nname 0.254.254.203 127.0.0.1 0 0 0 0 600000 0.002000 0 0 - -" > $pwrp_load/ld_node_"$nname"_0999.dat
mv $plcfile $pwrp_exe/"plc_"$nname"_0999_plc"
ip address
# Start project
rt_ini -i&
sleep 10
ps aux
export PYTHONPATH=$pwr_exe
ra_testall_c.sh
ls -l $pwrp_log
sleep 3
\ No newline at end of file
#!/bin/bash
echo "Here in test_pwrtest01a.sh"
su - pwrp
cd /home/pwrp
pwd
source .bashrc
pwd
ls -l
export PWR_BUS_ID=999
pwr_pkg.sh -i /home/pwrp/pwrp_pkg_pwrtest01a_0001.tgz
# Rename boot, node and plcfiles
nname=`eval uname -n`
bootfile=`eval ls -1 $pwrp_load/ld_boot*.dat`
nodefile=`eval ls -1 $pwrp_load/ld_node*.dat`
plcfile=`eval ls -1 $pwrp_exe/plc_*_0999_plc`
echo "19-MAR-2020 17:06:54.32" > $pwrp_load/ld_boot_"$nname"_0999.dat
echo "pwrtest01" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "Common" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "plc_"$nname"_0999_plc" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "VolPwrTest01a 0.254.254.201" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "$nname 0.254.254.201 172.17.0.2 0 0 0 0 600000 0.002000 0 0 - -" > $pwrp_load/ld_node_"$nname"_0999.dat
echo "pwrtest01b 0.254.254.202 172.17.0.3 0 0 0 0 600000 0.002000 0 0 - -" >> $pwrp_load/ld_node_"$nname"_0999.dat
mv $plcfile $pwrp_exe/"plc_"$nname"_0999_plc"
ip address
# Start project
rt_ini -i&
sleep 10
ps aux
i=0
while [ $i -lt 100 ]; do
ra_status
sleep 2
let i=i+1
done
#!/bin/bash
echo "Here in test_pwrtest01b.sh"
su - pwrp
cd /home/pwrp
pwd
source .bashrc
pwd
ls -l
export PWR_BUS_ID=999
pwr_pkg.sh -i /home/pwrp/pwrp_pkg_pwrtest01b_0001.tgz
# Rename boot, node and plcfiles
nname=`eval uname -n`
bootfile=`eval ls -1 $pwrp_load/ld_boot*.dat`
nodefile=`eval ls -1 $pwrp_load/ld_node*.dat`
plcfile=`eval ls -1 $pwrp_exe/plc_*_0999_plc`
echo "19-MAR-2020 17:06:54.32" > $pwrp_load/ld_boot_"$nname"_0999.dat
echo "pwrtest01" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "Common" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "plc_"$nname"_0999_plc" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "VolPwrTest01b 0.254.254.202" >> $pwrp_load/ld_boot_"$nname"_0999.dat
echo "$nname 0.254.254.202 172.17.0.3 0 0 0 0 600000 0.002000 0 0 - -" > $pwrp_load/ld_node_"$nname"_0999.dat
echo "pwrtest01a 0.254.254.201 172.17.0.2 0 0 0 0 600000 0.002000 0 0 - -" >> $pwrp_load/ld_node_"$nname"_0999.dat
mv $plcfile $pwrp_exe/"plc_"$nname"_0999_plc"
ip address
# Start project
rt_ini -i&
sleep 10
ps aux
ra_status
i=0
while [ $i -lt 100 ]; do
ra_status
sleep 2
let i=i+1
done
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment