Skip to content

Commit

Permalink
Run similar tests in different directories to avoid conflicts
Browse files Browse the repository at this point in the history
Move the test logic to a bash script to simplify the BuildFile.xml.
  • Loading branch information
fwyzard committed Sep 7, 2022
1 parent 429d8d6 commit d2e962a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 8 deletions.
5 changes: 1 addition & 4 deletions HeterogeneousCore/AlpakaTest/test/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<test
name="testHeterogeneousCoreAlpakaTestWriteRead"
command="cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/writer.py; cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/reader.py"
/>
<test name="testHeterogeneousCoreAlpakaTestWriteRead" command="testHeterogeneousCoreAlpakaTestWriteRead.sh"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/bash -e

if ! [ "${LOCALTOP}" ]; then
export LOCALTOP=${CMSSW_BASE}
cd ${CMSSW_BASE}
fi

mkdir -p testHeterogeneousCoreAlpakaTestWriteRead
cd testHeterogeneousCoreAlpakaTestWriteRead
rm -f test.root
echo "--------------------------------------------------------------------------------"
echo "$ cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/writer.py"
echo
cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/writer.py
echo
echo "--------------------------------------------------------------------------------"
echo "$ cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/reader.py"
echo
cmsRun ${LOCALTOP}/src/HeterogeneousCore/AlpakaTest/test/reader.py
echo
echo "--------------------------------------------------------------------------------"
echo "$ edmDumpEventContent test.root"
echo
edmDumpEventContent test.root
5 changes: 1 addition & 4 deletions HeterogeneousCore/CUDATest/test/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@
<test name="TestCUDATest" command="runtests.sh cpu"/>
</ifrelease>

<test
name="testHeterogeneousCoreCUDATestWriteRead"
command="cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/writer.py; cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/reader.py"
/>
<test name="testHeterogeneousCoreCUDATestWriteRead" command="testHeterogeneousCoreCUDATestWriteRead.sh"/>
</iftool>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/bash -e

if ! [ "${LOCALTOP}" ]; then
export LOCALTOP=${CMSSW_BASE}
cd ${CMSSW_BASE}
fi

mkdir -p testHeterogeneousCoreCUDATestWriteRead
cd testHeterogeneousCoreCUDATestWriteRead
rm -f test.root
echo "--------------------------------------------------------------------------------"
echo "$ cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/writer.py"
echo
cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/writer.py
echo
echo "--------------------------------------------------------------------------------"
echo "$ cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/reader.py"
echo
cmsRun ${LOCALTOP}/src/HeterogeneousCore/CUDATest/test/reader.py
echo
echo "--------------------------------------------------------------------------------"
echo "$ edmDumpEventContent test.root"
echo
edmDumpEventContent test.root

0 comments on commit d2e962a

Please sign in to comment.