Skip to content

Commit

Permalink
add noble tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Apr 12, 2024
1 parent 1d0c366 commit 9b8b853
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
31 changes: 24 additions & 7 deletions .ci/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# workaround for a bug in debian9, i.e. starting mysql hangs
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ]; then
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.04" ]; then
docker exec --user root ndts service mariadb restart
else
docker exec --user root ndts service mysql stop
Expand All @@ -12,22 +12,39 @@ else
# docker exec --user root ndts /bin/bash -c '$(service mysql start &) && sleep 30'
fi

docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get -qq install -y tango-db tango-common; sleep 10'
if [ "$?" != "0" ]; then exit 255; fi

echo "install tango-common"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-common; sleep 10'
if [ "$1" = "ubuntu24.04" ]; then
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=localhost\npassword=rootpw" > /var/lib/tango/.my.cnf'
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"%" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"localhost" identified by "rootpw"'
docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
fi
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu21.10" ] || [ "$1" = "ubuntu22.04" ]; then
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=127.0.0.1\npassword=rootpw" > /var/lib/tango/.my.cnf'
fi
echo "install tango-db"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-db; sleep 10'
if [ "$?" -ne "0" ]; then exit 255; fi
if [ "$1" = "ubuntu24.04" ]; then
docker exec --user tango ndts /usr/bin/mysql -e 'create database tango'
docker exec --user tango ndts /bin/bash -c '/usr/bin/mysql tango < /usr/share/dbconfig-common/data/tango-db/install/mysql'
fi

docker exec --user root ndts service tango-db restart


echo "install tango servers"
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get -qq install -y tango-starter tango-test'
if [ "$?" != "0" ]; then exit 255; fi
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-starter tango-test liblog4j1.2-java'
if [ "$?" -ne "0" ]; then exit 255; fi

docker exec --user root ndts service tango-starter restart
docker exec --user root ndts chown -R tango:tango .

docker exec --user root ndts chown -R tango:tango .


echo "install python3-pytango and nxs packages"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [debian12, debian11, debian10, ubuntu22.04]
os: [debian12, debian11, debian10, ubuntu22.04, ubuntu24.04]
test: [extrasettings, extraserver, basicserver, basicsettings, basic]
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions NXSRecSelector.xmi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ASCII"?>
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://www.esrf.fr/tango/pogo/PogoDsl">
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://tango.org/pogo/PogoDsl">
<classes name="NXSRecSelector" pogoRevision="9.7">
<description description="Tango server with Sardana Recorder settings&#xA;&#xA;Source code: https://github.com/nexdatas/nxsrecselector&#xA;Web page: https://nexdatas.github.io/nxsrecselector&#xA;NexDaTaS Web page: https://nexdatas.github.io&#xA;" title="Selector Server for NeXus Sardana Recorder" sourcePath="/home/jkotan/ndts/nexdatas.recselector" language="Python" filestogenerate="XMI file,Protected Regions,html Pages" license="GPL" hasMandatoryProperty="false" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false" descriptionHtmlExists="false">
<inheritances classname="Device_Impl" sourcePath=""/>
Expand Down Expand Up @@ -748,4 +748,4 @@
</states>
<preferences docHome="./doc_html" makefileHome="$(TANGO_DIR)/Libraries/cppserver/common"/>
</classes>
</pogoDsl:PogoSystem>
</pogoDsl:PogoSystem>

0 comments on commit 9b8b853

Please sign in to comment.