Create fake devices in terminal tabs for Taipan testing

This commit is contained in:
Douglas Clowes
2014-05-08 14:44:24 +10:00
parent 416c609b9c
commit 35674d8fb0

View File

@ -0,0 +1,45 @@
#!/bin/bash
echo ${0}
if [ -f ${PWD}/${0} ]; then
echo True: ${PWD}/${0}
else
echo False: ${PWD}/${0}
fi
if [ -d TEST_SICS ]; then
root=$PWD/TEST_SICS
elif [ $(basename $PWD) == "TEST_SICS" ]; then
root=$PWD
else
root=${PWD}
while [ "${root}" != "/" ]; do
echo ${root}
if [ $(basename ${root}) == "TEST_SICS" ]; then
break
fi
root=$(dirname ${root})
done
fi
echo ${root}
if [ $(basename ${root}) != "TEST_SICS" ]; then
echo "Can't find TEST_SICS directory"
exit 1
fi
for f in setup fakeGalil fakeTempControl; do
if [ ! -d ${root}/${f} ]; then
echo "Can't find ${f} directory"
exit 1
fi
done
gnome-terminal \
--tab --title="Motors" \
--working-directory=${root}/fakeGalil \
--command="${root}/fakeGalil/SIM_GALIL_taipan.py" \
--tab --title="Mercury" \
--working-directory=${root}/fakeTempControl/oxford \
--command="${root}/fakeTempControl/oxford/SIM_MERCURY.py -w" \
--tab --title="Pfeiffer" \
--working-directory=${root}/fakePfeiffer/tpg261 \
--command="${root}/fakePfeiffer/tpg261/SIM_PFEIFFER.py -w" \
--tab --title="HidenXCS" \
--working-directory=${root}/fakeHiden/xcs \
--command="${root}/fakeHiden/xcs/SIM_HIDEN.py -w"