Skip to content

Commit

Permalink
fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gitting-around committed Oct 31, 2024
1 parent be3f025 commit 486deb3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 37 deletions.
38 changes: 5 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@ jobs:
- uses: lukka/[email protected]
if: matrix.os != 'windows-latest'


# why not gcc
# - name: Set up CLANG
# if: matrix.os == 'ubuntu-22.04'
# uses: egor-tensin/setup-clang@v1
# with:
# version: latest
# platform: x64



- name: Build linux
if: matrix.os == 'ubuntu-22.04'
shell: bash
Expand All @@ -104,14 +93,7 @@ jobs:
if: matrix.os == 'macos-13'
shell: bash
run: ./scripts/_build_base.sh darwin-x64 darwin-x86_64

# - name: Set Perl environment variables # https://github.com/sfackler/rust-openssl/issues/2149
# if: matrix.os == 'windows-latest'
# run: |
# cpan -i Locale::Maketext::Simple
# echo "PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
# echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8


- name: Build Windows
if: matrix.os == 'windows-latest'
shell: msys2 {0}
Expand Down Expand Up @@ -147,30 +129,20 @@ jobs:
if: matrix.os != 'windows-latest'
shell: bash
run: |
export target=$(cat target)
echo $(pwd)
echo About to run unit-test-rabbitmq and unit-test-rabbitmq-core
ctest --test-dir build/$target -R unit-test-rabbitmq
echo Running unit-test-rabbitmq-core
./build/linux-x64/rabbitmq-core/unit-test-rabbitmq-core
echo Running unit-test-rabbitmq
./build/linux-x64/rabbitmq-core/unit-test-rabbitmq
echo Tests complete
- name: Run unit tests on WIN
#echo About to run unit-test-rabbitmq and unit-test-rabbitmq-core
#ctest --output-on-failure --test-dir build/$target -R unit-test-rabbitmq
#echo Tests complete
if: matrix.os == 'windows-latest'
shell: bash
run: |
ls
ls build/
ctest --test-dir build/win-x64 --output-on-failure -R unit-test-rabbitmq
echo Tests complete
# pacman -S --noconfirm mingw-w64-x86_64-gcc-libs
# cmake --install build/win-x64
# echo check for dll dependencies for the core test
# ldd build/win-x64/rabbitmq-core/unit-test-rabbitmq-core.exe
# echo check for dll dependencies for the container test
# ldd build/win-x64/rabbitmq-fmu/unit-test-rabbitmq.exe
# Call ctest
- name : Prep for integration tests UBUNTU # these need additional scripts that produce data to the rabbitmq, require rabbitmq server; add -u to see script output
if: matrix.os == 'ubuntu-22.04'
Expand Down
22 changes: 18 additions & 4 deletions rabbitmq-fmu/xmls-for-tests/modelDescription.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<fmiModelDescription fmiVersion="2.0" modelName="RabbitMq" guid="{cfc65592-ffff-4563-9705-1581b6e7071c}"
generationTool="RabbitMQ digital twin generator" numberOfEventIndicators="0" copyright="INTO-CPS"
license="INTO-CPS">
generationTool="RabbitMQ digital twin generator" numberOfEventIndicators="0" copyright="AU"
license="-">
<CoSimulation modelIdentifier="rabbitmq" needsExecutionTool="true"
canHandleVariableCommunicationStepSize="true" canInterpolateInputs="false"
maxOutputDerivativeOrder="0" canRunAsynchronuously="false" canBeInstantiatedOnlyOncePerProcess="true"
Expand Down Expand Up @@ -70,9 +70,22 @@
<ScalarVariable name="config.routingkey.from_cosim" valueReference="13" variability="fixed" causality="parameter" initial="exact">
<String start="data.from_cosim"/>
</ScalarVariable>
<ScalarVariable name="config.ssl" valueReference="16" variability="fixed" causality="parameter" initial="exact">
<Boolean start="0"/>
</ScalarVariable>
<ScalarVariable name="config.queueupperbound" valueReference="17" variability="fixed" causality="parameter" initial="exact">
<Integer start="100"/>
</ScalarVariable>
<ScalarVariable name="config.vhost" valueReference="18" variability="fixed" causality="parameter" initial="exact">
<String start="/"/>
</ScalarVariable>
<ScalarVariable name="config.howtosend" valueReference="19" variability="fixed" causality="parameter" initial="exact">
<Boolean start="1"/> <!-- options, on event (0), or always (1)-->
</ScalarVariable>


</ModelVariables>
<ModelStructure>
</ModelVariables>
<ModelStructure>
<Outputs>
<Unknown index="1"/>
<Unknown index="2"/>
Expand All @@ -83,4 +96,5 @@
</InitialUnknowns>
</ModelStructure>


</fmiModelDescription>

0 comments on commit 486deb3

Please sign in to comment.