Jenkins Pipeline Sample Code
The sample code is as follows:
stage('memory-consistency-check') {
steps {
echo '====== Memory consistency check ======'
sh '''
if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
mkdir -p /opt/DevKit/testcase/affinity/weak_cons/bc_file
cd /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort
devkit advisor bc-gen -c make -o /opt/DevKit/testcase/affinity/weak_cons/bc_file
devkit advisor mm-check -i /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort -f /opt/DevKit/testcase/affinity/weak_cons/bc_file -r html -o ./report_dir
mv ./report_dir/mem-check*.html ./report_dir/memory-consistency-check.html
'''
}
post {
always {
publishHTML(target: [allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll : true,
reportDir : './report_dir',
reportFiles : 'memory-consistency-check.html',
reportName : 'memory-consistency-check Report']
)
}
}
}
- You are advised to perform the memory consistency check before the build process.
- /opt/DevKit/testcase/affinity/weak_cons/bc_file indicates the path for storing the generated BC files. Replace it with the actual path.
- /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort indicates the path to the source code based on which the BC files are generated. Replace it with the actual path.
Parent topic: Memory Consistency Check