Skip to content
Snippets Groups Projects
Commit 37f215b1 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

updated cicd testing to see if we can avoid odd .git corruption failure. ...

updated cicd testing to see if we can avoid odd .git corruption failure.  minor refactoring of a test
parent 5daf1c83
No related branches found
No related tags found
No related merge requests found
Pipeline #5150 passed
......@@ -19,14 +19,14 @@ main()
local orig_dir=$(pwd)
# puts peasoup_umbrella (and all submodules) in CICD_MODULE_WORK_DIR
cicd_setup_module_dependency allnp/peasoup_umbrella.git stars_umbrella
cicd_setup_module_dependency allnp/peasoup_umbrella.git cicd_stars_umbrella
# puts the version of zipr to test in stars_umbrella/SMPStaticAnalyzer.
cicd_put_module_in_tree stars_umbrella/SMPStaticAnalyzer
# puts the version of zipr to test in cicd_stars_umbrella/SMPStaticAnalyzer.
cicd_put_module_in_tree cicd_stars_umbrella/SMPStaticAnalyzer
# Build peasoup_umbrella as stars_umbrella
cd $CICD_MODULE_WORK_DIR/stars_umbrella
# Build peasoup_umbrella as cicd_stars_umbrella
cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella
source set_env_vars
sudo ./get-peasoup-packages.sh all
./build-all.sh
......
......@@ -14,7 +14,7 @@ main()
if [[ $CICD_NIGHTLY == 1 ]] ; then
rm -rf $CICD_MODULE_WORK_DIR/stars_umbrella
rm -rf $CICD_MODULE_WORK_DIR/cicd_stars_umbrella
fi
}
......
#!/bin/bash
# Usage:
function validate {
if grep "FROMIB COMPLETE 20 SWITCHTABLE" $1.STARSxrefs > /dev/null; then
if grep "FROMIB COMPLETE 1 RETURNTARGET" $1.STARSxrefs > /dev/null; then
if tail $1.infoannot | grep "SUCCESS ANALYSISCOMPLETED" > /dev/null; then
echo "STARS success"
exitstatus=0
else
echo "Failed to find SUCCESS ANALYSISCOMPLETED annotation"
exitstatus=1
fi
else
echo "Failed to find any COMPLETE RETURNTARGET xref annotations"
exitstatus=2
fi
else
echo "Failed to find COMPLETE 20 SWITCHTABLE xref annotation"
exitstatus=3
fi
return $exitstatus
function validate
{
if ! grep "FROMIB COMPLETE 20 SWITCHTABLE" $1.STARSxrefs > /dev/null; then
echo "Failed to find COMPLETE 20 SWITCHTABLE xref annotation"
exit 3
fi
if ! grep "FROMIB COMPLETE 1 RETURNTARGET" $1.STARSxrefs > /dev/null; then
echo "Failed to find any COMPLETE RETURNTARGET xref annotations"
exit 2
fi
if ! tail $1.infoannot | grep "SUCCESS ANALYSISCOMPLETED" > /dev/null; then
echo "Failed to find SUCCESS ANALYSISCOMPLETED annotation"
exit 1
fi
echo "STARS success"
return 0
}
function test {
function test()
{
. $SMPSA_HOME/SMP-fullanalyze64-ida7.sh $1
validate $1
}
# Pass in optimization level string, e.g. O0, Og, or O3
function build {
function build()
{
rm -f starstest_$1.exe
gcc -m64 -$1 -o starstest_$1.exe $SMPSA_HOME/tests/starstest.c
}
# Pass in optimization level string, e.g. O0, Og, or O3
function build_and_test {
function build_and_test()
{
build $1
test starstest_$1.exe
}
#!/bin/bash
set -e
set -x
function main()
{
set -e
set -x
cd $CICD_MODULE_WORK_DIR/stars_umbrella
source set_env_vars
mkdir -p /tmp/stars_test
cd /tmp/stars_test
cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella
source set_env_vars
mkdir -p /tmp/stars_test
cd /tmp/stars_test
# Build and test each of the optimization levels -O0, -Og, and -O3.
if build_and_test O0 ; then
if build_and_test Og ; then
build_and_test O3
fi
fi
# Build and test each of the optimization levels -O0, -Og, and -O3.
if build_and_test O0 ; then
if build_and_test Og ; then
build_and_test O3
fi
fi
return 0
}
main "$@"
......@@ -2,7 +2,7 @@
set -e
set -x
cd $CICD_MODULE_WORK_DIR/stars_umbrella
cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella
source set_env_vars
mkdir -p /tmp/stars_test
cd /tmp/stars_test
......
Subproject commit ce22715110a7380b3b5a8b684b92e1ea32403734
Subproject commit 1896c4f56227908fbe56569fcaf159799609d069
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment